/* ==========================================================
   CDS Journey redesign — CTA + link interaction system
   LOCKED. Hover ≠ Focus. No purple visited. No hover outlines.

   Classes:
     .rd-cta              base (resets visited / outline on :focus)
     .rd-cta--primary     gold fill CTA (Start Preparing →)
     .rd-cta--secondary   white + navy border
     .rd-cta--ghost        transparent utility
     .rd-cta--text         editorial / Explore … → with olive progress line

   Also: .rd-link, .rd-icon-btn (shared primitives)
   ========================================================== */

/* ---- Shared focus / visited resets for CTA family ---- */

.rd-cta,
.rd-cta:link,
.rd-cta:visited {
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rd-cta:focus {
    outline: none;
}

.rd-cta:focus-visible {
    outline: var(--rd-focus-ring-width, 2px) solid var(--rd-focus-ring-color, #1A2B4C);
    outline-offset: var(--rd-cta-focus-offset, 3px);
}

.rd-cta__arrow {
    display: inline-block;
    transition: transform 180ms ease;
}

/* ---- 1. Primary gold CTA ---- */

.rd-cta--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: var(--rd-radius-btn, 11px);
    background: var(--rd-action-primary-bg, #D4AF37);
    color: var(--rd-action-primary-text, #1D1D1F);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none;
    transition:
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.rd-cta--primary:link,
.rd-cta--primary:visited {
    color: var(--rd-action-primary-text, #1D1D1F);
    background: var(--rd-action-primary-bg, #D4AF37);
}

.rd-cta--primary:hover {
    background: var(--rd-action-primary-hover-bg, #C49F28);
    color: var(--rd-action-primary-text, #1D1D1F);
    border: none;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 29, 31, 0.1);
}

.rd-cta--primary:hover .rd-cta__arrow,
.rd-cta--primary:hover > [aria-hidden="true"] {
    transform: translateX(3px);
}

.rd-cta--primary:active {
    background: var(--rd-action-primary-active-bg, #B08D1F);
    color: var(--rd-action-primary-text, #1D1D1F);
    transform: translateY(0);
    box-shadow: none;
}

.rd-cta--primary:disabled,
.rd-cta--primary[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* ---- 2. Text / editorial CTA (Explore … →) ---- */

.rd-cta--text {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0 6px;
    border: none;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 180ms ease;
}

.rd-cta--text:link,
.rd-cta--text:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-cta--text::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36%;
    height: 2px;
    background: var(--rd-color-olive, #4B5320);
    transform: scaleX(1);
    transform-origin: left center;
    transition: width 200ms ease;
}

.rd-cta--text:hover {
    color: var(--rd-color-olive, #4B5320);
    outline: none;
}

.rd-cta--text:hover::after {
    width: 100%;
}

.rd-cta--text:hover .rd-cta__arrow,
.rd-cta--text:hover > [aria-hidden="true"] {
    transform: translateX(3px);
}

.rd-cta--text:active {
    color: var(--rd-color-olive-hover, #3C4319);
}

.rd-cta--text:active::after {
    width: 100%;
}

/* ---- 3. Secondary button ---- */

.rd-cta--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--rd-color-navy, #1A2B4C);
    border-radius: var(--rd-radius-btn, 11px);
    background: var(--rd-color-white, #FFFFFF);
    color: var(--rd-color-navy, #1A2B4C);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.rd-cta--secondary:link,
.rd-cta--secondary:visited {
    color: var(--rd-color-navy, #1A2B4C);
    background: var(--rd-color-white, #FFFFFF);
}

.rd-cta--secondary:hover {
    background: var(--rd-color-navy, #1A2B4C);
    color: var(--rd-color-white, #FFFFFF);
    border-color: var(--rd-color-navy, #1A2B4C);
    outline: none;
}

.rd-cta--secondary:active {
    background: #142038;
    border-color: #142038;
    color: var(--rd-color-white, #FFFFFF);
}

/* ---- 4. Ghost / utility ---- */

.rd-cta--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--rd-color-navy, #1A2B4C);
    font-family: var(--rd-font-body, "Inter", Arial, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease;
}

.rd-cta--ghost:link,
.rd-cta--ghost:visited {
    color: var(--rd-color-navy, #1A2B4C);
}

.rd-cta--ghost:hover {
    background: var(--rd-surface-default, #F8F9FB);
    color: var(--rd-color-olive, #4B5320);
    outline: none;
}

.rd-cta--ghost:active {
    background: var(--rd-border-subtle, #DDE2E6);
    color: var(--rd-color-olive-hover, #3C4319);
}

/* ---- Legacy aliases kept for existing markup ---- */

.rd-link {
    color: var(--rd-interactive-default, #1A2B4C);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 150ms ease;
}

.rd-link:link,
.rd-link:visited {
    color: var(--rd-interactive-default, #1A2B4C);
}

.rd-link:hover {
    color: var(--rd-interactive-hover, #4B5320);
    outline: none;
}

.rd-link:active {
    color: var(--rd-interactive-active, #3C4319);
}

.rd-link:focus {
    outline: none;
}

.rd-link:focus-visible {
    outline: var(--rd-focus-ring-width, 2px) solid var(--rd-focus-ring-color, #1A2B4C);
    outline-offset: var(--rd-focus-ring-offset, 2px);
}

.rd-link--quiet {
    text-decoration: none;
}

.rd-link--quiet:hover {
    text-decoration: underline;
}

.rd-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--rd-radius-sm, 8px);
    background: transparent;
    color: var(--rd-interactive-default, #1A2B4C);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}

.rd-icon-btn:hover {
    background: var(--rd-surface-default, #F8F9FB);
    color: var(--rd-interactive-hover, #4B5320);
    outline: none;
}

.rd-icon-btn:active {
    background: var(--rd-border-subtle, #DDE2E6);
    color: var(--rd-interactive-active, #3C4319);
}

.rd-icon-btn:focus {
    outline: none;
}

.rd-icon-btn:focus-visible {
    outline: var(--rd-focus-ring-width, 2px) solid var(--rd-focus-ring-color, #1A2B4C);
    outline-offset: var(--rd-focus-ring-offset, 2px);
}

.rd-icon-btn:disabled,
.rd-icon-btn[aria-disabled="true"] {
    color: var(--rd-disabled-text, #ADB5BD);
    background: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

.rd-icon-btn--sm {
    width: 32px;
    height: 32px;
}
