/**
 * La Gritta Elementor — Booking Form Styles
 *
 * Reservation section layout, custom booking form with date picker,
 * time picker, guests counter, and submission handling.
 *
 * Migrated from la-gritta-theme.php shortcode CSS.
 * CSS variables use the --lge-* namespace.
 */

/* ==========================================================================
   Reservation Section Layout
   ========================================================================== */

.lg-reservation-section {
    padding: 128px 0;
    position: relative;
    overflow: hidden;
}

.lg-rs__watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: 20rem;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    line-height: 1;
}

.lg-rs__container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.lg-rs__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

@media (max-width: 767px) {
    .lg-reservation-section { padding: 80px 0; }
    .lg-rs__grid { grid-template-columns: 1fr; gap: 48px; }
    .lg-rs__watermark { font-size: 10rem; }
}

/* ==========================================================================
   Info Column
   ========================================================================== */

.lg-rs__info {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.lg-rs__label {
    display: block;
    color: var(--lge-primary);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.4em;
}

.lg-rs__title {
    font-family: 'Playfair Display', serif;
    font-size: 60px;
    line-height: 1.1;
    color: var(--lge-foreground);
    margin-top: 24px;
    font-weight: 400;
}

@media (min-width: 768px) {
    .lg-rs__title { font-size: 72px; }
}

.lg-rs__desc {
    color: rgba(var(--lge-foreground-rgb), .6);
    font-weight: 300;
    line-height: 1.6;
    font-size: 18px;
}

/* ==========================================================================
   Contact Items
   ========================================================================== */

.lg-rs__contacts {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lg-rs__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.lg-rs__contact-divider {
    width: 1px;
    height: 48px;
    background: rgba(201, 169, 110, 0.3);
    flex-shrink: 0;
}

.lg-rs__contact-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--lge-muted-fg);
    margin-bottom: 4px;
}

.lg-rs__contact-value {
    font-size: 18px;
    color: var(--lge-foreground);
    line-height: 1.4;
}

a.lg-rs__contact-link {
    text-decoration: none;
    transition: color 0.3s;
}

a.lg-rs__contact-link:hover { color: var(--lge-accent); }

/* ==========================================================================
   Success State
   ========================================================================== */

.lg-rs__success {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    padding: 48px 24px;
    position: relative;
    z-index: 10;
}

.lg-rs__success-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: var(--lge-foreground);
    margin-bottom: 24px;
    font-weight: 400;
}

.lg-rs__success-text {
    color: rgba(var(--lge-foreground-rgb), .8);
    font-weight: 300;
    font-size: 18px;
    max-width: 500px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.lg-rs__success-phone {
    color: var(--lge-muted-fg);
    font-size: 14px;
}

a.lg-rs__success-link {
    color: var(--lge-accent);
    text-decoration: none;
    transition: color 0.3s;
}

a.lg-rs__success-link:hover { color: var(--lge-primary); }

/* ==========================================================================
   Booking Form Card
   ========================================================================== */

.lg-booking-form {
    background: var(--lge-surface);
    padding: 32px;
    border: 1px solid rgba(var(--lge-foreground-rgb), .05);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    position: relative;
}

@media (min-width: 768px) {
    .lg-booking-form { padding: 48px; }
}

.lg-bf { display: flex; flex-direction: column; gap: 24px; }

.lg-bf__row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .lg-bf__row--2col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Labels
   ========================================================================== */

.lg-bf label {
    display: block;
    color: var(--lge-muted-fg);
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .25em;
    margin-bottom: 8px;
}

/* ==========================================================================
   Inputs & Textarea
   ========================================================================== */

.lg-bf input[type="text"],
.lg-bf input[type="email"],
.lg-bf input[type="tel"],
.lg-bf textarea {
    width: 100%;
    background: transparent;
    color: var(--lge-foreground);
    border: 1px solid rgba(var(--lge-foreground-rgb), .1);
    border-radius: 0;
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    box-sizing: border-box;
    transition: border-color .3s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.lg-bf input[type="text"]:hover,
.lg-bf input[type="email"]:hover,
.lg-bf input[type="tel"]:hover,
.lg-bf textarea:hover {
    border-color: rgba(239, 122, 35, .5);
}

.lg-bf input[type="text"]:focus,
.lg-bf input[type="email"]:focus,
.lg-bf input[type="tel"]:focus,
.lg-bf textarea:focus {
    border-color: var(--lge-primary);
}

.lg-bf textarea { resize: vertical; }

/* ==========================================================================
   Error State
   ========================================================================== */

.lg-bf--error {
    border-color: rgba(248, 113, 113, .6) !important;
}

.lg-bf__error {
    color: #f87171;
    font-size: 11px;
    margin-top: 4px;
    min-height: 0;
    animation: lgbfFadeIn .2s ease;
}

.lg-bf__error:empty { display: none; }

@keyframes lgbfFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Date Picker
   ========================================================================== */

.lg-datepicker { position: relative; }

.lg-datepicker__trigger {
    width: 100% !important;
    background: transparent !important;
    color: var(--lge-muted-fg);
    border: 1px solid rgba(var(--lge-foreground-rgb), .1) !important;
    border-radius: 0 !important;
    padding: 12px !important;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color .3s;
    box-sizing: border-box;
}

.lg-datepicker__trigger:hover { border-color: rgba(239, 122, 35, .5); }
.lg-datepicker__trigger:focus { border-color: var(--lge-primary); outline: none; }
.lg-datepicker__text--selected { color: var(--lge-foreground); }
.lg-datepicker__trigger svg { color: var(--lge-muted-fg); flex-shrink: 0; }

/* Date Picker Popup */
.lg-datepicker__popup {
    display: none;
    position: absolute;
    z-index: 50;
    margin-top: 8px;
    left: 0;
    background: var(--lge-surface);
    border: 1px solid rgba(var(--lge-foreground-rgb), .1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    padding: 12px;
}

.lg-dp__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}

.lg-dp__prev, .lg-dp__next {
    background: none;
    border: none;
    color: var(--lge-muted-fg);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    transition: color .2s;
    position: absolute;
}

.lg-dp__prev { left: 0; }
.lg-dp__next { right: 0; }
.lg-dp__prev:hover, .lg-dp__next:hover { color: var(--lge-accent); }

.lg-dp__title {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    color: var(--lge-foreground);
}

.lg-dp__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    text-align: center;
}

.lg-dp__weekdays span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--lge-muted-fg);
    font-weight: 400;
    padding: 4px 0;
}

.lg-dp__grid {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    margin-top: 4px;
}

.lg-dp__empty { width: 36px; height: 36px; }

.lg-dp__day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 2px;
    color: var(--lge-foreground);
    font-size: 12px;
    cursor: pointer;
    transition: background .15s;
}

.lg-dp__day:hover { background: rgba(var(--lge-foreground-rgb), .1); }

.lg-dp__day--disabled {
    opacity: .3;
    cursor: not-allowed;
}

.lg-dp__day--disabled:hover { background: transparent; }

.lg-dp__day--today {
    box-shadow: inset 0 0 0 1px rgba(201, 169, 110, .5);
    border-radius: 2px;
}

.lg-dp__day--selected {
    background: var(--lge-primary) !important;
    color: #fff !important;
}

/* ==========================================================================
   Time Picker
   ========================================================================== */

.lg-timepicker { position: relative; }

.lg-timepicker__trigger {
    width: 100% !important;
    background: transparent !important;
    color: var(--lge-muted-fg);
    border: 1px solid rgba(var(--lge-foreground-rgb), .1) !important;
    border-radius: 0 !important;
    padding: 12px !important;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color .3s;
    box-sizing: border-box;
}

.lg-timepicker__trigger:disabled { cursor: default; opacity: .6; }
.lg-timepicker__trigger:not(:disabled):hover { border-color: rgba(239, 122, 35, .5); }
.lg-timepicker__trigger:focus { border-color: var(--lge-primary); outline: none; }
.lg-timepicker__text--selected { color: var(--lge-foreground); }
.lg-timepicker__trigger svg { color: var(--lge-muted-fg); flex-shrink: 0; }

.lg-timepicker__dropdown {
    display: none;
    flex-direction: column;
    position: absolute;
    z-index: 50;
    margin-top: 8px;
    left: 0;
    right: 0;
    background: var(--lge-surface);
    border: 1px solid rgba(var(--lge-foreground-rgb), .1);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    max-height: 200px;
    overflow-y: auto;
}

.lg-tp__option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--lge-foreground);
    cursor: pointer;
    transition: background .15s, color .15s;
}

.lg-tp__option:hover { background: rgba(var(--lge-foreground-rgb), .1); }

.lg-tp__option--active {
    color: var(--lge-primary);
    background: rgba(var(--lge-foreground-rgb), .05);
}

.lg-tp__option--disabled {
    opacity: .3;
    cursor: not-allowed;
}

/* ==========================================================================
   Guests Counter
   ========================================================================== */

.lg-guests {
    display: flex;
    border: 1px solid rgba(var(--lge-foreground-rgb), .1);
    transition: border-color .3s;
}

.lg-guests:hover { border-color: rgba(239, 122, 35, .5); }
.lg-guests:focus-within { border-color: var(--lge-primary); }

.lg-guests__btn {
    background: none !important;
    border: none !important;
    padding: 12px 16px !important;
    color: var(--lge-foreground);
    cursor: pointer;
    transition: background .15s;
    display: flex !important;
    align-items: center;
    border-radius: 0 !important;
}

.lg-guests__btn:hover { background: rgba(var(--lge-foreground-rgb), .1); }
.lg-guests__btn:disabled { opacity: .3; cursor: not-allowed; }
.lg-guests__btn:disabled:hover { background: transparent; }

.lg-guests__display { flex: 1; display: flex; align-items: center; justify-content: center; }

.lg-guests__input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    text-align: center;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--lge-foreground);
    outline: none;
    padding: 12px 0;
}

.lg-guests__input::placeholder { color: var(--lge-muted-fg); }

/* ==========================================================================
   Submit Button
   ========================================================================== */

.lg-bf__submit {
    display: block !important;
    width: 100% !important;
    background: var(--lge-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 16px !important;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: .25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s;
}

.lg-bf__submit:hover { background: #ea580c !important; }
.lg-bf__submit:disabled { opacity: .5; cursor: not-allowed; }

/* ==========================================================================
   Notes Below Button
   ========================================================================== */

.lg-bf__notes {
    margin-top: 16px;
    text-align: center;
}

.lg-bf__phone-note {
    font-size: 11px;
    color: rgba(138,138,138,.7);
    font-weight: 300;
    line-height: 1.6;
}

.lg-bf__confirmation-note {
    font-size: 11px;
    color: rgba(138,138,138,.7);
    font-weight: 300;
    font-style: normal;
    line-height: 1.6;
    margin-top: 8px;
}

/* ==========================================================================
   Error / Success Messages
   ========================================================================== */

.lg-bf__msg--error {
    color: #f87171;
    font-size: 12px;
    text-align: center;
}
