/*
 * Email Preferences page (/email-preferences/) — templates/email-preferences.php
 * Enqueued by aha_prefs_styles() in inc/email-preferences.php (v1.0.0).
 * Reuses the theme's .card-method / .radio_wapper radio-card pattern and
 * brand palette (#3F0E40 purple, #79577A borders, #FFFAF5 warm white).
 */

.aha-prefs-wrap {
    max-width: 860px;
    margin: 0 auto;
}

/* Options in a 2x2 grid on desktop; submit spans both columns. The honeypot
   is position:absolute so it never occupies a cell. Single column on mobile. */
.aha-prefs-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.aha-prefs-form .card-method.aha-prefs-option {
    margin: 0;
    height: 100%;
}
.aha-prefs-option .radio_wapper {
    height: 100%;
    box-sizing: border-box;
}
.aha-prefs-submit {
    grid-column: 1 / -1;
}
@media (max-width: 700px) {
    .aha-prefs-form {
        grid-template-columns: 1fr;
    }
}
.aha-prefs-wrap h2 {
    margin-bottom: 10px;
}
.aha-prefs-intro {
    margin-bottom: 30px;
    color: #5D4060;
}

/* Result notices */
.aha-prefs-notice {
    padding: 16px 20px;
    border-radius: 5px;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.5;
}
.aha-prefs-notice--success {
    background: #FFFAF5;
    border: 1px solid #3F0E40;
    color: #3F0E40;
}
.aha-prefs-notice--error {
    background: #fdf3f2;
    border: 1px solid #9c2b23;
    color: #9c2b23;
}
.aha-prefs-notice--info {
    background: #FFFAF5;
    border: 0.8px solid #79577A;
    color: #5D4060;
}

/* Option cards (theme .card-method overlay-input pattern) */
.aha-prefs-option .radio_wapper {
    justify-content: flex-start;
}
.aha-prefs-option-body h6 {
    margin-bottom: 0;
}
.aha-prefs-option-body p {
    font-size: 15px;
    color: #5D4060;
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Frequency selector — hidden until its card is chosen (CSS-only reveal).
   z-index lifts the pills above the card's full-size invisible radio. */
.aha-prefs-freq {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    position: relative;
    z-index: 2;
}
.card-method input:checked ~ .radio_wapper .aha-prefs-freq {
    display: flex;
}
.aha-prefs-pill {
    position: relative;
    margin-bottom: 0;
    cursor: pointer;
}
.aha-prefs-pill input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    cursor: pointer;
}
.aha-prefs-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0.8px solid #79577A;
    border-radius: 5px;
    background: #fff;
    color: #3F0E40;
    font-size: 16px;
    font-weight: 500;
}
.aha-prefs-pill input:checked + span {
    background: #3F0E40;
    border-color: #3F0E40;
    color: #fff;
}
.aha-prefs-freq-note {
    font-size: 14px;
    color: #5D4060;
}

/* Honeypot — off-screen, not display:none (bots skip display:none fields) */
.aha-prefs-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.aha-prefs-submit {
    margin-top: 10px;
}

@media (max-width: 480px) {
    .aha-prefs-submit .btn {
        width: 100%;
        padding: 9px 20px;
    }
    .aha-prefs-notice {
        font-size: 15px;
    }
}
