/* ════════════════════════════════════════════════════════════════
   prenotazioni.efestival.it — Stylesheet premium
   ════════════════════════════════════════════════════════════════ */

:root {
    --primary: #fec027;
    --primary-dark: #f59e0b;
    --primary-light: #fff8e0;
    --primary-glow: rgba(254, 192, 39, 0.4);
    --accent: #1a1a2e;
    --accent-soft: #2d2d4a;
    --indigo: #6366f1;
    --bg: #fafaf5;
    --bg-warm: #fdfaf3;
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-soft: #4b5563;
    --text-muted: #9ca3af;
    --border: #e7e5e0;
    --border-soft: #f0ede5;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --shadow-sm: 0 1px 2px rgba(26,26,46,0.04), 0 1px 3px rgba(26,26,46,0.06);
    --shadow: 0 4px 24px rgba(26,26,46,0.06), 0 2px 6px rgba(26,26,46,0.04);
    --shadow-lg: 0 16px 40px rgba(26,26,46,0.08), 0 4px 12px rgba(26,26,46,0.04);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(254, 192, 39, 0.10), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.06), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(254, 192, 39, 0.05), transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 580px;
    margin: 0 auto;
    padding: 32px 18px 24px;
    animation: fadeInUp .6s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand */
.brand { text-align: center; margin-bottom: 28px; }
.brand-logo {
    width: 88px; height: 88px;
    margin-bottom: 14px;
    display: inline-block;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(254, 192, 39, 0.25));
    animation: floatLogo 4s ease-in-out infinite;
}
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.brand-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.7px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-tag { font-size: 14px; color: var(--text-soft); margin-top: 6px; font-weight: 500; }

/* Steps bar */
.steps-bar { display: flex; gap: 8px; margin-bottom: 22px; padding: 0 4px; }
.steps-bar .step {
    flex: 1;
    height: 5px;
    background: var(--border-soft);
    border-radius: 999px;
    transition: background .4s;
}
.steps-bar .step.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px var(--primary-glow);
}
.steps-bar .step.done {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

/* Card */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
}
.card-section { display: none; animation: slideIn .35s cubic-bezier(.4, 0, .2, 1); }
.card-section.active { display: block; }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

h1 { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -0.4px; }
.lead { color: var(--text-soft); font-size: 14.5px; margin-bottom: 26px; line-height: 1.5; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 11px; font-weight: 800; color: var(--text);
    text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px;
}
.form-group label .req { color: var(--error); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid var(--border); border-radius: 14px;
    font-size: 15px; font-family: inherit;
    background: var(--surface); color: var(--text);
    transition: var(--transition);
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #d1d5db; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); background: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(254, 192, 39, 0.2);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* OTP */
.otp-input {
    text-align: center; font-size: 36px; font-weight: 800;
    letter-spacing: 14px; padding: 20px 16px !important;
    font-family: -apple-system, "SF Mono", "Monaco", monospace;
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
}
.otp-info {
    background: linear-gradient(135deg, #f3f4f6 0%, #fafaf5 100%);
    border-radius: 14px; padding: 14px 16px;
    font-size: 13px; color: var(--text-soft); margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--border-soft);
}
.otp-resend { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-soft); }
.otp-resend a, .otp-back a {
    color: var(--text); font-weight: 700; text-decoration: none; cursor: pointer;
    border-bottom: 1.5px solid transparent; transition: var(--transition);
}
.otp-resend a:hover, .otp-back a:hover { border-bottom-color: var(--primary); }
.otp-back { text-align: center; margin-top: 14px; font-size: 13px; }
.otp-back a { color: var(--text-muted); font-weight: 600; }

/* Fasce orarie */
.fasce-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fascia-btn {
    padding: 16px 12px; border: 1.5px solid var(--border); border-radius: 14px;
    background: var(--surface); cursor: pointer; text-align: center;
    font-family: inherit; transition: var(--transition);
    position: relative; overflow: hidden;
}
.fascia-btn:hover:not(:disabled) {
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.fascia-btn.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-2px);
}
.fascia-btn.selected::before {
    content: '✓'; position: absolute; top: 8px; right: 10px;
    width: 22px; height: 22px;
    background: var(--primary); color: var(--text);
    border-radius: 50%; font-weight: 800; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.fascia-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.fascia-nome { font-weight: 800; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.fascia-orario { font-size: 12px; color: var(--text-soft); font-weight: 600; letter-spacing: 0.3px; }

/* Coperti */
.coperti-control {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-warm); border-radius: 14px;
    padding: 6px; border: 1.5px solid var(--border);
}
.coperti-btn {
    width: 46px; height: 46px; border-radius: 10px;
    border: none; background: var(--surface); cursor: pointer;
    font-size: 22px; font-weight: 800; color: var(--text);
    transition: var(--transition); box-shadow: var(--shadow-sm);
}
.coperti-btn:hover { background: var(--primary-light); transform: scale(1.05); }
.coperti-btn:active { transform: scale(0.95); }
.coperti-display { flex: 1; text-align: center; font-size: 28px; font-weight: 800; color: var(--text); padding: 4px 0; }

/* Cauzione */
.cauzione-alert {
    background: linear-gradient(135deg, var(--warning-bg) 0%, #fff7d6 100%);
    border: 1.5px solid #f59e0b; border-radius: 14px;
    padding: 14px 16px; margin-top: 10px;
    font-size: 13.5px; color: #92400e; display: none;
    line-height: 1.5; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}
.cauzione-alert.show {
    display: flex; gap: 10px; align-items: flex-start; animation: slideIn .35s;
}

/* Submit */
.btn-submit {
    width: 100%; padding: 17px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text); border: none; border-radius: 16px;
    font-size: 16px; font-weight: 800; cursor: pointer;
    transition: var(--transition); margin-top: 10px;
    box-shadow: 0 6px 20px var(--primary-glow);
    letter-spacing: 0.2px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden;
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--primary-glow);
}
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-submit .spinner { display: none; }
.btn-submit.loading .spinner { display: inline-block; }
.btn-submit.loading .label { display: none; }

.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid var(--text);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Banner chatbot */
.chatbot-banner {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #2d2d4a 100%);
    color: white; padding: 16px 18px; border-radius: var(--radius);
    margin-bottom: 18px; text-decoration: none;
    transition: var(--transition); box-shadow: var(--shadow);
    position: relative; overflow: hidden;
}
.chatbot-banner::before {
    content: ''; position: absolute;
    top: -50%; right: -20%; width: 200px; height: 200px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}
.chatbot-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.chatbot-banner-icon {
    width: 44px; height: 44px;
    background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
    box-shadow: 0 4px 14px var(--primary-glow);
    position: relative; z-index: 1;
}
.chatbot-banner-text { flex: 1; position: relative; z-index: 1; }
.chatbot-banner-title { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.chatbot-banner-tag { font-size: 12.5px; color: rgba(255,255,255,0.7); font-weight: 500; }
.chatbot-banner-arrow { font-size: 20px; opacity: 0.6; transition: var(--transition); position: relative; z-index: 1; }
.chatbot-banner:hover .chatbot-banner-arrow { opacity: 1; transform: translateX(3px); }

/* Alert */
.alert {
    padding: 14px 16px; border-radius: 14px;
    font-size: 14px; margin-bottom: 18px;
    display: flex; align-items: flex-start; gap: 10px;
    line-height: 1.45; animation: slideIn .3s;
}
.alert-err { background: var(--error-bg); color: #991b1b; border: 1px solid #fca5a5; }
.alert-ok  { background: var(--success-bg); color: #166534; border: 1px solid #6ee7b7; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border: 1px solid #93c5fd; }

/* Result */
.result-icon {
    width: 96px; height: 96px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px; position: relative;
    animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}
.result-icon::after {
    content: ''; position: absolute; inset: -8px;
    border-radius: 50%; border: 3px solid transparent;
    animation: ringPulse 1.5s ease-out infinite;
}
@keyframes popIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes ringPulse {
    0% { transform: scale(1); opacity: 0.6; border-color: var(--success); }
    100% { transform: scale(1.3); opacity: 0; border-color: var(--success); }
}
.result-icon.ok { background: linear-gradient(135deg, var(--success-bg) 0%, #bbf7d0 100%); color: var(--success); }
.result-icon.err { background: linear-gradient(135deg, var(--error-bg) 0%, #fecaca 100%); color: var(--error); }
.result-icon svg { width: 48px; height: 48px; }
.result-card { text-align: center; }
.result-info {
    background: linear-gradient(135deg, #fafaf5 0%, #fff 100%);
    border-radius: 16px; padding: 20px; margin: 24px 0;
    text-align: left; border: 1px solid var(--border-soft);
}
.result-info div {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; font-size: 14.5px;
    border-bottom: 1px dashed var(--border-soft);
}
.result-info div:last-child { border-bottom: none; }
.result-info div span:first-child { color: var(--text-soft); font-weight: 500; }
.result-info div span:last-child { font-weight: 700; color: var(--text); }
.btn-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; color: var(--text-soft); text-decoration: none;
    font-size: 14px; font-weight: 600; padding: 10px 18px;
    border-radius: 999px; transition: var(--transition);
}
.btn-link:hover { color: var(--text); background: var(--bg-warm); }

/* Verified badge */
.verified-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--success-bg) 0%, #bbf7d0 100%);
    color: var(--success); padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

/* Icone */
.icon { width: 16px; height: 16px; vertical-align: -2px; display: inline-block; flex-shrink: 0; }
.icon-lg { width: 48px; height: 48px; }
.icon-sm { width: 12px; height: 12px; }

/* Footer */
.footer {
    margin-top: 36px; padding: 26px 18px 18px;
    text-align: center; color: var(--text-soft); font-size: 13.5px; line-height: 1.7;
}
.footer-divider {
    width: 80px; height: 2px; margin: 0 auto 22px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 999px;
}
.footer-restaurant {
    font-weight: 800; color: var(--text); font-size: 16px;
    margin-bottom: 8px; letter-spacing: -0.2px;
}
.footer-description {
    margin-bottom: 18px; color: var(--text-soft);
    max-width: 400px; margin-left: auto; margin-right: auto; font-size: 13.5px;
}
.footer-info {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 18px; align-items: center;
}
.footer-info a, .footer-info span {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-soft); text-decoration: none;
    font-size: 13.5px; padding: 6px 14px;
    border-radius: 999px; transition: var(--transition);
}
.footer-info a:hover { color: var(--text); background: var(--bg-warm); }
.footer-info svg { width: 14px; height: 14px; color: var(--primary-dark); }
.footer-copyright {
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px; color: var(--text-muted);
}
.footer-copyright a { color: var(--text-muted); text-decoration: none; }

/* Mobile */
@media (max-width: 480px) {
    .container { padding: 24px 14px 16px; }
    .card { padding: 26px 22px; border-radius: 20px; }
    .brand-logo { width: 76px; height: 76px; }
    .brand-name { font-size: 24px; }
    h1 { font-size: 22px; }
    .otp-input { font-size: 28px; letter-spacing: 10px; }
    .form-row { flex-direction: column; gap: 0; }
    .fasce-grid { grid-template-columns: repeat(2, 1fr); }
}
