/* ==========================================================================
   WooCommerce My Account - Order View Styling
   ========================================================================== */

/* Main Content Wrapper */
.myaccount-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 40px 20px;
}

/* Order Header */
.custom-order-header {
  margin-bottom: 40px;
}

.custom-order-header__text {
  font-size: 16px;
  font-weight: 400;
  color: #06131F;
  display: inline;
}

.custom-order-header__id {
  font-size: 16px;
  font-weight: 700;
  color: #06131F;
  display: inline;
}

.custom-order-header__meta {
  font-size: 16px;
  color: #06131F;
  font-weight: 400;
  display: inline;
  margin-left: 4px;
}

.custom-order-header__meta strong {
  font-weight: 700;
  color: #06131F;
}

/* Downloads Section */
.custom-downloads {
  margin-bottom: 50px;
}

.custom-downloads__title {
  font-size: 36px;
  font-weight: 300;
  color: #333;
  margin-bottom: 30px;
  letter-spacing: -0.5px;
}

.custom-downloads__empty {
  color: #666;
  font-size: 16px;
  margin-top: 24px;
}

/* ==========================================================================
   Accordion Panels
   ========================================================================== */

/* Panel Container */
.custom-download-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 0 20px 0;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f0f0f0;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Panel Header (Clickable Button) */
.custom-panel-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f0f0 !important;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  transition: background 0.2s ease;
  outline: none;
  text-align: left;
  min-height: 60px;
  box-sizing: border-box;
}

.custom-panel-header:hover {
  background: #f0f0f0 !important;
}

.custom-panel-header:hover .custom-panel-header__product,
.custom-panel-header:hover .custom-panel-header__variation {
  color: #e08319 !important;
}

.custom-panel-header:hover .custom-panel-arrow {
  color: #e08319 !important;
}

.custom-panel-header__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  gap: 1px;
  justify-content: center;
}

.custom-panel-header__product {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  margin: 0;
  transition: color 0.2s ease;
}

.custom-panel-header__variation {
  font-size: 13px;
  color: #666;
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
  transition: color 0.2s ease;
  opacity: 0.8;
}

/* Panel Arrow */
.custom-panel-arrow {
  margin-left: 20px;
  font-size: 16px;
  color: #666;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  transform: rotate(0deg);
}

.custom-panel-arrow.open {
  transform: rotate(180deg);
}

/* ==========================================================================
   Panel Body (Expanded Content)
   ========================================================================== */

/* CONTROLLED PANEL VISIBILITY */
body.woocommerce-account .woocommerce .myaccount-main-content .custom-panel-body {
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 60px !important;
  width: 100% !important;
  background: #fff !important;
  padding: 15px 20px !important;
  border-top: 1px solid #e0e0e0 !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: visible !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* First panel open by default */
body.woocommerce-account .woocommerce .myaccount-main-content #panel-body-1 {
  display: block !important;
}

/* Other panels closed by default */
body.woocommerce-account .woocommerce .myaccount-main-content #panel-body-2,
body.woocommerce-account .woocommerce .myaccount-main-content #panel-body-3,
body.woocommerce-account .woocommerce .myaccount-main-content #panel-body-4,
body.woocommerce-account .woocommerce .myaccount-main-content #panel-body-5 {
  display: none !important;
}

/* Downloads Container */
.custom-panel-body__downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 5px;
}

/* ==========================================================================
   Download Buttons
   ========================================================================== */

/* Base Download Button Styling */
body.woocommerce-account .woocommerce .myaccount-main-content .custom-download-btn {
  display: inline-block !important;
  padding: 12px 24px !important;
  background: #e08319 !important;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
  margin: 0 12px 12px 0 !important;
  border: none !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 1 !important;
  transition: all 0.2s ease !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Button Hover Effects */
.custom-download-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
  background: #c06f15 !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Button Color Variations */
.custom-panel-body__downloads a:nth-child(1) {
  background: #e08319 !important; /* SCORE/AUDIO - Orange */
}

.custom-panel-body__downloads a:nth-child(1):hover {
  background: #c06f15 !important;
}

.custom-panel-body__downloads a:nth-child(2) {
  background: #b8860b !important; /* PARTS - Brown */
}

.custom-panel-body__downloads a:nth-child(2):hover {
  background: #9a7009 !important;
}

.custom-panel-body__downloads a:nth-child(3) {
  background: #d2691e !important; /* AUDIO - Darker Orange */
}

.custom-panel-body__downloads a:nth-child(3):hover {
  background: #b8591a !important;
}

.custom-panel-body__downloads a:nth-child(4) {
  background: #20b2aa !important; /* GROOVES - Teal */
}

.custom-panel-body__downloads a:nth-child(4):hover {
  background: #1a9b94 !important;
}

/* ==========================================================================
   Order Details Section
   ========================================================================== */

.custom-order-details {
  margin-bottom: 50px;
}

.custom-order-details__title {
  font-size: 36px;
  font-weight: 300;
  color: #333;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.custom-order-details__table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 18px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.custom-order-details__table th {
  font-weight: 700;
  color: #333;
  padding: 16px 20px;
  background: #f8f9fa;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
}

.custom-order-details__table th:last-child {
  text-align: right;
}

.custom-order-details__table td {
  padding: 16px 20px;
  color: #333;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14.4px;
  font-weight: 400;
}

.custom-order-details__table td:last-child {
  text-align: right;
  font-weight: 400;
  font-size: 16px;
}

.custom-order-details__table tbody tr:last-child td {
  border-bottom: none;
}

.custom-order-details__table tfoot th,
.custom-order-details__table tfoot td {
  background: #fff !important;
  border-top: 1px solid #e0e0e0 !important;
  border-bottom: none !important;
  padding: 16px 20px !important;
}

.custom-order-details__table tfoot th {
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #333 !important;
}

.custom-order-details__table tfoot td {
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #333 !important;
  text-align: right !important;
}

/* ==========================================================================
   Billing Address Section
   ========================================================================== */

.custom-billing-address {
  margin-bottom: 50px;
}

.custom-billing-address__title {
  font-size: 36px;
  font-weight: 300;
  color: #333;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.custom-billing-address__content {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 16px;
  color: #333;
  margin-top: 8px;
  max-width: 400px;
  line-height: 1.5;
}

/* ==========================================================================
   Orders List Table (if needed)
   ========================================================================== */

.myaccount-orders__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.myaccount-orders__table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 1.1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.myaccount-orders__th {
  background: #f8f9fa;
  padding: 20px 18px;
  text-align: left;
  font-weight: 700;
  color: #333;
  border: none;
  border-bottom: 1px solid #e0e0e0;
}

.myaccount-orders__th--right {
  text-align: right;
}

.myaccount-orders__row {
  border-bottom: 1px solid #f0f0f0;
}

.myaccount-orders__td {
  padding: 22px 18px;
  color: #333;
  vertical-align: middle;
  border: none;
}

.myaccount-orders__td--right {
  text-align: right;
}

.myaccount-orders__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.myaccount-orders__btn {
  display: inline-block;
  min-width: 120px;
  padding: 12px 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.myaccount-orders__btn--view {
  background: #e08319;
  color: #fff;
}

.myaccount-orders__btn--view:hover {
  background: #c06f15;
  transform: translateY(-1px);
}

.myaccount-orders__btn--downloads {
  background: #333;
  color: #fff;
}

.myaccount-orders__btn--downloads:hover {
  background: #555;
  transform: translateY(-1px);
}

.myaccount-orders__empty {
  color: #e08319;
  font-size: 1.1rem;
  margin-top: 24px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .myaccount-main-content {
    padding: 15px;
  }
  
  .custom-downloads__title,
  .custom-order-details__title,
  .custom-billing-address__title {
    font-size: 28px;
  }
  
  .custom-panel-header {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 50px;
  }
  
  .custom-panel-header__product {
    font-size: 14px;
  }
  
  .custom-panel-header__variation {
    font-size: 12px;
  }
  
  .custom-panel-body__downloads {
    gap: 8px;
  }
  
  .custom-download-btn {
    padding: 10px 18px !important;
    font-size: 12px !important;
  }
  
  .custom-order-details__table th,
  .custom-order-details__table td {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .custom-billing-address__content {
    padding: 15px 18px;
    font-size: 14px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .custom-panel-header {
    padding: 10px 12px;
    min-height: 45px;
  }
  
  .custom-download-btn {
    padding: 8px 14px !important;
    font-size: 11px !important;
    width: 100%;
    margin-bottom: 8px !important;
  }
  
  .custom-panel-body__downloads {
    flex-direction: column;
  }
}