/**
 * Reservation Calendar Styles V2 - Social Deal Style
 */

/* Full width reservation section */
.reservation-section {
    background: transparent;
    padding: 60px 0;
    margin-top: 20px;
}

.reservation-section .uk-card,
.reservation-card {
    max-width: 100%;
    border-radius: 20px !important;
    padding: 30px !important;
}

.reservation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reservation-card-header h3 {
    margin: 0;
}

.reservation-subtitle {
    text-align: right;
}

.reservation-calendar-wrapper {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    margin-top: 10px;
}

.reservation-calendar-wrapper.social-deal-style {
    background: #fff;
}

/* Header with persons selector */
.reservation-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.reservation-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.persons-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.persons-selector label {
    font-weight: 500;
    color: #666;
}

.persons-selector select,
.reservation-persons-dropdown {
    padding: 8px 35px 8px 12px !important;
    border-radius: 8px !important;
    border: 2px solid #e0e0e0 !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 130px;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
}

.reservation-persons-dropdown option {
    color: #333 !important;
    background: #fff !important;
    padding: 8px !important;
}

.persons-selector select:focus {
    border-color: #2ecc71;
    outline: none;
}

/* Calendar months grid */
.reservation-calendar-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.calendar-month {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
}

.calendar-month-header {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2ecc71;
    text-transform: capitalize;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    position: relative;
    text-align: center;
    padding: 12px 6px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: default;
    transition: all 0.2s ease;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.past {
    color: #ccc;
    background: transparent;
}

.calendar-day.available {
    background: #e8f5e9;
    color: #2e7d32;
}

.calendar-day.available.selectable {
    cursor: pointer;
}

.calendar-day.available.selectable:hover {
    background: #4CAF50;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    z-index: 1;
}

.calendar-day.full {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.closed {
    background: #ffebee;
    color: #e53935;
    text-decoration: line-through;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #2ecc71 !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(46, 204, 113, 0.4);
    transform: scale(1.05);
}

/* Timeslots section */
.reservation-timeslots-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    border: 2px solid #2ecc71;
}

.timeslots-header {
    margin-bottom: 15px;
}

.timeslots-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.timeslots-header .uk-text-primary {
    color: #2ecc71 !important;
    font-weight: 500;
}

.timeslots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.timeslot-btn {
    position: relative;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.timeslot-btn.available {
    border-color: #4CAF50;
    color: #2e7d32;
}

.timeslot-btn.available:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.timeslot-btn.available.selected {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.timeslot-btn.full {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.timeslot-btn.full:disabled {
    opacity: 0.7;
}

.timeslot-full-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #e53935;
    margin-top: 2px;
}

/* Legend */
.reservation-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 15px;
    margin-bottom: 20px;
}

/* Buy Button Section */
.reservation-buy-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #eee;
    margin-top: 10px;
}

.reservation-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 60px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.reservation-buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 204, 113, 0.4);
}

.reservation-buy-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.reservation-buy-btn i {
    font-size: 1.3rem;
}

.reservation-buy-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-dot.available {
    background: #e8f5e9;
    border: 2px solid #4CAF50;
}

.legend-dot.full {
    background: #f5f5f5;
    border: 2px solid #ccc;
}

.legend-dot.closed {
    background: #ffebee;
    border: 2px solid #e53935;
}

/* Loading state */
.reservation-calendar-loading {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 959px) {
    .reservation-calendar-months {
        grid-template-columns: 1fr;
    }

    .calendar-month {
        margin-bottom: 10px;
    }

    .reservation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .timeslots-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .reservation-calendar-legend {
        flex-wrap: wrap;
        gap: 15px;
    }
}

@media (max-width: 639px) {
    .timeslots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .calendar-day {
        padding: 8px 2px;
        font-size: 0.8rem;
    }
}

/* Animation for timeslots appearing */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reservation-timeslots-section {
    animation: slideIn 0.3s ease-out;
}

/* Selected date display box */
.reservation-selected-date {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #2ecc71;
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reservation-selected-date .date-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reservation-selected-date .date-info i {
    font-size: 1.8rem;
    color: #2ecc71;
}

.reservation-selected-date .date-text {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.reservation-selected-date .date-availability {
    font-size: 0.85rem;
    color: #666;
}

/* Form within deal page */
.reservation-form-inline {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
    margin-top: 20px;
}

.reservation-form-inline .form-row {
    margin-bottom: 12px;
}

.reservation-form-inline label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.reservation-form-inline input,
.reservation-form-inline textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.reservation-form-inline input:focus,
.reservation-form-inline textarea:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.reservation-form-inline .btn-reserve {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reservation-form-inline .btn-reserve:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.reservation-form-inline .btn-reserve:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   CHECKOUT PAGE - Fullwidth calendar section
   Appears below the checkout form
   ======================================== */

/* The checkout calendar section uses the same fullwidth styling as deal page */
/* No special overrides needed - it uses .reservation-section styles */

/* Change "Koop Nu" button text for checkout context */
#reservation-calendar-section .reservation-buy-btn span {
    /* Button stays visible to confirm selection */
}

/* Ensure calendar section is properly spaced from checkout */
#reservation-calendar-section {
    margin-top: 0;
    padding-top: 40px;
}
