/* Retention modal — matches the reskinned account dashboard: sharp corners,
   Espresso buttons, Instrument Serif headline. Button hierarchy is
   retention-first: the safe actions (Skip / Keep) dominate; Pause/Cancel is a
   quiet text link. */
#ycwc-cancel-modal {
    --yp-espresso: #473B37;
    --yp-juniper: #286841;
    --yp-ivory: #F5F5F2;
    --yp-fawn: #D9D6D0;
    --yp-onyx: #221F1B;
    --yp-body-muted: #6F6A64;
    --yp-font-serif: 'Instrument Serif', Georgia, serif;
    --yp-font-sans: 'Montserrat', sans-serif;

    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: var(--yp-font-sans);
}

body.ycwc-modal-open { overflow: hidden; }

#ycwc-cancel-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(34, 31, 27, 0.45);
}

#ycwc-cancel-modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1.5px solid var(--yp-fawn);
    border-radius: 0;
    padding: 48px 44px 40px;
    max-width: 540px;
    width: calc(100% - 32px);
    box-shadow: 0 18px 50px rgba(34, 31, 27, 0.24);
    text-align: left;
    box-sizing: border-box;
}

.ycwc-cancel-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    font-size: 28px;
    color: var(--yp-espresso);
    cursor: pointer;
}

/* Headline — Instrument Serif display */
#ycwc-cancel-modal-box h2 {
    font-family: var(--yp-font-serif);
    font-size: 40px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--yp-onyx);
    margin: 0 0 18px;
}

.ycwc-cancel-modal-body {
    font-family: var(--yp-font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--yp-body-muted);
    margin: 0 0 24px;
}

/* "Heads up" deadline warning — onyx-bordered to match the dashboard notice */
.ycwc-cancel-modal-heads-up {
    font-family: var(--yp-font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--yp-onyx);
    background: #fff;
    border: 1.5px solid var(--yp-onyx);
    border-radius: 0;
    padding: 16px 18px;
    margin: 0 0 20px;
}

.ycwc-cancel-modal-heads-up strong { color: var(--yp-onyx); font-weight: 600; }

/* Reassurance / retention box — Ivory fill, Juniper accent bar */
.ycwc-cancel-modal-retention {
    font-family: var(--yp-font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--yp-espresso);
    background: var(--yp-ivory);
    border: 1px solid var(--yp-fawn);
    border-left: 3px solid var(--yp-juniper);
    border-radius: 0;
    padding: 16px 18px;
    margin: 0 0 28px;
}

.ycwc-cancel-modal-retention strong { color: var(--yp-juniper); font-weight: 600; }

.ycwc-cancel-modal-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

/* Shared button shape (sharp corners, dashboard scale) */
#ycwc-cancel-skip,
#ycwc-cancel-go-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0 28px;
    font-family: var(--yp-font-sans);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

/* PRIMARY — "Skip a week instead": filled Espresso, top of the stack */
#ycwc-cancel-skip {
    order: 1;
    font-weight: 500;
    color: #fff !important;
    background: var(--yp-espresso);
    border: 1.5px solid var(--yp-espresso);
}

#ycwc-cancel-skip:hover,
#ycwc-cancel-skip:focus-visible {
    background: var(--yp-onyx);
    border-color: var(--yp-onyx);
}

/* SECONDARY — "Keep my subscription active": outlined Espresso */
#ycwc-cancel-go-back {
    order: 2;
    font-weight: 600;
    color: var(--yp-espresso);
    background: #fff;
    border: 1.5px solid var(--yp-fawn);
    align-self: stretch;
}

#ycwc-cancel-go-back:hover,
#ycwc-cancel-go-back:focus-visible {
    border-color: var(--yp-espresso);
}

/* DE-EMPHASIZED — "Pause/Cancel My Subscription": quiet text link */
#ycwc-cancel-confirm {
    order: 3;
    align-self: center;
    margin-top: 2px;
    background: none;
    border: none;
    padding: 6px 8px;
    font-family: var(--yp-font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--yp-body-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 180ms ease;
}

#ycwc-cancel-confirm:hover,
#ycwc-cancel-confirm:focus-visible {
    color: var(--yp-espresso);
}

@media screen and (max-width: 480px) {
    #ycwc-cancel-modal-box { padding: 40px 24px 32px; }
    #ycwc-cancel-modal-box h2 { font-size: 32px; }
    .ycwc-cancel-modal-body { font-size: 15px; }
}
