/* DaddyCandle Customer Account Suite — scoped responsive styles.
 * Deliberately avoids global header, footer, theme, and unrelated WooCommerce selectors.
 */
.dctcas-wrap,
.dctcas-auth-wrap {
  --dctcas-accent: #405862;
  --dctcas-accent-dark: #2f444d;
  --dctcas-brass: #9a7845;
  --dctcas-surface: #f8f6f0;
  --dctcas-ink: #20292e;
  --dctcas-muted: #59666b;
  --dctcas-border: #e4ded2;
  --dctcas-input-border: #d7d8d5;
}

.dctcas-wrap,
.dctcas-auth-wrap {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: var(--dctcas-ink);
}
.dctcas-wrap {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: clamp(8px, 1.5vw, 20px);
}
.woocommerce-account .woocommerce-MyAccount-content .dctcas-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 24px;
  padding: clamp(12px, 1.8vw, 22px);
  float: none;
}
.dctcas-auth-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 22px);
}

/* Headings and supporting copy */
.dctcas-header {
  max-width: 760px;
  margin: 0 auto clamp(18px, 2.5vw, 26px);
  text-align: center;
}
.dctcas-eyebrow {
  margin: 0 0 10px;
  color: var(--dctcas-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.dctcas-header h2 {
  margin: 0 0 12px;
  color: var(--dctcas-ink);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.dctcas-header > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: var(--dctcas-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.dctcas-auth-wrap .dctcas-header {
  margin-bottom: clamp(16px, 2.2vw, 22px);
}
/* Auth pages use the existing WordPress/Kadence page title as their single visible title. */
.dctcas-auth-wrap .dctcas-header h2 { display: none; }

/* Cards, forms and controls */
.dctcas-card {
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(18px, 2.2vw, 30px);
  border: 1px solid var(--dctcas-border);
  border-radius: 16px;
  background: var(--dctcas-surface);
  box-shadow: 0 8px 26px rgba(32, 41, 46, .045);
}
.dctcas-auth-card { max-width: 100%; }
.dctcas-form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}
.dctcas-auth-card form {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}
.dctcas-auth-card form .form-row,
.dctcas-auth-card .woocommerce-form-row,
.dctcas-auth-card .form-row { margin: 0; }
.dctcas-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}
.dctcas-field label,
.dctcas-auth-card label {
  margin: 0;
  color: var(--dctcas-ink);
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.5;
}
.dctcas-field input:not([type="file"]),
.dctcas-field textarea,
.dctcas-field select,
.dctcas-auth-card input[type="text"],
.dctcas-auth-card input[type="email"],
.dctcas-auth-card input[type="password"],
.dctcas-auth-card input[type="tel"],
.dctcas-auth-card select,
.dctcas-auth-card textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--dctcas-input-border);
  border-radius: 10px;
  background: #fff;
  color: var(--dctcas-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  box-shadow: none;
}
.dctcas-field textarea,
.dctcas-auth-card textarea {
  min-height: 120px;
  resize: vertical;
}
.dctcas-field input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: #414d52;
  font: inherit;
}
.dctcas-field input:focus,
.dctcas-field textarea:focus,
.dctcas-field select:focus,
.dctcas-auth-card input:focus,
.dctcas-auth-card select:focus,
.dctcas-auth-card textarea:focus {
  outline: 2px solid rgba(64, 88, 98, .2);
  outline-offset: 1px;
  border-color: var(--dctcas-accent);
}
.dctcas-field small,
.dctcas-footnote {
  color: #646e70;
  font-size: .83rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.dctcas-meta {
  margin: 0;
  color: #646e70;
  font-size: .84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.dctcas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.dctcas-checkbox {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.dctcas-checkbox input {
  flex: 0 0 auto;
  margin: .35em 0 0;
}
.dctcas-terms-check { margin: 2px 0; align-items: flex-start; }
.dctcas-terms-check a,
.dctcas-private-note a,
.dctcas-auth-switch a {
  color: var(--dctcas-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dctcas-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Buttons and messages */
.dctcas-button,
.dctcas-auth-card .woocommerce-button,
.dctcas-auth-card button[type="submit"],
.dctcas-auth-card input[type="submit"] {
  display: inline-flex;
  max-width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--dctcas-accent);
  border-radius: 10px;
  background: var(--dctcas-accent);
  color: #fff !important;
  font: inherit;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.dctcas-button:hover,
.dctcas-button:focus,
.dctcas-auth-card .woocommerce-button:hover,
.dctcas-auth-card button[type="submit"]:hover,
.dctcas-auth-card input[type="submit"]:hover {
  border-color: var(--dctcas-accent-dark);
  background: var(--dctcas-accent-dark);
  color: #fff !important;
}
.dctcas-button:focus-visible,
.dctcas-auth-card button[type="submit"]:focus-visible,
.dctcas-auth-card input[type="submit"]:focus-visible {
  outline: 3px solid rgba(154, 120, 69, .38);
  outline-offset: 2px;
}
.dctcas-button-secondary {
  border-color: #aeb8b9;
  background: transparent;
  color: var(--dctcas-accent-dark) !important;
}
.dctcas-button-secondary:hover,
.dctcas-button-secondary:focus {
  border-color: #aeb8b9;
  background: #edf0ef;
  color: var(--dctcas-accent-dark) !important;
}
.dctcas-success,
.dctcas-error,
.dctcas-notice {
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: .94rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.dctcas-success { border: 1px solid #b5d7bd; background: #edf6ef; color: #215c32; }
.dctcas-error { border: 1px solid #f0c0b6; background: #fff0ed; color: #8d2d20; }
.dctcas-notice { border: 1px solid #d0d9da; background: #f0f3f3; color: #33474d; }
.dctcas-auth-switch {
  margin: 18px 0 0;
  color: var(--dctcas-muted);
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}
.dctcas-auth-card .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.dctcas-auth-card .woocommerce-LostPassword { margin: 0; }
.dctcas-auth-card .woocommerce-form-login__submit { margin: 0; }
.dctcas-auth-card .woocommerce-privacy-policy-text { font-size: .9rem; line-height: 1.6; }

/* Profile and account details */
.dctcas-profile-top {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5dfd3;
}
.dctcas-avatar {
  display: block;
  width: 96px !important;
  min-width: 96px;
  height: 96px !important;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(32, 41, 46, .12);
}
.dctcas-avatar-field { flex: 1; min-width: 0; }
.dctcas-private-note {
  padding: 15px 17px;
  border-left: 3px solid var(--dctcas-brass);
  border-radius: 0 10px 10px 0;
  background: rgba(154, 120, 69, .075);
}
.dctcas-private-note p { margin: 5px 0 0; line-height: 1.6; }
.dctcas-account-privacy-page { margin-top: 8px; }
.dctcas-profile-media-section,
.dctcas-account-extension { margin: 24px 0 0; }
.dctcas-account-extension > h3 {
  margin: 0 0 12px;
  color: var(--dctcas-ink);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.35;
}
.dctcas-section-heading { max-width: 720px; margin: 0 auto 18px; text-align: center; }
.dctcas-section-heading h3 { margin: 0 0 8px; color: var(--dctcas-ink); font-size: clamp(1.2rem, 2.5vw, 1.65rem); line-height: 1.3; }
.dctcas-section-heading p { margin: 0; color: var(--dctcas-muted); line-height: 1.6; }
.dctcas-profile-card { margin-bottom: 8px; }
.dctcas-privacy-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.dctcas-privacy-actions > section { min-width: 0; padding: 20px; border: 1px solid var(--dctcas-border); border-radius: 14px; background: #fff; }
.dctcas-privacy-actions h3 { margin: 0 0 8px; color: var(--dctcas-ink); font-size: 1.12rem; }
.dctcas-privacy-actions h4 { margin: 0 0 8px; color: var(--dctcas-ink); font-size: 1.05rem; }
.dctcas-privacy-actions p { color: var(--dctcas-muted); line-height: 1.6; }
.dctcas-privacy-actions form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.dctcas-delete-card > p { line-height: 1.65; }
.dctcas-code-list code { display: inline-block; padding: 8px 11px; border: 1px solid #e5dfd3; border-radius: 7px; background: #f2efe8; overflow-wrap: anywhere; }
.dctcas-empty { padding: 28px 20px; border: 1px solid var(--dctcas-border); border-radius: 18px; background: var(--dctcas-surface); text-align: center; }
.dctcas-empty h3 { margin: 0 0 8px; color: var(--dctcas-ink); font-size: 1.25rem; }
.dctcas-empty p { max-width: 620px; margin: 0 auto 18px; color: var(--dctcas-muted); line-height: 1.6; }

/* Photo and banner media */
.dctcas-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dctcas-media-card { min-width: 0; }
.dctcas-media-card h3 { margin: 0 0 6px; color: var(--dctcas-ink); font-size: 1.2rem; line-height: 1.35; }
.dctcas-media-card > .dctcas-meta { margin: 0 0 16px; }
.dctcas-media-preview { display: flex; min-height: 150px; align-items: center; justify-content: center; box-sizing: border-box; margin: 0 0 18px; padding: 18px; border: 1px dashed var(--dctcas-input-border); border-radius: 14px; background: rgba(255, 255, 255, .72); }
.dctcas-avatar-preview { min-height: 170px; }
.dctcas-avatar-placeholder { display: flex; width: 96px; height: 96px; align-items: center; justify-content: center; border: 1px solid var(--dctcas-input-border); border-radius: 50%; background: #edf0ef; color: var(--dctcas-muted); font-size: .85rem; text-align: center; }
.dctcas-banner-placeholder { display: flex; width: 100%; min-height: 105px; align-items: center; justify-content: center; box-sizing: border-box; padding: 15px; border-radius: 10px; background: #edf0ef; color: var(--dctcas-muted); text-align: center; }
.dctcas-banner-preview,
.dctcas-banner-preview-wrap .dctcas-banner-preview { display: block; width: 100%; max-width: 680px; height: auto; max-height: 220px; border: 1px solid var(--dctcas-border); border-radius: 12px; background: #fff; object-fit: cover; }
.dctcas-media-form { gap: 14px; }
.dctcas-remove-form { margin-top: 12px; }
.dctcas-media-card .dctcas-button:disabled { opacity: .5; cursor: not-allowed; }

/* Learning content and purchased-course cards */
.dctcas-course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.dctcas-course-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--dctcas-border); border-radius: 16px; background: #fff; }
.dctcas-course-image { display: block; width: 100%; height: auto; max-height: 240px; box-sizing: border-box; padding: 12px; background: var(--dctcas-surface); object-fit: contain; }
.dctcas-course-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }
.dctcas-course-body h3 { margin: 0; color: var(--dctcas-ink); font-size: 1.08rem; line-height: 1.4; overflow-wrap: anywhere; }
.dctcas-course-body .dctcas-button { margin-top: auto; }
.dctcas-course-lesson { line-height: 1.75; overflow-wrap: anywhere; }
.dctcas-course-lesson iframe { display: block; width: 100%; max-width: 100%; min-height: 260px; margin: 18px 0; border: 0; border-radius: 12px; }
.dctcas-course-lesson img,
.dctcas-course-lesson video { max-width: 100%; height: auto; }
.dctcas-learning-content h2 { overflow-wrap: anywhere; }
.dctcas-entry-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dctcas-entry-links .dctcas-button { margin: 0; }

/* Public directory and public-profile cards; contact/private account data stays out of layout. */
.dctcas-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.dctcas-directory-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--dctcas-border); border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(32, 41, 46, .04); }
.dctcas-directory-banner { width: 100%; height: 112px; overflow: hidden; background: #edf0ef; }
.dctcas-directory-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dctcas-directory-card-inner { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 0 18px 20px; text-align: center; }
.dctcas-directory-avatar { display: block; width: 84px; height: 84px; min-width: 84px; margin: -42px auto 12px; border: 3px solid #fff; border-radius: 50%; background: #edf0ef; object-fit: cover; }
.dctcas-directory-avatar-placeholder { display: flex; align-items: center; justify-content: center; color: var(--dctcas-accent); font-size: 1.5rem; font-weight: 700; }
.dctcas-directory-card h3 { margin: 0 0 8px; color: var(--dctcas-ink); font-size: 1.08rem; line-height: 1.4; overflow-wrap: anywhere; }
.dctcas-directory-card p { margin: 0 0 16px; color: var(--dctcas-muted); font-size: .92rem; line-height: 1.6; overflow-wrap: anywhere; }
.dctcas-directory-card .dctcas-button { margin-top: auto; }
.dctcas-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 26px 0 0; }
.dctcas-pagination a,
.dctcas-pagination span { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--dctcas-input-border); border-radius: 9px; color: var(--dctcas-accent-dark); text-decoration: none; }
.dctcas-pagination .dctcas-page-current { border-color: var(--dctcas-accent); background: var(--dctcas-accent); color: #fff; }
.dctcas-public-banner { width: 100%; max-height: 340px; margin: 0 0 -34px; overflow: hidden; border-radius: 18px; background: #edf0ef; }
.dctcas-public-banner img { display: block; width: 100%; height: clamp(150px, 28vw, 340px); object-fit: cover; }
.dctcas-public-profile-card { position: relative; max-width: 860px; margin: 0 auto; text-align: center; }
.dctcas-public-profile-card h2 { margin: 8px 0 12px; color: var(--dctcas-ink); font-size: clamp(1.45rem, 3vw, 2.1rem); overflow-wrap: anywhere; }
.dctcas-public-avatar { display: block; width: 112px; height: 112px; margin: -74px auto 12px; border: 4px solid #fff; border-radius: 50%; background: #edf0ef; object-fit: cover; }
.dctcas-public-bio { max-width: 680px; margin: 0 auto 20px; color: #414d52; line-height: 1.8; overflow-wrap: anywhere; text-align: left; }
.dctcas-public-profile-card .dctcas-auth-switch { margin-top: 18px; }

/* Admin-generated markup shares the same scoped visual language where appropriate. */
.dctcas-wrap img,
.dctcas-auth-wrap img,
.dctcas-wrap iframe,
.dctcas-auth-wrap iframe { max-width: 100%; }
.dctcas-wrap :where(p, li, a, strong, span),
.dctcas-auth-wrap :where(p, li, a, strong, span) { overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .dctcas-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dctcas-wrap { max-width: 100%; }
}
@media (max-width: 760px) {
  .dctcas-media-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dctcas-media-preview { min-height: 125px; padding: 14px; }
  .dctcas-public-banner { margin-bottom: -26px; }
  .dctcas-public-banner img { height: 190px; }
}
@media (max-width: 640px) {
  .dctcas-wrap { padding: 8px; }
  .woocommerce-account .woocommerce-MyAccount-content .dctcas-wrap { max-width: 100%; padding: 8px; }
  .dctcas-auth-wrap { padding: 8px 0; }
  .dctcas-header { margin-bottom: 18px; }
  .dctcas-header h2 { font-size: clamp(1.4rem, 7vw, 1.9rem); }
  .dctcas-card { padding: 18px; border-radius: 16px; }
  .dctcas-grid,
  .dctcas-course-grid,
  .dctcas-privacy-actions,
  .dctcas-directory-grid { grid-template-columns: minmax(0, 1fr); }
  .dctcas-profile-top { align-items: flex-start; flex-direction: column; gap: 12px; }
  .dctcas-avatar { width: 82px !important; min-width: 82px; height: 82px !important; }
  .dctcas-button,
  .dctcas-course-body .dctcas-button,
  .dctcas-entry-links .dctcas-button,
  .dctcas-auth-card .woocommerce-button,
  .dctcas-auth-card button[type="submit"],
  .dctcas-auth-card input[type="submit"] { width: 100%; }
  .dctcas-entry-links { align-items: stretch; }
  .dctcas-privacy-actions form { align-items: stretch; }
  .dctcas-course-lesson iframe { min-height: 190px; }
  .dctcas-public-banner { border-radius: 14px; }
  .dctcas-public-banner img { height: 165px; }
  .dctcas-public-avatar { width: 88px; height: 88px; margin-top: -60px; }
  .dctcas-public-profile-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .dctcas-button { transition: none; }
}


/* v3.2.8: accessible password reveal controls; scoped to this plugin only. */
.dctcas-password-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.dctcas-password-control > input[type="password"],
.dctcas-password-control > input[type="text"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 3.15rem;
}
.dctcas-password-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  margin: 0;
  padding: .35rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dctcas-accent-dark, #2F444D);
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
}
.dctcas-password-toggle:hover {
  background: rgba(64, 88, 98, .08);
  color: var(--dctcas-accent-dark, #2F444D);
}
.dctcas-password-toggle:focus-visible {
  outline: 2px solid var(--dctcas-accent, #405862);
  outline-offset: 2px;
}
.dctcas-password-toggle svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
@media (max-width: 480px) {
  .dctcas-password-toggle {
    right: .35rem;
    width: 2.1rem;
    height: 2.1rem;
    min-width: 2.1rem;
  }
}



/* v3.2.9: use the saved customer profile photo when account-page avatar markup is rendered. */
.woocommerce-account img.dctcas-account-profile-avatar {
  object-fit: cover;
  border-radius: 50%;
}

/* The customer avatar must remain square even if theme CSS sets height:auto. */
body.woocommerce-account img.dctcas-account-profile-avatar {
  display: inline-block;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 48px;
  object-fit: cover !important;
  object-position: center;
  border-radius: 50% !important;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Keep account content at the same top edge as navigation, not below it. */
body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
  margin-top: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content p,
body.woocommerce-account .woocommerce-MyAccount-content li,
body.woocommerce-account .woocommerce-MyAccount-content td,
body.woocommerce-account .woocommerce-MyAccount-content th {
  overflow-wrap: anywhere;
}

body.woocommerce-account .woocommerce-MyAccount-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-content th,
body.woocommerce-account .woocommerce-MyAccount-content td {
  padding: 10px 12px;
  vertical-align: top;
}

/* Improve layout of plugin-owned pages and cards without touching their content. */
.dctcas-auth-card,
.dctcas-card,
.dctcas-profile-card,
.dctcas-media-card,
.dctcas-course-card,
.dctcas-directory-card,
.dctcas-privacy-actions > section {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.dctcas-grid,
.dctcas-media-grid,
.dctcas-course-grid,
.dctcas-directory-grid,
.dctcas-privacy-actions {
  min-width: 0;
  align-items: stretch;
}

.dctcas-field,
.dctcas-field label,
.dctcas-auth-card label,
.dctcas-meta,
.dctcas-footnote,
.dctcas-success,
.dctcas-error,
.dctcas-notice {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dctcas-button,
.dctcas-auth-card .woocommerce-button,
.dctcas-auth-card button[type="submit"],
.dctcas-auth-card input[type="submit"] {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dctcas-media-preview,
.dctcas-profile-top,
.dctcas-directory-card-inner,
.dctcas-course-body {
  min-width: 0;
  box-sizing: border-box;
}

.dctcas-banner-preview,
.dctcas-media-preview img,
.dctcas-wrap iframe,
.dctcas-auth-wrap iframe {
  max-width: 100%;
  box-sizing: border-box;
}

/* Tablet: retain every navigation item, but place navigation above content. */
@media (max-width: 1023px) {
  .dctcas-grid,
  .dctcas-privacy-actions {
    gap: 16px;
  }
}

/* Mobile: full-width fields and controls, compact gaps, no hidden options. */
@media (max-width: 640px) {
  .woocommerce-account .woocommerce-MyAccount-content .dctcas-wrap {
    padding: 10px 4px;
    margin-bottom: 18px;
  }

  .dctcas-auth-wrap {
    padding: 10px 4px;
  }

  .dctcas-card {
    padding: 16px;
    border-radius: 14px;
  }

  .dctcas-grid,
  .dctcas-media-grid,
  .dctcas-course-grid,
  .dctcas-directory-grid,
  .dctcas-privacy-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .dctcas-field input:not([type="file"]),
  .dctcas-field textarea,
  .dctcas-field select,
  .dctcas-auth-card input[type="text"],
  .dctcas-auth-card input[type="email"],
  .dctcas-auth-card input[type="password"],
  .dctcas-auth-card input[type="tel"],
  .dctcas-auth-card select,
  .dctcas-auth-card textarea {
    font-size: 16px;
  }

  .dctcas-button,
  .dctcas-course-body .dctcas-button,
  .dctcas-entry-links .dctcas-button,
  .dctcas-auth-card .woocommerce-button,
  .dctcas-auth-card button[type="submit"],
  .dctcas-auth-card input[type="submit"] {
    width: 100%;
    min-height: 46px;
  }

  .dctcas-entry-links,
  .dctcas-privacy-actions form {
    align-items: stretch;
  }

  .dctcas-media-preview {
    padding: 12px;
  }

  .dctcas-media-form,
  .dctcas-form,
  .dctcas-auth-card form {
    gap: 14px;
  }

  body.woocommerce-account .woocommerce-MyAccount-content th,
  body.woocommerce-account .woocommerce-MyAccount-content td {
    padding: 8px;
  }
}

@media (max-width: 360px) {
  .dctcas-card {
    padding: 13px;
  }
}

/* v3.2.18: consolidated My Account layout.
 * One scoped system centers profile + navigation, replaces sidebar widths,
 * keeps endpoint content in normal flow, and provides equal responsive tiles.
 */
body.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: stretch !important;
  gap: 22px !important;
  width: 100% !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 0 clamp(12px, 2vw, 28px) !important;
  box-sizing: border-box !important;
}

/* Handle a theme/plugin's intermediate 25% sidebar wrapper as well. */
body.woocommerce-account .woocommerce *:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: stretch !important;
  gap: 22px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce :has(> .woocommerce-MyAccount-navigation),
body.woocommerce-account .woocommerce :has(> .woocommerce-MyAccount-content) {
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation {
  display: block !important;
  float: none !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  clear: both !important;
  z-index: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-inline: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Center the customer avatar and username as a single identity row. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > :not(ul) {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto 12px !important;
  padding: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Ten half-tile tracks permit five equal tiles above four truly centered ones. */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  list-style: none !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li {
  display: block !important;
  grid-column: span 2 !important;
  float: none !important;
  flex: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 92px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(6) {
  grid-column: 2 / span 2 !important;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(7) {
  grid-column: 4 / span 2 !important;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(8) {
  grid-column: 6 / span 2 !important;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(9) {
  grid-column: 8 / span 2 !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 92px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 16px 14px !important;
  border: 1px solid #e4ded2 !important;
  border-radius: 14px !important;
  background: #fbfaf7 !important;
  color: #2f444d !important;
  font-size: .98rem !important;
  font-weight: 550 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  hyphens: none !important;
  box-shadow: 0 5px 18px rgba(32, 41, 46, .035) !important;
  box-sizing: border-box !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li > a:hover {
  border-color: #9a7845 !important;
  background: #f2efe8 !important;
  color: #20292e !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li.is-active > a {
  border-color: #405862 !important;
  background: #405862 !important;
  color: #fff !important;
  font-weight: 650 !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li > a:focus-visible {
  outline: 3px solid rgba(154, 120, 69, .38) !important;
  outline-offset: 2px !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
  display: block !important;
  grid-column: 1 / -1 !important;
  float: none !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  clear: both !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  line-height: 1.65;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > * {
  position: static !important;
  float: none !important;
  clear: both !important;
  inset: auto !important;
  transform: none !important;
  width: 100%;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content > :first-child {
  margin-top: 0;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content form,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-content :is(table, .woocommerce-order-details, .woocommerce-customer-details, .woocommerce-Addresses) {
  float: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .dctcas-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 12px 16px;
}

/* Keep third-party testimonial/review cards in normal content flow. */
body.woocommerce-account .woocommerce-MyAccount-content :is(
  [class*="testimonial" i], [id*="testimonial" i],
  [class*="review-form" i], [id*="review-form" i],
  [class*="review-card" i], [id*="review-card" i],
  [class*="review-container" i], [id*="review-container" i]
) {
  float: none !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: min(100%, 840px) !important;
  margin: 0 auto 20px !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) > :is(.woocommerce-notices-wrapper, .woocommerce-message, .woocommerce-error, .woocommerce-info) {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  body.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    max-width: 900px !important;
    padding: 0 18px !important;
    gap: 20px !important;
  }

  body.woocommerce-account .woocommerce *:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    max-width: 900px !important;
    gap: 20px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    max-width: 900px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    max-width: 900px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li,
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(n) {
    grid-column: auto !important;
    min-height: 84px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li > a {
    min-height: 84px !important;
    padding: 13px 10px !important;
  }
}

@media screen and (max-width: 767px) {
  body.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    padding: 0 12px !important;
    gap: 18px !important;
  }

  body.woocommerce-account .woocommerce *:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    max-width: 100% !important;
    gap: 18px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content {
    max-width: 100% !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    max-width: 100% !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li,
  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li:nth-child(n) {
    grid-column: auto !important;
    min-height: 78px !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation > ul > li > a {
    min-height: 78px !important;
    padding: 12px 10px !important;
    font-size: .92rem !important;
    line-height: 1.35 !important;
  }

  body.woocommerce-account .woocommerce .woocommerce-MyAccount-content .dctcas-wrap {
    max-width: 100% !important;
    padding: 10px 4px !important;
    margin-bottom: 18px !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content th,
  body.woocommerce-account .woocommerce-MyAccount-content td {
    padding: 8px;
  }
}

@media screen and (max-width: 360px) {
  body.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation):has(.woocommerce-MyAccount-content) {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .dctcas-card {
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-account .woocommerce-MyAccount-navigation ul > li > a {
    transition: none;
  }
}

/* v3.2.19: reduce excess whitespace below the Kadence page-title/header area.
 * This changes only the top spacing before WooCommerce My Account content;
 * navigation tiles, colors, sizes, content spacing, and all other pages remain untouched.
 */
body.woocommerce-account .content-area {
  margin-top: clamp(16px, 2vw, 28px) !important;
}

@media screen and (max-width: 767px) {
  body.woocommerce-account .content-area {
    margin-top: 12px !important;
  }
}


/* v3.2.20: course-area layout system. The existing account navigation remains untouched. */
.dctcas-learning-content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 32px;
  padding: clamp(12px, 1.8vw, 22px);
  box-sizing: border-box;
}
.dctcas-learning-content .dctcas-header { margin-bottom: clamp(18px, 2.4vw, 28px); }
.dctcas-external-course-resources {
  width: 100%;
  min-width: 0;
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: clamp(18px, 2.5vw, 26px);
  border-top: 1px solid var(--dctcas-border, #e4ded2);
  box-sizing: border-box;
}
.dctcas-course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.7vw, 20px);
}
.dctcas-course-card { min-width: 0; height: 100%; }
.dctcas-course-image { width: 100%; max-height: 220px; aspect-ratio: 16 / 10; object-fit: contain; }
.dctcas-course-body { gap: 10px; padding: clamp(14px, 1.7vw, 20px); }
.dctcas-course-body h3 { overflow-wrap: anywhere; }
.dctcas-course-lesson { width: 100%; min-width: 0; }
.dctcas-course-lesson iframe,
.dctcas-course-lesson video { max-width: 100%; }
@media screen and (min-width: 641px) and (max-width: 1179px) {
  .dctcas-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 640px) {
  .dctcas-learning-content { padding: 8px 2px; margin-bottom: 22px; }
  .dctcas-course-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dctcas-course-image { max-height: 210px; }
  .dctcas-course-body { padding: 15px; }
  .dctcas-external-course-resources { margin-top: 20px; padding-top: 18px; }
}
