/* ============================================================
   Email Readings Plugin — Brand-aligned stylesheet
   Aligned with branwell-price.php design system.

   Palette
     #4169A8  — primary (buttons, accents, active states)
     #1E3F7A  — deep emphasis
     #EBF0F8  — light blue tint (pills, selected bg)
     #c5d3e8  — blue border
     #f8fafd  — featured / header bg
     #e0e0e0  — hairline borders, grid separators
     #ebebeb  — soft dividers
     #555 / #666 / #777 / #888 — text greys

   Type
     Body:    Arial, Helvetica, sans-serif
     Display: Georgia, serif  (italic for callouts)
   ============================================================ */


/* ---- page wrapper ------------------------------------------- */
.er-form-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 4rem;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    color: #666;
    line-height: 1.6;
    box-sizing: border-box;
}
.er-form-container *,
.er-form-container *::before,
.er-form-container *::after {
    box-sizing: border-box;
}

/* ---- preamble ---------------------------------------------- */
.er-preamble {
    margin-bottom: 2.5rem;
}

.er-price-intro {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    background: #EBF0F8;
    color: #4169A8;
    margin: 0 0 1.5rem;
}
.er-price-intro strong { font-weight: 700; }

.er-preamble p {
    color: #777;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 1rem;
}

.er-reading-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}
.er-reading-type-info {
    background: #fff;
    padding: 28px 30px;
}
.er-reading-type-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
    line-height: 1.65;
}
.er-reading-type-info strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 18px !important;
    font-weight: 700;
    color: #1E3F7A;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* ---- progress bar ------------------------------------------- */
.er-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 3rem;
    padding: 0;
    max-width: 520px;
}
.er-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #EBF0F8;
    color: #4169A8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    border: 1px solid #c5d3e8;
    transition: all 0.2s ease;
}
.er-progress-dot.active {
    background: #4169A8;
    color: #fff;
    border-color: #4169A8;
    box-shadow: 0 0 0 4px rgba(65, 105, 168, 0.12);
}
.er-progress-dot.done {
    background: #1E3F7A;
    color: #fff;
    border-color: #1E3F7A;
}
.er-progress-line {
    flex: 1;
    height: 2px;
    background: #EBF0F8;
    transition: background 0.2s ease;
    min-width: 30px;
}
.er-progress-line.done {
    background: #1E3F7A;
}


/* ---- step shell --------------------------------------------- */
.er-step {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    padding: 40px 44px;
    margin-bottom: 2rem;
}
.er-step-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ebebeb;
}
.er-step-header h2 {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1E3F7A;
    letter-spacing: 0.02em;
    margin: 0 0 8px;
    line-height: 1.3;
    text-transform: none;
}
.er-step-description {
    font-family: Georgia, serif;
    font-size: 15px;
    font-style: italic;
    color: #888;
    margin: 0;
    line-height: 1.6;
}


/* ---- step 1: agent grid ------------------------------------- */
.er-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}
.er-agent-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 18px 20px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.er-agent-card:hover {
    border-color: #c5d3e8;
    background: #f8fafd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65, 105, 168, 0.08);
}
.er-agent-card.selected {
    border-color: #4169A8;
    background: #f8fafd;
    box-shadow: 0 0 0 3px rgba(65, 105, 168, 0.12);
}
.er-agent-card.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4169A8 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'><path d='M6.5 11.5L3 8l1.4-1.4L6.5 8.7l5.1-5.1L13 5z'/></svg>") center/12px no-repeat;
}
.er-agent-image {
    width: 160px !important;
    height: 160px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 auto 16px !important;
    display: block !important;
    border: 2px solid #EBF0F8 !important;
}
.er-agent-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #EBF0F8;
    color: #4169A8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    margin: 0 auto 16px;
    text-transform: uppercase;
}
.er-agent-card h3 {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #555 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}


/* ---- step 2: reading types ---------------------------------- */
.er-reading-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.er-reading-option {
    background: #fff;
    padding: 36px 32px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.er-reading-option:hover {
    background: #f8fafd;
}
.er-reading-option.selected {
    background: #f8fafd;
    box-shadow: inset 0 0 0 2px #4169A8;
    z-index: 1;
}
.er-reading-option.selected::after {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4169A8 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'><path d='M6.5 11.5L3 8l1.4-1.4L6.5 8.7l5.1-5.1L13 5z'/></svg>") center/13px no-repeat;
}
.er-option-price {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    color: #1E3F7A;
    line-height: 1;
}
.er-option-title {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #555;
    margin-top: 4px;
    line-height: 1.3;
}
.er-option-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin-top: 2px;
}


/* ---- step 3: form ------------------------------------------- */
.er-booking-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #f8fafd;
    border: 1px solid #c5d3e8;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.er-summary-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    background: #EBF0F8;
    color: #4169A8;
}

.er-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.er-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}
.er-form-row .er-form-group { margin-bottom: 0; }

.er-form-group label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 8px;
}
.er-form-group input[type="text"],
.er-form-group input[type="email"],
.er-form-group input[type="tel"],
.er-form-group select,
.er-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.er-form-group select {
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%234169A8'><path d='M6 8L0 0h12z'/></svg>") right 14px center/10px no-repeat;
    padding-right: 38px;
}
.er-form-group textarea {
    min-height: 110px;
    resize: vertical;
    font-family: Arial, Helvetica, sans-serif;
}
.er-form-group input:focus,
.er-form-group select:focus,
.er-form-group textarea:focus {
    outline: none;
    border-color: #4169A8;
    box-shadow: 0 0 0 3px rgba(65, 105, 168, 0.12);
}

.er-help-text {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin: 6px 0 0;
    line-height: 1.5;
}
.er-char-count {
    font-size: 11px;
    color: #888;
    margin-top: 6px;
    text-align: right;
    letter-spacing: 0.02em;
}

.er-questions-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ebebeb;
}


/* ---- step 4: confirmation ----------------------------------- */
.er-confirmation-details {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.er-confirmation-section {
    padding: 24px 28px;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
}
.er-confirmation-section:last-child { border-bottom: none; }
.er-confirmation-section h3 {
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #4169A8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.er-selected-psychic,
.er-reading-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.er-psychic-name,
.er-reading-type {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #555;
}
.er-reading-price {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1E3F7A;
}
.er-personal-details,
.er-additional-info {
    display: grid;
    gap: 10px;
}
.er-detail-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    align-items: baseline;
    font-size: 14px;
}
.er-detail-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
}
.er-detail-value {
    color: #555;
    word-break: break-word;
}
.er-questions-summary {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.er-question-item {
    background: #f8fafd;
    border-left: 3px solid #4169A8;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}
.er-question-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4169A8;
    margin-bottom: 6px;
}
.er-question-text {
    display: block;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    font-family: Georgia, serif;
    font-style: italic;
}

.er-total-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: #f8fafd;
    border: 1px solid #c5d3e8;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.er-total-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4169A8;
}
.er-total-price {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: 700;
    color: #1E3F7A;
    line-height: 1;
}

.er-paypal-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 1.5rem;
    min-height: 60px;
}
#paypal-button-container { min-height: 45px; }

.er-success-message {
    text-align: center;
    padding: 24px;
    background: #f0f9f4;
    border: 1px solid #b8dfc7;
    border-radius: 12px;
}
.er-success-message h3 {
    font-family: Georgia, serif;
    color: #2d6a4f;
    margin: 0 0 8px;
    font-size: 20px;
}
.er-success-message p {
    color: #555;
    margin: 0;
    font-size: 14px;
}


/* ---- buttons ------------------------------------------------ */
.er-step-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.er-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 12px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    text-decoration: none;
}
.er-btn-next {
    background: #4169A8;
    color: #fff;
    margin-left: auto;
}
.er-btn-next:hover:not(:disabled) {
    background: #1E3F7A;
    color: #fff;
}
.er-btn-next:disabled {
    background: #c5d3e8;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}
.er-btn-back {
    background: #fff;
    color: #4169A8;
    border: 1px solid #c5d3e8;
}
.er-btn-back:hover {
    background: #EBF0F8;
    color: #1E3F7A;
}
/* When only the NEXT button is in a step (step 1) */
.er-step > .er-btn-next:only-of-type { display: block; margin-left: auto; }


/* ---- responsive --------------------------------------------- */
@media (max-width: 768px) {
    .er-form-container { padding: 0 16px 3rem; }

    .er-reading-info { grid-template-columns: 1fr; }
    .er-reading-type-info { padding: 22px 22px; }

    .er-step { padding: 28px 22px; }
    .er-step-header h2 { font-size: 19px; }

    .er-progress-bar { max-width: 100%; }
    .er-progress-dot { width: 30px; height: 30px; font-size: 13px; }
    .er-progress-line { min-width: 12px; }

    .er-agents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .er-agent-card { padding: 18px 12px 16px; }
    .er-agent-image,
    .er-agent-placeholder { width: 120px; height: 120px; }

    .er-reading-types { grid-template-columns: 1fr; }
    .er-reading-option { padding: 26px 22px; }
    .er-option-price { font-size: 32px; }

    .er-form-row { grid-template-columns: 1fr; gap: 0; }
    .er-form-row .er-form-group { margin-bottom: 18px; }

    .er-confirmation-section { padding: 20px 20px; }
    .er-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .er-total-section { padding: 20px 22px; }
    .er-total-price { font-size: 30px; }

    .er-step-buttons { gap: 10px; }
    .er-btn { padding: 11px 22px; font-size: 12px; }
}

@media (max-width: 480px) {
    .er-agents-grid { grid-template-columns: 1fr 1fr; }
    .er-step-buttons { flex-direction: column-reverse; }
    .er-btn { width: 100%; }
    .er-btn-next { margin-left: 0; }
}
