/*!
 * TeachDemy — My Account inner pages UI/UX refresh
 * ---------------------------------------------------------
 * Covers every page behind a dashboard card that wasn't already
 * styled by wallet-refresh.css: Orders, Tickets, Addresses,
 * Account details, Wishlist, My Exams, My Certificates,
 * Become an Affiliate (+ its dashboard), and Messages (+ chat).
 *
 * Every selector below is copied from the real PHP output of
 * teach-demy-plus (classes like .tdp-my-exams, .tdp-table,
 * .tdp-become-affiliate, .tdp-conversations-list, etc.) — not
 * guessed. Scoped to is_account_page() only (see functions.php),
 * so Home and non-account pages are never touched.
 * ---------------------------------------------------------
 */

:root{
  --tdi-blue:        #2F6FE4;
  --tdi-blue-tint:   #EAF1FE;
  --tdi-green:       #1FAE6B;
  --tdi-green-tint:  #E9F9F1;
  --tdi-red:         #E1543A;
  --tdi-red-tint:    #FCEAE7;
  --tdi-amber:       #E0A22B;
  --tdi-amber-tint:  #FBF2E1;
  --tdi-purple:      #7C5CE0;
  --tdi-purple-tint: #F1EDFC;
  --tdi-ink:         #10202E;
  --tdi-ink-dim:     #5B6A78;
  --tdi-ink-faint:   #93A0AC;
  --tdi-border:      #E9ECEF;
  --tdi-bg-soft:     #F7F8FA;
  --tdi-radius-lg:   16px;
  --tdi-radius-md:   11px;
  --tdi-radius-sm:   8px;
  --tdi-shadow:      0 10px 26px -14px rgba(16,32,46,.14);
}

/* =========================================================
   0. Shared "card" look for every inner page's main block
   ========================================================= */
.woocommerce-MyAccount-content .tdp-my-exams,
.woocommerce-MyAccount-content .tdp-my-certificates,
.woocommerce-MyAccount-content .tdp-become-affiliate,
.woocommerce-MyAccount-content .tdp-affiliate-approved,
.woocommerce-MyAccount-content .tdp-affiliate-pending,
.woocommerce-MyAccount-content .tdp-affiliate-dashboard,
.woocommerce-MyAccount-content .tdp-messages-list,
.woocommerce-MyAccount-content .tdp-chat-container,
.woocommerce-MyAccount-content .woocommerce-Address,
.woocommerce-MyAccount-content .woocommerce-EditAccountForm,
body.woocommerce-endpoint-tickets .woocommerce-MyAccount-content{
  background:#fff;
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-lg);
  box-shadow:var(--tdi-shadow);
  padding:26px;
}
.woocommerce-MyAccount-content h2{
  font-size:19px;
  font-weight:700;
  color:var(--tdi-ink);
  margin-bottom:16px;
}
.woocommerce-MyAccount-content h3{
  font-size:15.5px;
  font-weight:700;
  color:var(--tdi-ink);
  margin:22px 0 12px;
}

/* =========================================================
   1. Buttons — every .tdp-btn variant used across these pages
   ========================================================= */
.woocommerce-MyAccount-content .tdp-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--tdi-blue);
  color:#fff !important;
  border:none;
  padding:10px 18px;
  border-radius:var(--tdi-radius-sm);
  font-weight:600;
  font-size:13.5px;
  text-decoration:none !important;
  cursor:pointer;
  transition:background .2s, transform .2s;
  box-shadow:0 6px 16px -8px rgba(47,111,228,.5);
}
.woocommerce-MyAccount-content .tdp-btn:hover{
  background:#1F52B8;
  transform:translateY(-1px);
}
.woocommerce-MyAccount-content .tdp-btn-primary{
  background:var(--tdi-green);
  box-shadow:0 6px 16px -8px rgba(31,174,107,.5);
}
.woocommerce-MyAccount-content .tdp-btn-primary:hover{
  background:#178F5A;
}
.woocommerce-MyAccount-content .tdp-btn-small{
  padding:7px 14px;
  font-size:12.5px;
}
/* the inline "Submit a ticket" link on the Tickets list header — since
   "Edits (3)" it opens the DEDICATED ticket-submission view
   (/my-account/tickets/?new=1) instead of the /support landing page,
   and carries the .tdp-submit-ticket class. */
body.woocommerce-endpoint-tickets .woocommerce-MyAccount-content a.tdp-submit-ticket,
body.woocommerce-endpoint-tickets .woocommerce-MyAccount-content a[href="/support"]{
  background:var(--tdi-green) !important;
  color:#fff !important;
  padding:9px 16px !important;
  border-radius:var(--tdi-radius-sm) !important;
  border:none !important;
  font-weight:600;
  font-size:13px;
  text-decoration:none !important;
  box-shadow:0 6px 16px -8px rgba(31,174,107,.5);
}

/* =========================================================
   2. Shared tables (.tdp-table is reused by Tickets, Exams,
   Certificates, Affiliate commission tiers)
   ========================================================= */
.woocommerce-MyAccount-content table.tdp-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:8px 0 6px;
}
.woocommerce-MyAccount-content table.tdp-table thead th{
  background:var(--tdi-bg-soft);
  color:var(--tdi-ink-dim);
  font-size:11.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:700;
  padding:11px 13px;
  border-bottom:1px solid var(--tdi-border);
  text-align:start;
}
.woocommerce-MyAccount-content table.tdp-table tbody td{
  padding:11px 13px;
  font-size:13px;
  border-bottom:1px solid var(--tdi-border);
  color:var(--tdi-ink);
}
.woocommerce-MyAccount-content table.tdp-table tbody tr:hover{
  background:var(--tdi-bg-soft);
}
.woocommerce-MyAccount-content table.tdp-table code{
  background:var(--tdi-bg-soft);
  padding:3px 7px;
  border-radius:6px;
  font-size:12px;
}

/* pagination (Tickets list) */
.woocommerce-MyAccount-content ul.tdp-pagination{
  display:flex;
  gap:6px;
  list-style:none;
  padding:0;
  margin:16px 0 0;
}
.woocommerce-MyAccount-content ul.tdp-pagination li a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0 8px;
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-sm);
  color:var(--tdi-ink-dim);
  font-size:12.5px;
  text-decoration:none;
}
.woocommerce-MyAccount-content ul.tdp-pagination li a.active,
.woocommerce-MyAccount-content ul.tdp-pagination li a:hover{
  background:var(--tdi-blue);
  border-color:var(--tdi-blue);
  color:#fff;
}

/* =========================================================
   3. Status pills — ticket status ("open--ticket" etc.), exam
   result labels, all built from the {value}--suffix pattern
   ========================================================= */
body.woocommerce-endpoint-tickets [class$="--ticket"]{
  display:inline-block;
  padding:4px 11px;
  border-radius:100px;
  font-size:11px;
  font-weight:700;
  background:var(--tdi-bg-soft);
  color:var(--tdi-ink-dim);
}
body.woocommerce-endpoint-tickets .open--ticket,
body.woocommerce-endpoint-tickets .pending--ticket{
  background:var(--tdi-amber-tint);
  color:#8A6414;
}
body.woocommerce-endpoint-tickets .resolved--ticket,
body.woocommerce-endpoint-tickets .closed--ticket{
  background:var(--tdi-green-tint);
  color:var(--tdi-green);
}

/* =========================================================
   4. Tickets — single ticket conversation view
   ========================================================= */
body.woocommerce-endpoint-tickets .ticket-comment{
  background:var(--tdi-bg-soft);
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-md);
  padding:16px;
  margin-bottom:14px;
}
body.woocommerce-endpoint-tickets .ticket-comment.self{
  background:var(--tdi-blue-tint);
  border-color:transparent;
}
body.woocommerce-endpoint-tickets .ticket-comment strong:first-child{
  color:var(--tdi-ink);
  font-size:13px;
}
body.woocommerce-endpoint-tickets #sts-reply-form textarea{
  width:100%;
  min-height:110px;
  border:1.5px solid var(--tdi-border);
  border-radius:var(--tdi-radius-sm);
  padding:12px;
  font-size:13.5px;
  font-family:inherit;
  margin-bottom:12px;
}
body.woocommerce-endpoint-tickets #sts-reply-form button[type="submit"]{
  background:var(--tdi-green);
  color:#fff;
  border:none;
  padding:10px 20px;
  border-radius:var(--tdi-radius-sm);
  font-weight:600;
  cursor:pointer;
  margin-top:10px;
}
body.woocommerce-endpoint-tickets .show-ticket-details{
  color:var(--tdi-blue);
  font-weight:600;
  font-size:12.5px;
  text-decoration:none;
}

/* =========================================================
   5. My Exams / My Certificates
   ========================================================= */
.woocommerce-MyAccount-content .tdp-my-exams h2,
.woocommerce-MyAccount-content .tdp-my-certificates h2{
  display:flex;
  align-items:center;
  gap:10px;
}
.woocommerce-MyAccount-content .tdp-certs-note{
  margin-top:16px;
  font-size:12.5px;
  color:var(--tdi-ink-faint);
  background:var(--tdi-bg-soft);
  border-radius:var(--tdi-radius-sm);
  padding:12px 14px;
}
.woocommerce-MyAccount-content .tdp-certs-note a{
  color:var(--tdi-blue);
  font-weight:600;
}

/* =========================================================
   6. Become an Affiliate — application form
   ========================================================= */
.woocommerce-MyAccount-content .tdp-intro{
  color:var(--tdi-ink-dim);
  font-size:13.5px;
  margin-bottom:20px;
}
.woocommerce-MyAccount-content .tdp-form-row{
  margin-bottom:16px;
}
.woocommerce-MyAccount-content .tdp-form-row label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:var(--tdi-ink-dim);
  margin-bottom:6px;
}
.woocommerce-MyAccount-content .tdp-form-row .required{
  color:var(--tdi-red);
}
.woocommerce-MyAccount-content .tdp-form input[type="text"],
.woocommerce-MyAccount-content .tdp-form input[type="email"],
.woocommerce-MyAccount-content .tdp-form input[type="url"],
.woocommerce-MyAccount-content .tdp-form textarea{
  width:100%;
  border:1.5px solid var(--tdi-border);
  border-radius:var(--tdi-radius-sm);
  padding:10px 13px;
  font-size:13.5px;
  font-family:inherit;
  transition:border-color .2s;
}
.woocommerce-MyAccount-content .tdp-form input:focus,
.woocommerce-MyAccount-content .tdp-form textarea:focus{
  border-color:var(--tdi-blue);
  outline:none;
  box-shadow:0 0 0 3px var(--tdi-blue-tint);
}
.woocommerce-MyAccount-content .tdp-form-status .tdp-success{
  background:var(--tdi-green-tint);
  color:var(--tdi-green);
  border-radius:var(--tdi-radius-sm);
  padding:10px 14px;
  margin-top:12px;
  font-size:13px;
}
.woocommerce-MyAccount-content .tdp-form-status .tdp-error{
  background:var(--tdi-red-tint);
  color:var(--tdi-red);
  border-radius:var(--tdi-radius-sm);
  padding:10px 14px;
  margin-top:12px;
  font-size:13px;
}
/* approved / pending states */
.woocommerce-MyAccount-content .tdp-affiliate-approved,
.woocommerce-MyAccount-content .tdp-affiliate-pending{
  text-align:center;
  padding:40px 26px;
}
.woocommerce-MyAccount-content .tdp-affiliate-approved h2{
  color:var(--tdi-green);
}
.woocommerce-MyAccount-content .tdp-affiliate-pending h2{
  color:var(--tdi-amber);
}

/* =========================================================
   7. Affiliate dashboard
   ========================================================= */
.woocommerce-MyAccount-content .tdp-dashboard-section{
  background:var(--tdi-bg-soft);
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-md);
  padding:20px;
  margin-bottom:20px;
}
.woocommerce-MyAccount-content .tdp-referral-link-box{
  display:flex;
  align-items:center;
  gap:12px;
  background:#fff;
  border:1px dashed var(--tdi-blue);
  border-radius:var(--tdi-radius-sm);
  padding:12px 14px;
  margin-top:10px;
}
.woocommerce-MyAccount-content .tdp-referral-link-box code{
  flex:1;
  font-size:12.5px;
  color:var(--tdi-blue);
  overflow-wrap:anywhere;
}
.woocommerce-MyAccount-content .tdp-referral-code{
  margin-top:10px;
  font-size:12.5px;
  color:var(--tdi-ink-dim);
}
.woocommerce-MyAccount-content .tdp-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:8px 0 20px;
}
.woocommerce-MyAccount-content .tdp-stat{
  background:#fff;
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-md);
  padding:16px;
  text-align:center;
}
.woocommerce-MyAccount-content .tdp-stat-num{
  font-size:22px;
  font-weight:800;
  color:var(--tdi-blue);
}
.woocommerce-MyAccount-content .tdp-stat.pending .tdp-stat-num{
  color:var(--tdi-amber);
}
.woocommerce-MyAccount-content .tdp-stat.paid .tdp-stat-num{
  color:var(--tdi-green);
}
.woocommerce-MyAccount-content .tdp-stat-label{
  font-size:11.5px;
  color:var(--tdi-ink-faint);
  margin-top:4px;
  text-transform:uppercase;
  letter-spacing:.03em;
}

/* =========================================================
   8. Messages — conversations list
   ========================================================= */
.woocommerce-MyAccount-content .tdp-conversations-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.woocommerce-MyAccount-content .tdp-conversation a{
  display:block;
  background:var(--tdi-bg-soft);
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-md);
  padding:14px 16px;
  text-decoration:none;
  transition:background .2s, border-color .2s;
}
.woocommerce-MyAccount-content .tdp-conversation:hover a{
  background:#fff;
  border-color:var(--tdi-blue);
}
.woocommerce-MyAccount-content .tdp-conversation.has-unread a{
  border-color:var(--tdi-purple);
  background:var(--tdi-purple-tint);
}
.woocommerce-MyAccount-content .tdp-conv-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:4px;
}
.woocommerce-MyAccount-content .tdp-conv-name{
  font-weight:700;
  color:var(--tdi-ink);
  font-size:14px;
}
.woocommerce-MyAccount-content .tdp-conv-unread{
  background:var(--tdi-red);
  color:#fff;
  font-size:10.5px;
  font-weight:700;
  min-width:18px;
  height:18px;
  border-radius:100px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
}
.woocommerce-MyAccount-content .tdp-conv-course{
  font-size:12.5px;
  color:var(--tdi-ink-dim);
  margin-bottom:6px;
}
.woocommerce-MyAccount-content .tdp-conv-tag{
  display:inline-block;
  margin-inline-start:8px;
  padding:2px 9px;
  border-radius:100px;
  font-size:10px;
  font-weight:700;
}
.woocommerce-MyAccount-content .tdp-tag-sub{
  background:var(--tdi-amber-tint);
  color:#8A6414;
}
.woocommerce-MyAccount-content .tdp-tag-free{
  background:var(--tdi-green-tint);
  color:var(--tdi-green);
}
.woocommerce-MyAccount-content .tdp-conv-meta{
  display:flex;
  justify-content:space-between;
  font-size:11.5px;
  color:var(--tdi-ink-faint);
}
.woocommerce-MyAccount-content .tdp-conv-expired{
  color:var(--tdi-red);
  font-weight:600;
}

/* =========================================================
   9. Messages — single chat view
   ========================================================= */
.woocommerce-MyAccount-content .tdp-chat-container{
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  height:560px;
}
.woocommerce-MyAccount-content .tdp-chat-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 20px;
  border-bottom:1px solid var(--tdi-border);
  background:var(--tdi-bg-soft);
}
.woocommerce-MyAccount-content .tdp-chat-back{
  width:32px;
  height:32px;
  border-radius:50%;
  background:#fff;
  border:1px solid var(--tdi-border);
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:var(--tdi-ink-dim);
  font-weight:700;
}
.woocommerce-MyAccount-content .tdp-chat-header h2{
  margin:0;
  font-size:15px;
}
.woocommerce-MyAccount-content .tdp-chat-body{
  flex:1;
  overflow-y:auto;
  padding:16px 20px;
  background:#fff;
}
.woocommerce-MyAccount-content .tdp-load-more{
  display:block;
  margin:0 auto 14px;
  background:var(--tdi-bg-soft);
  border:1px solid var(--tdi-border);
  border-radius:100px;
  padding:8px 16px;
  font-size:12px;
  color:var(--tdi-ink-dim);
  cursor:pointer;
}
.woocommerce-MyAccount-content .tdp-chat-footer{
  border-top:1px solid var(--tdi-border);
  padding:14px 20px;
  background:var(--tdi-bg-soft);
}
.woocommerce-MyAccount-content .tdp-ai-suggestion{
  background:var(--tdi-purple-tint);
  border-radius:var(--tdi-radius-sm);
  padding:12px 14px;
  margin-bottom:12px;
  font-size:13px;
}
.woocommerce-MyAccount-content .tdp-chat-form{
  display:flex;
  align-items:flex-end;
  gap:8px;
}
.woocommerce-MyAccount-content .tdp-attach-btn{
  width:38px;
  height:38px;
  border-radius:var(--tdi-radius-sm);
  background:#fff;
  border:1px solid var(--tdi-border);
  cursor:pointer;
  font-size:15px;
  flex-shrink:0;
}
.woocommerce-MyAccount-content #tdp-message-input{
  flex:1;
  border:1.5px solid var(--tdi-border);
  border-radius:var(--tdi-radius-sm);
  padding:10px 13px;
  font-size:13.5px;
  font-family:inherit;
  resize:none;
  background:#fff;
}
.woocommerce-MyAccount-content #tdp-message-input:focus{
  border-color:var(--tdi-blue);
  outline:none;
}
.woocommerce-MyAccount-content .tdp-message{
  max-width:72%;
  padding:10px 14px;
  border-radius:14px;
  margin-bottom:10px;
  font-size:13.5px;
  line-height:1.6;
}
.woocommerce-MyAccount-content .tdp-message.tdp-msg-own{
  background:var(--tdi-blue);
  color:#fff;
  margin-inline-start:auto;
  border-bottom-right-radius:4px;
}
.woocommerce-MyAccount-content .tdp-message.tdp-msg-other{
  background:var(--tdi-bg-soft);
  color:var(--tdi-ink);
  border-bottom-left-radius:4px;
}
.woocommerce-MyAccount-content .tdp-msg-meta{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10.5px;
  opacity:.75;
  margin-top:4px;
}
.woocommerce-MyAccount-content .tdp-message.tdp-msg-own .tdp-msg-meta{
  justify-content:flex-end;
}

/* =========================================================
   10. Addresses (edit-address) + Account details (edit-account)
   — standard WooCommerce forms
   ========================================================= */
body.woocommerce-endpoint-edit-address .woocommerce-MyAccount-content input,
body.woocommerce-endpoint-edit-address .woocommerce-MyAccount-content select,
body.woocommerce-endpoint-edit-account .woocommerce-MyAccount-content input,
body.woocommerce-endpoint-edit-account .woocommerce-MyAccount-content select{
  border:1.5px solid var(--tdi-border) !important;
  border-radius:var(--tdi-radius-sm) !important;
  padding:10px 13px !important;
  font-size:13.5px !important;
}
body.woocommerce-endpoint-edit-address .woocommerce-MyAccount-content input:focus,
body.woocommerce-endpoint-edit-account .woocommerce-MyAccount-content input:focus{
  border-color:var(--tdi-blue) !important;
  outline:none;
  box-shadow:0 0 0 3px var(--tdi-blue-tint);
}
body.woocommerce-endpoint-edit-address .woocommerce-MyAccount-content button[type="submit"],
body.woocommerce-endpoint-edit-account .woocommerce-MyAccount-content button[type="submit"]{
  background:var(--tdi-blue) !important;
  color:#fff !important;
  border:none !important;
  padding:11px 22px !important;
  border-radius:var(--tdi-radius-sm) !important;
  font-weight:600 !important;
  cursor:pointer;
}
body.woocommerce-endpoint-edit-address .woocommerce-MyAccount-content button[type="submit"]:hover,
body.woocommerce-endpoint-edit-account .woocommerce-MyAccount-content button[type="submit"]:hover{
  background:#1F52B8 !important;
}

/* =========================================================
   11. Orders — light touch (WoodMart already styles the table
   reasonably; just give it the same card frame as everything
   else for visual consistency)
   ========================================================= */
body.woocommerce-endpoint-orders .woocommerce-MyAccount-content{
  background:#fff;
  border:1px solid var(--tdi-border);
  border-radius:var(--tdi-radius-lg);
  box-shadow:var(--tdi-shadow);
  padding:26px;
}

@media(max-width:900px){
  .woocommerce-MyAccount-content .tdp-stats-grid{
    grid-template-columns:repeat(2,1fr);
  }
  .woocommerce-MyAccount-content .tdp-chat-container{
    height:70vh;
  }
}

/* =========================================================
   Round 17 — MOBILE PASS (phones)
   The global td-mobile-fix.css handles the generic stacking;
   these rules tune the inner-account widgets (stats cards,
   chat viewport height, ticket/thread rows, chart frames).
   ========================================================= */
@media (max-width:768px){
  .woocommerce-MyAccount-content .tdp-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px;
  }
  .woocommerce-MyAccount-content .tdp-stats-grid > *{
    min-width:0;padding:14px 12px !important;
  }
  .woocommerce-MyAccount-content .tdp-chat-container{
    height:calc(100vh - 170px);
    height:calc(100dvh - 170px);
  }
  .woocommerce-MyAccount-content .tdp-chart-box,
  .woocommerce-MyAccount-content .tdp-chart-wrapper{
    padding:14px 10px !important;
    min-width:0;
  }
  .woocommerce-MyAccount-content .tdp-chart-canvas{
    max-width:100% !important;
    height:auto !important;
  }
  .woocommerce-MyAccount-content .tdp-conversations-list li a{
    padding:13px 12px;
  }
}
@media (max-width:480px){
  .woocommerce-MyAccount-content .tdp-stats-grid{
    grid-template-columns:1fr !important;
  }
  .woocommerce-MyAccount-content .tdp-chat-container{
    height:calc(100vh - 150px);
    height:calc(100dvh - 150px);
  }
}

/* =========================================================
   "Edits (3)" — DARK MODE for the My Account inner pages.
   The client reported invisible text on the dark skin for the
   withdrawal/tickets/wallet tables, the wallet filter-box titles,
   and the "My Certifications" / "Messages" page titles. Root
   cause: the site's dark toggle forces the account CONTENT text
   light (teachdemy-dark-mode.css) while these white cards,
   tables and headings were only ever given LIGHT-mode colors.
   Fix: whenever dark mode is active — either our toggle
   (html[data-theme="dark"]) or Woodmart's (body.woodmart-dark) —
   every card/heading/table/label below flips to the dark pair
   (#0d2222 surfaces + #e6f2f0 text) so text is always readable.
   ========================================================= */

/* 1. The white inner-page cards become dark cards. */
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-my-exams,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-my-certificates,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-become-affiliate,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-affiliate-approved,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-affiliate-pending,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-affiliate-dashboard,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-messages-list,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-chat-container,
html[data-theme="dark"] .woocommerce-MyAccount-content .woocommerce-Address,
html[data-theme="dark"] .woocommerce-MyAccount-content .woocommerce-EditAccountForm,
html[data-theme="dark"] body.woocommerce-endpoint-tickets .woocommerce-MyAccount-content,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-new-ticket-view,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-my-exams,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-my-certificates,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-become-affiliate,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-affiliate-approved,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-affiliate-pending,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-affiliate-dashboard,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-messages-list,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-chat-container,
body.woodmart-dark .woocommerce-MyAccount-content .woocommerce-Address,
body.woodmart-dark .woocommerce-MyAccount-content .woocommerce-EditAccountForm,
body.woodmart-dark.woocommerce-endpoint-tickets .woocommerce-MyAccount-content,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-new-ticket-view{
  background:#0d2222 !important;
  border-color:#1a3030 !important;
  color:#e6f2f0 !important;
  box-shadow:0 8px 28px rgba(0,0,0,.25) !important;
}

/* 2. Page + section titles (My Certifications / Messages / Tickets /
      Exams / Affiliate dashboard…) — explicitly light on dark. */
html[data-theme="dark"] .woocommerce-MyAccount-content h1,
html[data-theme="dark"] .woocommerce-MyAccount-content h2,
html[data-theme="dark"] .woocommerce-MyAccount-content h3,
html[data-theme="dark"] .woocommerce-MyAccount-content h4,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-my-exams h2,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-my-certificates h2,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-messages-list h2,
body.woodmart-dark .woocommerce-MyAccount-content h1,
body.woodmart-dark .woocommerce-MyAccount-content h2,
body.woodmart-dark .woocommerce-MyAccount-content h3,
body.woodmart-dark .woocommerce-MyAccount-content h4,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-my-exams h2,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-my-certificates h2,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-messages-list h2{
  color:#e8f0ee !important;
  border-bottom-color:#1a3030 !important;
}

/* 3. Paragraph / muted text inside the cards. */
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-my-certificates p,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-messages-list p,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-certs-note,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-new-ticket-intro,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-my-certificates p,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-messages-list p,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-certs-note,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-new-ticket-intro{
  color:#9ab4b0 !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-certs-note,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-certs-note{
  background:#0a1f1f !important;
}

/* 4. Shared .tdp-table (tickets list, certificates, exams, tiers). */
html[data-theme="dark"] .woocommerce-MyAccount-content table.tdp-table thead th,
body.woodmart-dark .woocommerce-MyAccount-content table.tdp-table thead th{
  background:#0a1f1f !important;
  color:#9ab4b0 !important;
  border-bottom-color:#27c58b !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content table.tdp-table tbody td,
body.woodmart-dark .woocommerce-MyAccount-content table.tdp-table tbody td{
  color:#e6f2f0 !important;
  border-bottom-color:#1a3030 !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content table.tdp-table tbody tr:hover,
body.woodmart-dark .woocommerce-MyAccount-content table.tdp-table tbody tr:hover{
  background:rgba(255,255,255,.04) !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content table.tdp-table code,
body.woodmart-dark .woocommerce-MyAccount-content table.tdp-table code{
  background:#0a1f1f !important;
  color:#b9f3d7 !important;
}

/* 5. Pagination + tickets controls. */
html[data-theme="dark"] .woocommerce-MyAccount-content ul.tdp-pagination li a,
body.woodmart-dark .woocommerce-MyAccount-content ul.tdp-pagination li a{
  background:#0d2222 !important;
  border-color:#1e3f42 !important;
  color:#e6f2f0 !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content ul.tdp-pagination li a.active,
body.woodmart-dark .woocommerce-MyAccount-content ul.tdp-pagination li a.active{
  background:#27c58b !important;
  border-color:#27c58b !important;
  color:#06181a !important;
}
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-btn,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-btn{
  box-shadow:none;
}

/* 6. Ticket conversation + reply form (dark pair for the light bubbles). */
html[data-theme="dark"] body.woocommerce-endpoint-tickets .ticket-comment,
body.woodmart-dark.woocommerce-endpoint-tickets .ticket-comment{
  background:#12302e !important;
  color:#e6f2f0 !important;
}
html[data-theme="dark"] body.woocommerce-endpoint-tickets .ticket-comment.self,
body.woodmart-dark.woocommerce-endpoint-tickets .ticket-comment.self{
  background:#133a46 !important;
}
html[data-theme="dark"] body.woocommerce-endpoint-tickets #sts-reply-form textarea,
html[data-theme="dark"] body.woocommerce-endpoint-tickets #sts-reply-form input,
html[data-theme="dark"] body.woocommerce-endpoint-tickets #sts-reply-form select,
body.woodmart-dark.woocommerce-endpoint-tickets #sts-reply-form textarea,
body.woodmart-dark.woocommerce-endpoint-tickets #sts-reply-form input,
body.woodmart-dark.woocommerce-endpoint-tickets #sts-reply-form select{
  background:#0a1f1f !important;
  border-color:#1e3f42 !important;
  color:#e6f2f0 !important;
  color-scheme:dark;
}
html[data-theme="dark"] body.woocommerce-endpoint-tickets #sts-reply-form button[type="submit"],
body.woodmart-dark.woocommerce-endpoint-tickets #sts-reply-form button[type="submit"]{
  background:#27c58b !important;
  color:#06181a !important;
}
html[data-theme="dark"] body.woocommerce-endpoint-tickets .show-ticket-details,
body.woodmart-dark.woocommerce-endpoint-tickets .show-ticket-details{
  background:#0a2b28 !important;
  color:#b9f3d7 !important;
  border-color:#1e3f42 !important;
}

/* 7. Messages list (conversations). */
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-conversations-list,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-conversations-list li,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-conv-header,
html[data-theme="dark"] .woocommerce-MyAccount-content .tdp-conv-course,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-conversations-list,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-conversations-list li,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-conv-header,
body.woodmart-dark .woocommerce-MyAccount-content .tdp-conv-course{
  color:#e6f2f0 !important;
}
