/* ==========================================================================
   AABPS Picnic Registration - Frontend Styling
   ========================================================================== */

:root {
    --aabps-primary: #0056b3;
    --aabps-primary-dark: #003d80;
    --aabps-secondary: #00875a;
    --aabps-accent-orange: #e65100;
    --aabps-bg-light: #f8fafc;
    --aabps-border: #e2e8f0;
    --aabps-text-main: #1e293b;
    --aabps-text-muted: #64748b;
    --aabps-radius: 12px;
    --aabps-shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --aabps-shadow-md: 0 6px 18px rgba(0,0,0,0.08);
    --aabps-shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
}

.aabps-picnic-container {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--aabps-text-main);
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.aabps-picnic-container * {
    box-sizing: border-box;
}

/* Event Hero Header */
.aabps-event-hero {
    background: linear-gradient(135deg, #0b3c68 0%, #0056b3 60%, #00875a 100%);
    border-radius: var(--aabps-radius);
    padding: 35px 30px;
    color: #ffffff;
    text-align: center;
    box-shadow: var(--aabps-shadow-md);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.aabps-event-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.aabps-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.aabps-hero-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #ffffff;
    line-height: 1.25;
}

.aabps-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    font-size: 15px;
}

.aabps-hero-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 14px;
    border-radius: 8px;
}

/* Step Wizard Sections */
.aabps-step-section {
    background: #ffffff;
    border: 1px solid var(--aabps-border);
    border-radius: var(--aabps-radius);
    padding: 35px 30px;
    box-shadow: var(--aabps-shadow-md);
    margin-bottom: 30px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f1f5f9;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--aabps-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-header-text h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--aabps-text-main);
}

.step-header-text p {
    margin: 3px 0 0 0;
    color: var(--aabps-text-muted);
    font-size: 14px;
}

.aabps-change-cat-btn {
    margin-left: auto;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--aabps-text-main);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aabps-change-cat-btn:hover {
    background: #e2e8f0;
    color: var(--aabps-primary);
}

/* Category Grid */
.aabps-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.aabps-cat-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--aabps-radius);
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.aabps-cat-card:hover {
    border-color: var(--aabps-primary);
    transform: translateY(-4px);
    box-shadow: var(--aabps-shadow-lg);
}

.aabps-cat-card.featured {
    border-color: var(--aabps-secondary);
    background: linear-gradient(to bottom, #f0fdf4, #ffffff);
}

.cat-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-green { background: #22c55e; color: #ffffff; }

.cat-icon {
    font-size: 32px;
    margin: 15px 0 10px 0;
    color: var(--aabps-primary);
}

.aabps-cat-card.featured .cat-icon {
    color: var(--aabps-secondary);
}

.aabps-cat-card h4 {
    margin: 0 0 8px 0;
    font-size: 19px;
    font-weight: 700;
}

.cat-sub {
    font-size: 13px;
    color: var(--aabps-text-muted);
    margin: 0 0 15px 0;
    min-height: 38px;
}

.cat-pricing-list {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    margin-top: auto;
}

.cat-pricing-list .highlight-price {
    font-size: 16px;
    color: var(--aabps-accent-orange);
}

.aabps-select-btn {
    width: 100%;
    background: var(--aabps-primary);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.aabps-cat-card.featured .aabps-select-btn {
    background: var(--aabps-secondary);
}

.aabps-select-btn:hover {
    background: var(--aabps-primary-dark);
}

/* Member Verification Box */
.aabps-verify-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 25px;
}

.verify-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--aabps-primary);
    margin-bottom: 6px;
}

.verify-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.aabps-verify-box p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #475569;
}

.verify-input-group {
    display: flex;
    gap: 10px;
}

.verify-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.aabps-btn-verify {
    background: var(--aabps-primary);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.verify-feedback {
    margin-top: 10px;
    font-size: 13px;
}

.verify-feedback .msg-success {
    color: #15803d;
    font-weight: 600;
}

.verify-feedback .msg-error {
    color: #b91c1c;
    font-weight: 600;
}

/* Tier Selection */
.aabps-tier-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 8px;
}

.tier-card {
    border: 2px solid var(--aabps-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    position: relative;
}

.tier-card input[type="radio"] {
    display: none;
}

.tier-card.active {
    border-color: var(--aabps-primary);
    background: #f0f7ff;
    box-shadow: 0 0 0 1px var(--aabps-primary);
}

.tier-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.tier-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--aabps-text-main);
}

.tier-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--aabps-primary);
}

.tier-desc {
    font-size: 12px;
    color: var(--aabps-text-muted);
}

/* Non-Member Counter */
.aabps-nm-counter-box {
    background: #f8fafc;
    border: 1px solid var(--aabps-border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 8px;
}

.nm-counter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nm-label-col strong {
    display: block;
    font-size: 15px;
}

.nm-label-col span {
    font-size: 13px;
    color: var(--aabps-text-muted);
}

.nm-counter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-btn-qty {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nm-btn-qty:hover {
    background: #f1f5f9;
    border-color: var(--aabps-primary);
}

.nm-counter-controls input {
    width: 55px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

/* Form Fields */
.aabps-form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
}

.aabps-section-sub {
    margin: 28px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.aabps-section-sub h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--aabps-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.aabps-row-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.aabps-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.aabps-field input,
.aabps-field textarea,
.aabps-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aabps-field input:focus,
.aabps-field textarea:focus {
    outline: none;
    border-color: var(--aabps-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.aabps-btn-secondary {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aabps-btn-secondary:hover {
    background: #e2e8f0;
}

/* Payment & Summary */
.aabps-summary-card {
    background: #f8fafc;
    border: 1px solid var(--aabps-border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--aabps-text-muted);
}

.summary-line.total-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 18px;
    font-weight: 700;
    color: var(--aabps-text-main);
}

.summary-line .total-price {
    color: var(--aabps-primary);
}

/* Stripe Card Box */
.aabps-stripe-box {
    margin-bottom: 22px;
}

.stripe-card-input {
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stripe-card-input.StripeElement--focus {
    border-color: var(--aabps-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.card-errors-alert {
    margin-top: 8px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

/* Submit Area */
.aabps-submit-area {
    text-align: center;
    margin-top: 25px;
}

.aabps-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00875a 0%, #0056b3 100%);
    color: #ffffff;
    border: none;
    padding: 15px 24px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 135, 90, 0.3);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.aabps-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 135, 90, 0.4);
}

.aabps-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.aabps-secure-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--aabps-text-muted);
}

/* Success Screen & Ticket Badge */
.aabps-success-card {
    text-align: center;
    padding: 20px 10px;
}

.success-icon {
    font-size: 60px;
    color: #16a34a;
    margin-bottom: 15px;
}

.aabps-success-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.success-lead {
    color: var(--aabps-text-muted);
    max-width: 550px;
    margin: 0 auto 25px auto;
    font-size: 15px;
}

.aabps-ticket-badge {
    background: #ffffff;
    border: 2px dashed #0056b3;
    border-radius: 14px;
    max-width: 480px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    box-shadow: var(--aabps-shadow-md);
    text-align: left;
}

.ticket-top {
    background: #0056b3;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-org {
    font-weight: 700;
    font-size: 15px;
}

.ticket-number-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ticket-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ticket-detail label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 3px;
}

.ticket-detail strong {
    font-size: 14px;
    color: #1e293b;
}

.ticket-detail .paid-amount {
    color: #16a34a;
    font-size: 16px;
}

.ticket-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.aabps-btn-primary {
    background: var(--aabps-primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media print {
    body * { visibility: hidden; }
    .aabps-ticket-badge, .aabps-ticket-badge * { visibility: visible; }
    .aabps-ticket-badge { position: absolute; left: 0; top: 0; width: 100%; border: 2px solid #000; }
}

@media (max-width: 640px) {
    .step-header { flex-direction: column; align-items: flex-start; }
    .aabps-change-cat-btn { margin-left: 0; width: 100%; text-align: center; }
    .ticket-body { grid-template-columns: 1fr; }
    .success-actions { flex-direction: column; }
}
