/* ============================================
   Nestia Booking Plugin — Frontend Styles
   Branded: #c9a96e (gold) / #0a1628 (dark navy)
   ============================================ */

:root {
    --nestia-gold:        #c9a96e;
    --nestia-gold-dark:   #b8935a;
    --nestia-gold-light:  #e8d5b0;
    --nestia-navy:        #0a1628;
    --nestia-navy-mid:    #162840;
    --nestia-navy-light:  #1d3d55;
    --nestia-white:       #ffffff;
    --nestia-off-white:   #f8f6f2;
    --nestia-grey:        #e8e4de;
    --nestia-text:        #2c2c2c;
    --nestia-text-light:  #666666;
    --nestia-available:   #2e7d32;
    --nestia-booked:      #c62828;
    --nestia-selected:    #c9a96e;
    --nestia-radius:      6px;
    --nestia-shadow:      0 2px 12px rgba(10, 22, 40, 0.12);
}

/* ============================================
   BASE ELEMENTS
   ============================================ */

.nestia-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--nestia-radius);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
    line-height: 1;
}

.nestia-btn:active {
    transform: translateY(1px);
}

.nestia-btn-primary {
    background: var(--nestia-gold);
    color: var(--nestia-navy) !important;
}

.nestia-btn-primary:hover {
    background: var(--nestia-gold-dark);
    color: var(--nestia-navy) !important;
    text-decoration: none;
}

.nestia-btn-secondary {
    background: transparent;
    color: var(--nestia-text);
    border: 1px solid var(--nestia-grey);
}

.nestia-btn-secondary:hover {
    background: var(--nestia-grey);
    text-decoration: none;
}

.nestia-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--nestia-grey);
    border-radius: var(--nestia-radius);
    font-size: 14px;
    color: var(--nestia-text);
    background: var(--nestia-white);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.nestia-input:focus {
    outline: none;
    border-color: var(--nestia-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.nestia-textarea {
    resize: vertical;
    min-height: 80px;
}

.nestia-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: var(--nestia-radius);
    padding: 12px 16px;
    color: #c62828;
    font-size: 14px;
    margin: 12px 0;
}

/* ============================================
   AVAILABILITY CALENDAR
   ============================================ */

.nestia-calendar-wrap {
    font-family: inherit;
    max-width: 100%;
}

.nestia-calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.nestia-calendar-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--nestia-text-light);
}

.nestia-calendar-legend span::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.nestia-legend-available::before { background: var(--nestia-available); }
.nestia-legend-booked::before    { background: var(--nestia-booked); opacity: 0.35; }
.nestia-legend-selected::before  { background: var(--nestia-gold); }

.nestia-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.nestia-month {
    background: var(--nestia-white);
    border: 1px solid var(--nestia-grey);
    border-radius: var(--nestia-radius);
    overflow: hidden;
    box-shadow: var(--nestia-shadow);
}

.nestia-month-header {
    background: var(--nestia-navy);
    color: var(--nestia-gold);
    text-align: center;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.nestia-month-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--nestia-navy-mid);
}

.nestia-month-days-header span {
    text-align: center;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--nestia-gold-light);
    letter-spacing: 0.3px;
}

.nestia-month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px;
    gap: 3px;
}

.nestia-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 4px;
    cursor: default;
    transition: background 0.15s, color 0.15s;
    font-weight: 400;
}

.nestia-day-empty {
    background: transparent;
}

.nestia-day-past {
    color: var(--nestia-grey);
    cursor: not-allowed;
}

.nestia-day-available {
    background: rgba(46, 125, 50, 0.1);
    color: var(--nestia-available);
    cursor: pointer;
    font-weight: 500;
}

.nestia-day-available:hover {
    background: var(--nestia-available);
    color: var(--nestia-white);
}

.nestia-day-booked {
    background: rgba(198, 40, 40, 0.08);
    color: rgba(198, 40, 40, 0.4);
    cursor: not-allowed;
    text-decoration: line-through;
}

.nestia-day-selected {
    background: var(--nestia-gold) !important;
    color: var(--nestia-navy) !important;
    font-weight: 700;
}

.nestia-day-in-range {
    background: rgba(201, 169, 110, 0.2);
    color: var(--nestia-text);
}

/* Calendar selection panel */
.nestia-calendar-selection {
    background: var(--nestia-off-white);
    border: 1px solid var(--nestia-grey);
    border-radius: var(--nestia-radius);
    padding: 20px;
    margin-top: 8px;
}

.nestia-selection-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.nestia-selection-checkin,
.nestia-selection-checkout,
.nestia-selection-guests {
    flex: 1;
    min-width: 140px;
}

.nestia-selection-checkin label,
.nestia-selection-checkout label,
.nestia-selection-guests label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nestia-text-light);
    margin-bottom: 6px;
}

.nestia-checkin-display,
.nestia-checkout-display {
    display: block;
    padding: 10px 14px;
    border: 1px solid var(--nestia-grey);
    border-radius: var(--nestia-radius);
    background: var(--nestia-white);
    font-size: 14px;
    color: var(--nestia-text-light);
    min-height: 40px;
}

.nestia-checkin-display.is-set,
.nestia-checkout-display.is-set {
    color: var(--nestia-text);
    font-weight: 600;
    border-color: var(--nestia-gold);
}

/* Guests control */
.nestia-guests-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--nestia-grey);
    border-radius: var(--nestia-radius);
    overflow: hidden;
    background: var(--nestia-white);
    width: fit-content;
}

.nestia-guests-minus,
.nestia-guests-plus {
    background: var(--nestia-off-white);
    border: none;
    padding: 10px 14px;
    font-size: 16px;
    cursor: pointer;
    color: var(--nestia-text);
    transition: background 0.15s;
    line-height: 1;
}

.nestia-guests-minus:hover,
.nestia-guests-plus:hover {
    background: var(--nestia-grey);
}

.nestia-guests-count {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    min-width: 32px;
    text-align: center;
}

/* Quote result */
.nestia-quote-result {
    background: var(--nestia-white);
    border: 1px solid var(--nestia-gold-light);
    border-radius: var(--nestia-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.nestia-quote-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nestia-text-light);
    margin: 0 0 12px;
}

.nestia-quote-breakdown {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nestia-quote-breakdown li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px solid var(--nestia-grey);
    color: var(--nestia-text);
}

.nestia-quote-breakdown li:last-child {
    border-bottom: none;
}

.nestia-quote-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--nestia-navy);
    color: var(--nestia-navy);
}

.nestia-quote-total-amount {
    color: var(--nestia-gold-dark);
    font-size: 20px;
}

.nestia-quote-unavailable {
    color: var(--nestia-booked);
    font-weight: 500;
}

.nestia-calendar-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ============================================
   BOOKING FORM
   ============================================ */

.nestia-booking-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.nestia-form-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--nestia-navy);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--nestia-gold);
}

.nestia-booking-summary {
    background: var(--nestia-navy);
    color: var(--nestia-white);
    border-radius: var(--nestia-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.nestia-summary-item {
    display: flex;
    flex-direction: column;
}

.nestia-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nestia-gold);
    margin-bottom: 3px;
}

.nestia-summary-value {
    font-size: 15px;
    font-weight: 600;
}

.nestia-summary-total {
    font-size: 18px;
    color: var(--nestia-gold);
}

.nestia-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.nestia-form-row {
    display: flex;
    gap: 16px;
}

.nestia-form-row-half .nestia-form-group {
    flex: 1;
}

.nestia-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.nestia-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--nestia-text);
    margin-bottom: 6px;
}

.nestia-required {
    color: var(--nestia-booked);
}

.nestia-optional {
    color: var(--nestia-text-light);
    font-weight: 400;
}

.nestia-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nestia-form-note {
    font-size: 12px;
    color: var(--nestia-text-light);
    margin-top: 12px;
    margin-bottom: 0;
}

.nestia-form-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-left: 4px solid var(--nestia-booked);
    border-radius: var(--nestia-radius);
    padding: 12px 16px;
    color: #c62828;
    font-size: 14px;
    margin-top: 16px;
}

/* ============================================
   CONFIRMATION
   ============================================ */

.nestia-confirmation-wrap {
    text-align: center;
    padding: 40px 20px;
}

.nestia-confirmation-icon {
    width: 64px;
    height: 64px;
    background: var(--nestia-gold);
    color: var(--nestia-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.nestia-confirmation-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--nestia-navy);
    margin: 0 0 12px;
}

.nestia-confirmation-message {
    font-size: 16px;
    color: var(--nestia-text);
    margin-bottom: 20px;
}

.nestia-confirmation-details {
    background: var(--nestia-off-white);
    border-radius: var(--nestia-radius);
    padding: 16px 20px;
    display: inline-block;
    text-align: left;
    margin-bottom: 20px;
    min-width: 280px;
}

.nestia-confirmation-code {
    font-size: 22px;
    font-weight: 700;
    color: var(--nestia-gold-dark);
    letter-spacing: 1px;
}

.nestia-confirmation-note {
    font-size: 13px;
    color: var(--nestia-text-light);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   SEARCH WIDGET
   ============================================ */

.nestia-search-widget {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--nestia-shadow);
}

.nestia-search-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.nestia-search-field {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
}

.nestia-search-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nestia-text-light);
    margin-bottom: 6px;
}

.nestia-search-submit {
    flex-shrink: 0;
    padding: 11px 28px;
    font-size: 14px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.nestia-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--nestia-text-light);
    font-size: 14px;
}

.nestia-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--nestia-grey);
    border-top-color: var(--nestia-gold);
    border-radius: 50%;
    animation: nestia-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes nestia-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   BOOK NOW BUTTON
   ============================================ */

.nestia-book-now-btn {
    display: inline-block;
    background: var(--nestia-gold);
    color: var(--nestia-navy) !important;
    padding: 14px 32px;
    border-radius: var(--nestia-radius);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    transition: background 0.2s;
    cursor: pointer;
}

.nestia-book-now-btn:hover {
    background: var(--nestia-gold-dark);
    color: var(--nestia-navy) !important;
}

/* ============================================
   BOOKING SIDEBAR (sticky)
   ============================================ */

.nestia-booking-sidebar {
    position: sticky;
    top: 100px;
}

.nestia-sidebar-card {
    background: var(--nestia-white);
    border: 1px solid var(--nestia-grey);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--nestia-shadow);
}

.nestia-sidebar-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--nestia-navy);
    margin-bottom: 16px;
}

.nestia-sidebar-price span {
    font-size: 15px;
    font-weight: 400;
    color: var(--nestia-text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media ( max-width: 600px ) {
    .nestia-calendar-grid {
        grid-template-columns: 1fr;
    }

    .nestia-selection-dates {
        flex-direction: column;
    }

    .nestia-form-row-half {
        flex-direction: column;
    }

    .nestia-search-inner {
        flex-direction: column;
    }

    .nestia-search-field {
        min-width: 100%;
    }

    .nestia-calendar-actions {
        justify-content: stretch;
    }

    .nestia-calendar-actions .nestia-btn {
        flex: 1;
        text-align: center;
    }

    .nestia-form-actions {
        flex-direction: column;
    }

    .nestia-form-actions .nestia-btn {
        width: 100%;
        text-align: center;
    }
}
