/* ==========================================================================
   Todo Licencias - Customer Dashboard CSS
   Light theme, blue gradient tabs, orange accents
   ========================================================================== */

/* ---------- Override theme page-body constraint ---------- */
.page-id-8 .page-body,
.woocommerce-account .page-body {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 20px !important;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---------- WooCommerce Overrides (CRITICAL) ---------- */
.woocommerce-MyAccount-navigation {
  display: none !important;
}

.woocommerce-MyAccount-content {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------- Account Wrapper ---------- */
.tl-myaccount-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0 40px;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: #333;
  line-height: 1.5;
}

/* ---------- Tabs Navigation ---------- */
.tl-tabs-nav {
  margin-bottom: 24px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tl-tabs-bar {
  display: flex;
  background: #ffffff;
  border-bottom: 2px solid #d8e5f6;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 10px;
  padding: 10px;
}

.tl-tabs-bar::-webkit-scrollbar {
  display: none;
}

.tl-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  color: #0b3879;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  margin-bottom: 0;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  background: #ffffff;
}

.tl-tab:hover {
  color: #ffffff;
  background: #38c1da;
  border-color: #38c1da;
}

.tl-tab.active,
.tl-tab.is-active {
  color: #ffffff;
  background: #0b3879;
  border-color: #0b3879;
  font-weight: 700;
}

.tl-tab .tl-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tl-tab .tab-icon {
  font-size: 15px;
}

.tl-tab .tab-icon {
  font-size: 16px;
  line-height: 1;
}

/* ---------- Content Area ---------- */
.tl-myaccount-content {
  background: #fff;
  padding: 28px 32px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  min-height: 300px;
}

/* ---------- Section (MIS DATOS, etc.) ---------- */
.tl-myaccount-content .tl-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.tl-section-header {
  margin-bottom: 16px;
}

/* ---------- Page Titles ---------- */
.tl-myaccount-content h2,
.tl-myaccount-content h3,
.tl-section-title {
  color: #1a2332;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.3;
}

.tl-section .tl-section-title {
  color: #0b3879;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.tl-myaccount-content h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* ---------- Welcome banner (Dashboard) ---------- */
.tl-welcome-banner {
  margin-bottom: 24px;
}

.tl-welcome-banner h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a2332;
  margin: 0 0 8px;
}

.tl-welcome-banner h2 span {
  color: #0b3879;
}

.tl-welcome-banner p {
  font-size: 15px;
  color: #555;
  margin: 0;
}

/* ---------- Stats Cards (Dashboard) ---------- */
.tl-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.tl-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tl-stat-card[href]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 56, 121, 0.08);
}

.tl-stat-card .tl-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  width: 40px;
  height: 40px;
}

.tl-stat-card .tl-stat-icon .tl-icon {
  width: 28px;
  height: 28px;
  color: #ff5d00;
  stroke: currentColor;
}

.tl-stat-card .tl-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #0b3879;
  display: block;
  margin-bottom: 4px;
}

.tl-stat-card .tl-stat-label {
  font-size: 12px;
  color: #5f6f85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ---------- Status Badges ---------- */
.tl-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.tl-badge-completed,
.tl-badge-complete,
.tl-badge-active {
  background: #e6f9ee;
  color: #1a8a4a;
}

.tl-badge-pending,
.tl-badge-on-hold {
  background: #fff4e5;
  color: #c67e12;
}

.tl-badge-cancelled,
.tl-badge-failed,
.tl-badge-refunded {
  background: #fde8e8;
  color: #c0392b;
}

.tl-badge-processing {
  background: #e3f0fc;
  color: #2472a8;
}

/* ---------- Tables ---------- */
.tl-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.tl-table thead th {
  background: #f4f6f9;
  color: #4a5568;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.tl-table tbody td {
  padding: 12px 14px;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.tl-table tbody tr:hover {
  background: #f8fafc;
}

.tl-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Buttons ---------- */
.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.tl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tl-btn-primary,
.tl-btn-pay {
  background: #ff5d00;
  color: #fff;
}

.tl-btn-primary:hover,
.tl-btn-pay:hover {
  background: #e04d00;
  color: #fff;
}

.tl-btn-secondary {
  background: #418eff;
  color: #fff;
}

.tl-btn-secondary:hover {
  background: #2a7aff;
  color: #fff;
}

.tl-btn-view {
  background: #eef4ff;
  color: #418eff;
  border: 1px solid #c4d9ff;
}

.tl-btn-view:hover {
  background: #deeaff;
  color: #2a7aff;
}

.tl-btn-codes {
  background: #e6f9ee;
  color: #1a8a4a;
}

.tl-btn-codes:hover {
  background: #d0f0dd;
  color: #157a3e;
}

.tl-btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

/* ---------- Profile Section ---------- */
.tl-profile-section {
  margin-bottom: 24px;
}

.tl-profile-data {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.tl-profile-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
}

.tl-profile-label {
  font-weight: 600;
  color: #1a2332;
  min-width: 140px;
  font-size: 14px;
}

.tl-profile-value {
  color: #555;
  font-size: 14px;
}

.tl-coins-display {
  background: #edf5fc;
  border-left: 4px solid #f7941d;
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1a3a5c;
}

.tl-coins-display .coins-amount {
  font-size: 20px;
  color: #f7941d;
}

/* ---------- Profile Actions ---------- */
.tl-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tl-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-quick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tl-quick-btn .tl-icon {
  flex-shrink: 0;
}

.tl-quick-btn.btn-primary {
  background: #ff5d00;
  color: #fff;
  border-color: #ff5d00;
}

.tl-quick-btn.btn-primary:hover {
  background: #e04d00;
  color: #fff;
  border-color: #e04d00;
}

.tl-quick-btn.btn-secondary {
  background: #418eff;
  color: #fff;
  border-color: #418eff;
}

.tl-quick-btn.btn-secondary:hover {
  background: #2a7aff;
  color: #fff;
  border-color: #2a7aff;
}

.tl-quick-btn.btn-logout {
  background: transparent;
  color: #c0392b;
  border-color: #c0392b;
}

.tl-quick-btn.btn-logout:hover {
  background: #c0392b;
  color: #fff;
}

/* ---------- Codes Section ---------- */
.tl-code-value {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  background: #f4f6f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #1a2332;
  word-break: break-all;
  display: inline-block;
}

.tl-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f4f6f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7a8d;
  font-size: 15px;
  transition: all 0.2s ease;
  padding: 0;
}

.tl-copy-btn:hover {
  background: #e3f0fc;
  color: #2472a8;
  border-color: #b3d4f0;
}

.tl-copy-btn.copied,
.tl-copy-btn.success {
  background: #e6f9ee;
  color: #1a8a4a;
  border-color: #b0e6c8;
}

/* ---------- Coins Section ---------- */
.tl-coins-hero {
  background: linear-gradient(135deg, #f7941d 0%, #f5a623 50%, #f7941d 100%);
  color: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(247, 148, 29, 0.25);
}

.tl-coins-hero .coins-balance {
  font-size: 42px;
  font-weight: 800;
  margin: 8px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tl-coins-hero .coins-label {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.tl-coins-recharge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a3a5c;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 16px;
  transition: all 0.2s ease;
}

.tl-coins-recharge-link:hover {
  background: #15304d;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ---------- Orders Section ---------- */
.tl-orders-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Empty State ---------- */
.tl-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #8a96a3;
}

.tl-empty-state .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.7;
}

.tl-empty-state .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

.tl-empty-state .empty-text {
  font-size: 14px;
  margin-bottom: 20px;
  color: #8a96a3;
}

.tl-empty-state .tl-btn {
  margin-top: 8px;
}

/* ---------- Cards / Panels ---------- */
.tl-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.tl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f5;
}

/* ---------- WooCommerce Form Overrides ---------- */
.tl-myaccount-content input[type="text"],
.tl-myaccount-content input[type="email"],
.tl-myaccount-content input[type="password"],
.tl-myaccount-content input[type="tel"],
.tl-myaccount-content input[type="number"],
.tl-myaccount-content input[type="url"],
.tl-myaccount-content select,
.tl-myaccount-content textarea,
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}

.tl-myaccount-content input:focus,
.tl-myaccount-content select:focus,
.tl-myaccount-content textarea:focus,
.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content select:focus,
.woocommerce-MyAccount-content textarea:focus {
  outline: none;
  border-color: #2a7ab5;
  box-shadow: 0 0 0 3px rgba(42, 122, 181, 0.12);
}

.tl-myaccount-content label,
.woocommerce-MyAccount-content label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.tl-myaccount-content button[type="submit"],
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content .button,
.tl-myaccount-content .woocommerce-Button {
  background: #f7941d;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-myaccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content .button:hover,
.tl-myaccount-content .woocommerce-Button:hover {
  background: #e5850f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Form rows */
.woocommerce-MyAccount-content .form-row {
  margin-bottom: 16px;
}

.woocommerce-MyAccount-content fieldset {
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.woocommerce-MyAccount-content fieldset legend {
  font-weight: 600;
  color: #1a2332;
  padding: 0 8px;
  font-size: 15px;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info {
  background: #e3f0fc;
  border-left: 4px solid #2a7ab5;
  color: #1a3a5c;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
  font-size: 14px;
}

.woocommerce-error {
  background: #fde8e8;
  border-left: 4px solid #c0392b;
  color: #8b1a1a;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
  font-size: 14px;
}

/* ---------- Utility ---------- */
.tl-divider {
  border: none;
  border-top: 1px solid #edf2f7;
  margin: 20px 0;
}

.tl-text-muted {
  color: #8a96a3;
  font-size: 13px;
}

.tl-text-center {
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .tl-myaccount-wrapper {
    padding: 6px 0 20px;
  }

  /* Tabs: scroll horizontal, compactos, legibles */
  .tl-tabs-nav {
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .tl-tabs-bar {
    gap: 0;
    border-radius: 0;
    padding: 0 4px;
  }

  .tl-tab {
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    flex: 0 0 auto;
    color: #444;
  }

  .tl-tab .tab-icon {
    display: inline;
    font-size: 14px;
  }

  .tl-myaccount-content {
    padding: 16px 14px;
    border-radius: 0;
  }

  .tl-myaccount-content h2,
  .tl-section-title {
    font-size: 19px;
  }

  .tl-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tl-stat-card {
    padding: 14px 12px;
  }

  .tl-stat-card .tl-stat-value {
    font-size: 22px;
  }

  .tl-profile-row {
    flex-direction: column;
    gap: 4px;
  }

  .tl-profile-label {
    min-width: unset;
  }

  .tl-profile-actions {
    flex-direction: column;
  }

  .tl-quick-btn {
    justify-content: center;
    width: 100%;
  }

  .tl-coins-hero {
    padding: 20px 16px;
  }

  .tl-coins-hero .coins-balance {
    font-size: 32px;
  }

  .tl-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tl-orders-actions {
    flex-direction: column;
  }

  .tl-orders-actions .tl-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .tl-tab {
    padding: 10px 10px;
    font-size: 12px;
  }

  .tl-myaccount-content {
    padding: 16px 12px;
  }

  .tl-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tl-stat-card .tl-stat-value {
    font-size: 20px;
  }

  .tl-stat-card .tl-stat-label {
    font-size: 11px;
  }
}

/* ==========================================================================
   Order Detail / Thank You Page — Fix gray text
   ========================================================================== */
.woocommerce-order-details th,
.woocommerce-order-details td,
.woocommerce-table--order-details th,
.woocommerce-table--order-details td,
.woocommerce-order-overview li,
.woocommerce-order-overview li strong,
.woocommerce-customer-details th,
.woocommerce-customer-details td,
.woocommerce-customer-details address,
.order_details th,
.order_details td,
.shop_table th,
.shop_table td,
.wc-order-item-meta,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    color: #333 !important;
}

.woocommerce-order-details .product-name a,
.woocommerce-table--order-details .product-name a {
    color: #2a6fa0 !important;
}

.woocommerce-thankyou-order-received,
.woocommerce-notice,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    color: #333 !important;
}

/* Badge for "En Verificación" */
.tl-badge-info {
    background: #e3f2fd;
    color: #1565c0;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* Fix pay-for-order page text colors */
.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td,
#order_review th,
#order_review td {
    color: #333 !important;
}

/* Hide WC "Pay" button for on-hold orders via CSS */
.order-again .button,
.wc-forward {
    /* keep visible, just ensure proper styling */
}
