/**
 * Frontend Styles for Booking System Pro
 */

/* Booking Form Container */
.bsp-booking-form-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.bsp-form-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #2c3e50;
    text-align: center;
    font-weight: 700;
}

/* Form Styles */
.bsp-booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bsp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bsp-form-group {
    display: flex;
    flex-direction: column;
}

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

.bsp-form-group .required {
    color: #e74c3c;
}

.bsp-form-group input,
.bsp-form-group select,
.bsp-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.bsp-form-group select {
    cursor: pointer;
    background: #fff;
}

.bsp-form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

.bsp-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
.bsp-submit-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.bsp-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2574a9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.bsp-submit-btn:active {
    transform: translateY(0);
}

.bsp-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.bsp-booking-form.loading {
    pointer-events: none;
    opacity: 0.6;
}

.bsp-booking-form.loading .bsp-submit-btn::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Form Messages */
.bsp-form-message {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    margin: 10px 0;
    display: none;
}

.bsp-form-message.success {
    display: block;
    background: #d1f2eb;
    color: #0c5e47;
    border-left: 4px solid #28a745;
}

.bsp-form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid: #dc3545;
}

/* Calendar Widget */
.bsp-calendar-widget {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.bsp-calendar-widget h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 22px;
}

#bsp-mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.bsp-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bsp-calendar-day:hover {
    background: #ecf0f1;
}

.bsp-calendar-day.available {
    background: #d1f2eb;
    color: #0c5e47;
}

.bsp-calendar-day.unavailable {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.bsp-calendar-day.selected {
    background: #3498db;
    color: #fff;
    font-weight: 600;
}

/* Time Slots Display */
.bsp-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.bsp-time-slot {
    padding: 12px;
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.bsp-time-slot:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.bsp-time-slot.selected {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.bsp-time-slot.unavailable {
    background: #f8d7da;
    border-color: #f5c6cb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .bsp-booking-form-container {
        padding: 25px;
        margin: 20px 15px;
    }

    .bsp-form-title {
        font-size: 24px;
    }

    .bsp-form-row {
        grid-template-columns: 1fr;
    }

    .bsp-submit-btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    .bsp-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

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

.bsp-booking-form-container {
    animation: fadeIn 0.5s ease;
}

/* Success Checkmark Animation */
.bsp-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #28a745;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 40px #28a745;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}
