/* Embed form — no Odoo header/footer */
body.o_embed_body {
    margin: 0;
    padding: 0;
    background: #f7f8fc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
}

#embed_wrap {
    padding: 0;
}

.reg-form-container {
    max-width: 540px;
    margin: 24px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

/* Header */
.reg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 6px 14px 6px 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}
.reg-back-link i {
    font-size: 11px;
}
.reg-back-link:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    text-decoration: none;
    transform: translateX(-2px);
}
.reg-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    padding: 28px 28px 20px;
}
.reg-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}
.reg-header p {
    margin: 4px 0;
    font-size: 14px;
    opacity: 0.9;
}
.reg-header i { margin-right: 6px; }

/* Sections */
.form-section {
    padding: 20px 28px;
    border-bottom: 1px solid #f0f0f5;
}
.form-section:last-child { border-bottom: none; }
.form-section h3 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

/* Form groups */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}
.req { color: #ef4444; }

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
    background: #fafafa;
}
.form-group input:focus,
.form-group select:focus {
    border-color: #4f46e5;
    background: #fff;
}
.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
}

.field-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* Single-ticket read-only display (shown instead of the dropdown when an
   event has only one ticket type — the ticket is auto-selected). */
.reg-ticket-single-name {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    background: #f3f4f6;
    color: #374151;
}

/* Discount row */
.discount-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.flex-grow { flex: 1; }
.discount-row .form-group { margin-bottom: 0; }
.btn-apply {
    padding: 10px 18px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.btn-apply:hover { background: #4338ca; }
.btn-apply:disabled { background: #9ca3af; cursor: not-allowed; }

.discount-result {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}
.discount-result.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.discount-result.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Price summary */
.price-summary { background: #fafbff; }
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 15px;
}
.total-row {
    border-top: 2px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 17px;
}
.text-success { color: #16a34a; }
.free-badge {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background: #f0fdf4;
    border: 2px dashed #16a34a;
    border-radius: 8px;
    color: #15803d;
    font-weight: 600;
    font-size: 15px;
}

/* Register button */
.btn-register {
    width: 100%;
    padding: 14px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.1s;
}
.btn-register:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-1px);
}
.btn-register:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

.form-note {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 12px;
}

/* Spinner */
.spinner, .spinner-large {
    border: 3px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.spinner { width: 18px; height: 18px; }
.spinner-large {
    width: 40px; height: 40px;
    border-color: rgba(79,70,229,0.3);
    border-top-color: #4f46e5;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading overlay */
#loading_overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 12px;
}
.loading-box {
    text-align: center;
    color: #4f46e5;
    font-weight: 500;
    font-size: 15px;
}

/* Thank you */
.thankyou-box {
    text-align: center;
    padding: 48px 28px;
}
.success-icon { font-size: 56px; margin-bottom: 16px; }
.thankyou-box h2 { color: #16a34a; margin-bottom: 8px; }
.booking-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    margin-top: 20px;
    text-align: left;
    font-size: 15px;
}
.booking-summary p { margin: 6px 0; }

.reg-next-attendee-msg {
    margin-top: 24px;
    font-size: 13px;
    color: #94a3b8;
}
.ata-secondary-btn {
    margin-top: 10px;
    background: transparent;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ata-secondary-btn:hover { background: #eef2ff; }


@media (max-width: 560px) {
    .reg-form-container { margin: 0; border-radius: 0; box-shadow: none; }
    .form-section, .reg-header { padding: 18px 16px; }
}
