@import url("icons.css");

:root {
    --header-bg: #0a0a0a;
    --gold-primary: #D4AF37;
    --gold-shiny: #FFD700;
    --text-main: #e5e5e5;
    --default-black: #000;
    --form-bg-color: #1a1a1a;
    --electric-blue: #003399;
    --brand-guestin: #ffffff;
    --card-bg: #111;
    --bg-color: #0a0a0a;
    --border-color: #333;
    --text-muted: #888;
    --input-bg: #1a1a1a;
    --font-main: 'Roboto Condensed', sans-serif;
    --section-bg: rgba(10, 10, 10, 0.85);
    --hero-bg-color: rgba(10, 10, 10, 0.50);
}

.text-gold {
    color: var(--gold-primary);
}

.text-shiny {
    color: var(--gold-shiny);
}

.text-main {
    color: var(--text-main);
}

.container { 
    max-width: 1000px; 
    margin: auto; 
    margin-top: 2rem; 
}

.location-url { 
    font-family: var(--font-main); 
    color: var(--gold-primary); 
    font-size: 1rem; 
    margin-bottom: 1.5rem; 
    display: block; 
}

label { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }

h1 { color: var(--gold-shiny); margin-bottom: 2rem; font-size: 2.2rem; }

h2 { color: var(--text-muted); font-weight: 300; margin-top: 0; font-size: 1.3rem; }

p.subtitle { color: var(--text-muted); margin: 0.5rem 0 0 0; }

a {
    color: var(--gold-primary);
    text-decoration: none; 
    transition: all 0.2s ease;
}

a:visited {
    color: var(--gold-primary);       
}

a:hover {
    color: var(--gold-shiny);       
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

a:active {
    color: var(--gold-shiny);
    text-shadow: 0 0 8px var(--gold-shiny), 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(0.98);
}

.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 500px;
    max-width: 90vw;
}

.flash-toast {
    background-color: #121212;
    color: #e5e5e5;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-left: 4px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInFade 0.4s forwards;
    position: relative;
    font-size: 1.1rem;
}

.flash-gold {
    border-left-color: var(--gold-primary);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.45) 0%, rgba(18,18,18,1) 5%);
}

.flash-red {
    border-left-color: #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.75) 0%, rgba(18,18,18,1) 30%);
}

.flash-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    padding: 0 5px;
}
.flash-close:hover { color: white; }

@keyframes slideInFade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutSlide {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.form-group:has(input:required) label::after,
.form-group:has(select:required) label::after{
    content: " *";
    color: #dc3545;
    font-weight: bold;
    margin-left: 4px;
}

.required-label::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
    margin-left: 4px;
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #333;
    border-top: 5px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #d4af37;
    font-family: sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.scroll-target {
    scroll-margin-top: calc(var(--header-height, 70px) + 20px);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted, #888);
    margin-top: 0px;
    margin-bottom: 1rem;
    font-weight: 100;
    transition: color 0.3s ease;
}

.char-counter.limit-reached {
    color: #ff4444;
    animation: pulse-limit 0.3s ease-in-out;
}

/* Campo a lunghezza esatta completato (input con data-counter-complete,
   es. codice OTP): verde, senza animazione. */
.char-counter.complete {
    color: #28a745;
    font-weight: 400;
}

@keyframes pulse-limit {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

input::-ms-reveal,
input::-ms-clear {
    display: none !important;
}

.settings-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 210px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
}

.settings-nav-item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: var(--text-muted, #888);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}
.settings-nav-item:hover {
    background: rgba(212, 175, 55, 0.06);
    color: var(--text-main);
}
.settings-nav-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
    font-weight: 700;
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.settings-section { display: none; }
.settings-section.active {
    display: block;
    animation: settingsFadeIn 0.15s ease;
}
@keyframes settingsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
        gap: 1rem;
    }
    .settings-nav {
        flex-direction: row;
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        border-bottom: 1px solid var(--border-color, #333);
        padding-bottom: 0.5rem;
        position: static;
    }
    .settings-nav-item {
        flex-shrink: 0;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 6px 6px 0 0;
    }
    .settings-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--gold-primary);
    }
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    flex: 1;
    border: 2px solid var(--border-color, #333);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.radio-option:has(input:checked) {
    border-color: var(--gold-primary, #d4af37);
    background: rgba(212, 175, 55, 0.05);
}

.radio-option input[type="radio"] {
    accent-color: var(--gold-primary, #d4af37);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.radio-option .radio-label {
    font-weight: 600;
    font-size: 1rem;
}

.radio-option .radio-desc {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    margin-top: 2px;
}

.business-fields {
    display: none;
    border-top: 1px solid var(--border-color, #333);
    padding-top: 1.25rem;
    margin-top: 0.25rem;
}

.business-fields.visible { display: block; }

.business-fields label .required { color: var(--gold-primary, #d4af37); }

