/**
 * WC Room Booking - Frontend Styles
 */

/* Booking Wrapper */
.wcrb-booking-wrapper {
    margin: 30px 0;
    font-family: inherit;
}

/* Room Info */
.wcrb-room-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.wcrb-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.wcrb-info-item:last-child {
    margin-bottom: 0;
}

.wcrb-icon {
    color: #666;
    display: flex;
    align-items: center;
}

.wcrb-label {
    color: #666;
    font-size: 14px;
}

.wcrb-value {
    font-weight: 600;
    color: #333;
}

.wcrb-divider {
    color: #ddd;
    margin: 0 5px;
}

/* Calendar Section */
.wcrb-calendar-section {
    margin-bottom: 30px;
}

.wcrb-calendar-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#wcrb-calendar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

/* FullCalendar Customization */
#wcrb-calendar .fc {
    font-family: inherit;
}

#wcrb-calendar .fc-toolbar-title {
    font-size: 1.1em;
    font-weight: 600;
}

#wcrb-calendar .fc-button {
    background: #333;
    border-color: #333;
    padding: 6px 12px;
    font-size: 13px;
}

#wcrb-calendar .fc-button:hover {
    background: #555;
    border-color: #555;
}

#wcrb-calendar .fc-button:disabled {
    background: #ccc;
    border-color: #ccc;
}

#wcrb-calendar .fc-button-primary:not(:disabled).fc-button-active {
    background: #111;
    border-color: #111;
}

#wcrb-calendar .fc-day {
    cursor: pointer;
    transition: background 0.2s ease;
}

#wcrb-calendar .fc-day:hover:not(.fc-day-past):not(.fc-day-disabled) {
    background: #f0f0f0;
}

#wcrb-calendar .fc-day-past {
    background: #f5f5f5;
    cursor: not-allowed;
}

#wcrb-calendar .fc-day-today {
    background: #fff3cd !important;
}

#wcrb-calendar .fc-day.booked,
#wcrb-calendar .fc-day.blocked {
    background: #ffebee !important;
    cursor: not-allowed;
}

#wcrb-calendar .fc-day.selected {
    background: #e3f2fd !important;
}

#wcrb-calendar .fc-day.selected-start {
    background: #2196F3 !important;
    color: #fff;
}

#wcrb-calendar .fc-day.selected-end {
    background: #2196F3 !important;
    color: #fff;
}

#wcrb-calendar .fc-day.selected-range {
    background: #bbdefb !important;
}

#wcrb-calendar .fc-daygrid-day-number {
    padding: 8px;
    font-size: 14px;
}

#wcrb-calendar .fc-bg-event {
    opacity: 1;
}

#wcrb-calendar .fc-bg-event.booked {
    background: #ffcdd2 !important;
}

#wcrb-calendar .fc-bg-event.blocked {
    background: #e0e0e0 !important;
}

#wcrb-calendar .fc-bg-event.past {
    background: #f5f5f5 !important;
}

/* Calendar Legend */
.wcrb-calendar-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.wcrb-calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.wcrb-calendar-legend .legend-item::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.legend-item.available::before {
    background: #fff;
}

.legend-item.unavailable::before {
    background: #ffcdd2;
    border-color: #ef9a9a;
}

.legend-item.selected::before {
    background: #2196F3;
    border-color: #1976D2;
}

/* Booking Form */
.wcrb-booking-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

/* Dates Display */
.wcrb-dates-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.wcrb-date-field {
    flex: 1;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px 15px;
}

.wcrb-date-field label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.wcrb-date-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wcrb-date-separator {
    color: #ccc;
    display: flex;
    align-items: center;
}

/* Guests Row */
.wcrb-guests-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.wcrb-guest-field {
    flex: 1;
}

.wcrb-guest-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.wcrb-guest-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
}

/* Price Summary */
.wcrb-price-summary {
    background: #f0f7ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.wcrb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcrb-summary-label {
    font-size: 14px;
    color: #666;
}

.wcrb-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1976D2;
}

.wcrb-price-breakdown {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #d0e3f7;
    font-size: 13px;
    color: #666;
    max-height: 150px;
    overflow-y: auto;
}

.wcrb-price-breakdown .breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

/* Error Message */
.wcrb-error-message {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #c62828;
    font-size: 14px;
}

/* Customer Details */
.wcrb-customer-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.wcrb-customer-details h4 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
}

.wcrb-form-row {
    margin-bottom: 15px;
}

.wcrb-form-row:last-child {
    margin-bottom: 0;
}

.wcrb-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.wcrb-form-row label .required {
    color: #c62828;
}

.wcrb-form-row input,
.wcrb-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.wcrb-form-row textarea {
    resize: vertical;
}

/* Actions */
.wcrb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wcrb-actions .button {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
}

.wcrb-actions .wcrb-add-to-cart {
    background: #2196F3;
    color: #fff;
}

.wcrb-actions .wcrb-add-to-cart:hover:not(:disabled) {
    background: #1976D2;
}

.wcrb-actions .wcrb-pay-later {
    background: #fff;
    color: #333;
    border: 2px solid #333;
}

.wcrb-actions .wcrb-pay-later:hover:not(:disabled) {
    background: #333;
    color: #fff;
}

.wcrb-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wcrb-actions .button.loading {
    position: relative;
    color: transparent;
}

.wcrb-actions .button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Success Message */
.wcrb-success-message {
    text-align: center;
    padding: 40px 20px;
}

.wcrb-success-content svg {
    color: #4CAF50;
    margin-bottom: 15px;
}

.wcrb-success-content h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.wcrb-success-content p {
    color: #666;
    margin-bottom: 20px;
}

.wcrb-success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wcrb-success-actions .button {
    padding: 12px 25px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.wcrb-success-actions .button:hover {
    background: #43A047;
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    .wcrb-dates-display {
        flex-direction: column;
    }
    
    .wcrb-date-field {
        width: 100%;
    }
    
    .wcrb-date-separator {
        transform: rotate(90deg);
    }
    
    .wcrb-guests-row {
        flex-direction: column;
    }
    
    .wcrb-actions {
        flex-direction: column;
    }
    
    .wcrb-actions .button {
        width: 100%;
    }
}
