/* ═══════════════════════════════════════════════════════════════════
   Module 10: Guest Passes & Registration CSS
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Guest Registration Landing Page ─── */
.wwsc-guest-register {
    max-width: 600px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wwsc-guest-header {
    text-align: center;
    padding: 2rem 1rem;
}

.wwsc-guest-badge {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.wwsc-guest-header h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    color: #1d2327;
}

.wwsc-guest-subtitle {
    color: #50575e;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ─── Form Styles ─── */
.wwsc-guest-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.wwsc-guest-step h3 {
    font-size: 1.15rem;
    color: #1d2327;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.wwsc-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.wwsc-form-field {
    flex: 1;
}

.wwsc-form-field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #50575e;
    margin-bottom: 0.3rem;
}

.wwsc-form-field input[type="text"],
.wwsc-form-field input[type="email"],
.wwsc-form-field input[type="tel"],
.wwsc-form-field input[type="password"],
.wwsc-form-field input[type="date"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.wwsc-form-field input:focus {
    outline: none;
    border-color: var(--wwsc-primary, #2271b1);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.wwsc-form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ─── Child Rows ─── */
.wwsc-child-row {
    background: #f9fafb;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.wwsc-btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #d63638;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    align-self: flex-end;
    margin-bottom: 0.25rem;
}

.wwsc-btn-icon:hover { background: #fde8e8; }

/* ─── Buttons ─── */
.wwsc-btn-primary {
    background: var(--wwsc-primary, #2271b1);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.wwsc-btn-primary:hover { background: #135e96; }
.wwsc-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.wwsc-btn-secondary {
    background: #f0f0f0;
    color: #1d2327;
    border: 1px solid #d0d5dd;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.wwsc-btn-secondary:hover { background: #e2e2e2; }
.wwsc-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.wwsc-btn-text {
    background: none;
    border: none;
    color: var(--wwsc-primary, #2271b1);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem;
}

.wwsc-btn-text:hover { text-decoration: underline; }

.wwsc-btn-small { font-size: 0.8rem; padding: 0.2rem 0.4rem; }

.wwsc-btn-danger { color: #d63638; }
.wwsc-btn-danger:hover { color: #a01c1e; }

/* ─── Marketing Opt-in ─── */
.wwsc-marketing-opt { padding-top: 0.5rem; }

.wwsc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #50575e;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.wwsc-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--wwsc-primary, #2271b1);
}

/* ─── Waiver ─── */
.wwsc-waiver-text {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.wwsc-signature-area {
    margin-bottom: 1rem;
}

.wwsc-signature-area canvas {
    display: block;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    width: 100%;
    max-width: 500px;
    touch-action: none;
}

.wwsc-sig-actions {
    margin-top: 0.5rem;
}

/* ─── Daily Pass Selection ─── */
.wwsc-pass-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.wwsc-pass-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.wwsc-pass-card:hover { border-color: var(--wwsc-primary, #2271b1); }

.wwsc-pass-card.selected {
    border-color: var(--wwsc-primary, #2271b1);
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.wwsc-pass-card h4 { margin: 0 0 0.5rem; }

.wwsc-pass-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wwsc-primary, #2271b1);
    margin: 0.5rem 0;
}

.wwsc-pass-desc {
    font-size: 0.85rem;
    color: #50575e;
}

/* ─── Success / Confetti ─── */
.wwsc-guest-success {
    text-align: center;
    padding: 2rem;
}

.wwsc-guest-success h2 {
    color: #00a32a;
}

.wwsc-guest-qr {
    margin: 1.5rem auto;
    max-width: 250px;
}

.wwsc-guest-qr-code svg {
    width: 100%;
    height: auto;
}

.wwsc-guest-tip {
    font-size: 0.85rem;
    color: #787c82;
    font-style: italic;
}

.wwsc-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.wwsc-confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: wwsc-confetti-fall 3s ease-in-out forwards;
}

@keyframes wwsc-confetti-fall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Expired Message ─── */
.wwsc-guest-expired {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

/* ─── Error/Toast ─── */
.wwsc-error {
    background: #fde8e8;
    color: #d63638;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.wwsc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.wwsc-empty {
    color: #787c82;
    font-style: italic;
    padding: 1rem 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Guest Passes My Account Panel
   ═══════════════════════════════════════════════════════════════════ */

.wwsc-guest-passes-panel {
    max-width: 700px;
}

.wwsc-gp-status-card {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border: 1px solid #c3ddf6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.wwsc-gp-remaining {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.wwsc-gp-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--wwsc-primary, #2271b1);
    line-height: 1;
}

.wwsc-gp-label {
    font-size: 1rem;
    color: #50575e;
}

.wwsc-gp-cycle {
    font-size: 0.85rem;
    color: #787c82;
    margin-top: 0.5rem;
}

.wwsc-gp-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wwsc-gp-warning {
    background: #fef8e8;
    border: 1px solid #dba617;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #6b5a00;
    margin-bottom: 1rem;
}

.wwsc-gp-form,
.wwsc-gp-qr-panel {
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.wwsc-gp-form h4,
.wwsc-gp-qr-panel h4 {
    margin: 0 0 1rem;
}

.wwsc-gp-qr-display {
    text-align: center;
    margin: 1rem 0;
}

.wwsc-gp-qr-display svg {
    max-width: 200px;
    margin: 0 auto;
}

.wwsc-gp-tip {
    font-size: 0.85rem;
    color: #787c82;
    margin-top: 0.5rem;
}

/* ─── History ─── */
.wwsc-gp-history {
    margin-top: 1.5rem;
}

.wwsc-gp-history h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.wwsc-gp-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wwsc-gp-history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.wwsc-gp-history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wwsc-gp-date {
    font-size: 0.8rem;
    color: #787c82;
}

.wwsc-gp-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wwsc-gp-status--sent       { background: #e8f4fd; color: #2271b1; }
.wwsc-gp-status--registered { background: #fef8e8; color: #996800; }
.wwsc-gp-status--redeemed   { background: #e6f6e6; color: #00a32a; }
.wwsc-gp-status--expired    { background: #f0f0f0; color: #787c82; }
.wwsc-gp-status--cancelled  { background: #fde8e8; color: #d63638; }

/* ═══════════════════════════════════════════════════════════════════
   Chaperones Panel
   ═══════════════════════════════════════════════════════════════════ */

.wwsc-chaperones-panel {
    max-width: 700px;
}

.wwsc-chap-intro {
    margin-bottom: 1.5rem;
}

.wwsc-chap-intro h3 { margin: 0 0 0.5rem; }

.wwsc-chap-intro p {
    color: #50575e;
    font-size: 0.95rem;
    line-height: 1.6;
}

.wwsc-chap-add {
    margin-bottom: 1.5rem;
}

.wwsc-chap-form {
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.wwsc-chap-note {
    font-size: 0.85rem;
    color: #50575e;
    background: #e8f4fd;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin: 0.75rem 0;
}

.wwsc-chap-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wwsc-chap-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wwsc-chap-info {
    display: flex;
    flex-direction: column;
}

.wwsc-chap-phone {
    font-size: 0.85rem;
    color: #787c82;
}

.wwsc-chap-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wwsc-chap-status {
    font-size: 0.85rem;
    font-weight: 500;
}

.wwsc-chap-status--invited  { color: #dba617; }
.wwsc-chap-status--accepted { color: #2271b1; }
.wwsc-chap-status--active   { color: #00a32a; }
.wwsc-chap-status--revoked  { color: #d63638; }

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .wwsc-form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .wwsc-gp-actions {
        flex-direction: column;
    }

    .wwsc-gp-count {
        font-size: 2.5rem;
    }

    .wwsc-chap-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .wwsc-chap-meta {
        width: 100%;
        justify-content: flex-start;
    }
}
