/**
 * Location Booking Frontend Styles
 */

.tbvs-location-booking-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tbvs-location-booking-wrapper h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

.tbvs-location-booking-wrapper .subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 16px;
}

/* Booking Steps */
.booking-step {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.booking-step.active {
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

.booking-step h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date Picker */
.date-picker-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.date-input {
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Locations List */
.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.location-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.location-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.location-card:hover .location-image img {
    transform: scale(1.05);
}

.location-info {
    padding: 20px;
}

.location-info h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.location-address,
.location-capacity,
.location-date {
    margin: 8px 0;
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-address svg,
.location-capacity svg,
.location-date svg {
    color: #3498db;
    flex-shrink: 0;
}

.location-date {
    font-weight: 600;
    color: #2c3e50;
}

/* Time Slots */
.location-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.slots-halves {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.location-time-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    padding-top: 35px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 90px;
}

.location-time-slot:hover:not(:disabled) {
    border-color: #3498db;
    background: #e3f2fd;
    transform: scale(1.02);
}

.location-time-slot.selected {
    border-color: #3498db;
    background: #3498db;
    color: #fff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.location-time-slot.selected .time-label,
.location-time-slot.selected .price-label {
    color: #fff;
}

.location-time-slot.slot-full-day {
    border-width: 2px;
    border-style: dashed;
    background: #f0f7ff;
}

.location-time-slot.slot-full-day.available {
    border-color: #2271b1;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
}

.location-time-slot.slot-full-day.available:hover:not(:disabled) {
    background: linear-gradient(135deg, #d0eaf9 0%, #e8f4fd 100%);
    border-color: #1a5a8f;
}

.location-time-slot.slot-full-day.selected {
    border-style: solid;
    border-color: #2271b1;
    background: #2271b1;
}

.location-time-slot.booked {
    background: #ecf0f1;
    border-color: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.7;
}

.location-time-slot:disabled {
    cursor: not-allowed;
}

.slot-type-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.slot-full-day .slot-type-label {
    color: #2271b1;
}

.location-time-slot.selected .slot-type-label {
    color: rgba(255,255,255,0.85);
}

.location-time-slot .time-label {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 6px;
}

.location-time-slot .price-label {
    font-size: 20px;
    font-weight: 700;
    color: #3498db;
}

.location-time-slot .status-label {
    position: absolute;
    right: -2px;
    top: -2px;
    background: #e74c3c;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    width: calc(100% + 4px);
}

.location-time-slot.available .status-label {
    background: #27ae60;
}

.location-time-slot.booked .status-label {
    background: #e74c3c;
}

/* Customer Form */
.customer-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.form-field input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Booking Actions */
.booking-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-book {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-book:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-book:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.booking-messages {
    margin-top: 25px;
}

.booking-message {
    padding: 16px 20px;
    margin: 12px 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-message.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.booking-message.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.booking-message.info {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
    color: #0c5460;
}

.booking-message.warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

/* Info Text */
.info-text {
    text-align: center;
    color: #7f8c8d;
    font-size: 16px;
    padding: 40px 20px;
}

/* Holiday Notice */
.holiday-notice {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    color: #856404;
    font-size: 18px;
    font-weight: 600;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .tbvs-location-booking-wrapper {
        margin: 20px auto;
        padding: 20px;
    }
    
    .tbvs-location-booking-wrapper h2 {
        font-size: 26px;
    }
    
    .booking-step {
        padding: 20px;
    }
    
    .booking-step h3 {
        font-size: 20px;
    }
    
    .locations-list {
        grid-template-columns: 1fr;
    }
    
    .slots-halves {
        grid-template-columns: 1fr;
    }
    
    .date-input {
        max-width: 100%;
    }
    
    .btn-book {
        width: 100%;
        padding: 14px 32px;
        font-size: 16px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-card {
    animation: fadeIn 0.4s ease;
}

.location-card:nth-child(1) { animation-delay: 0.1s; }
.location-card:nth-child(2) { animation-delay: 0.2s; }
.location-card:nth-child(3) { animation-delay: 0.3s; }
.location-card:nth-child(4) { animation-delay: 0.4s; }
