/* Booking Modal Styles */

.sbs-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: sbs-fade-in 0.3s ease-in-out;
}

.sbs-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@keyframes sbs-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sbs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.sbs-modal-container {
    position: relative;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: sbs-slide-in 0.3s ease-out;
    z-index: 10001;
}

@keyframes sbs-slide-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sbs-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sbs-modal-close:hover {
    color: #333;
}

/* Modal Header */
.sbs-modal-body {
    padding: 20px 0;
}

.sbs-modal-title {
    margin: 0 0 30px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Progress Bar */
.sbs-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.sbs-progress-bar::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.sbs-progress-bar span {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    position: relative;
    padding-top: 20px;
}

.sbs-progress-bar span::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s;
}

.sbs-progress-bar span.active {
    color: #d2ae6d;
}

.sbs-progress-bar span.active::before {
    background: #d2ae6d;
    border-color: #d2ae6d;
    color: white;
}

/* Form Sections */
.sbs-form-section {
    display: none;
}

.sbs-form-section.active {
    display: block;
    animation: sbs-fade-in 0.3s;
}

.sbs-form-group {
    margin-bottom: 20px;
}

.sbs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sbs-form-group input,
.sbs-form-group select,
.sbs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sbs-form-group input:focus,
.sbs-form-group select:focus,
.sbs-form-group textarea:focus {
    outline: none;
    border-color: #d2ae6d;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Calendar */
.sbs-calendar {
    margin: 20px 0;
}

.sbs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.sbs-calendar-header button {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s;
}

.sbs-calendar-header button:hover {
    background: #f9f9f9;
    border-color: #d2ae6d;
    color: #d2ae6d;
}

.sbs-calendar-month {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.sbs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    justify-content: center;
}

.sbs-calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.sbs-calendar-day:hover:not(.disabled) {
    border-color: #d2ae6d;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.sbs-calendar-day.available {
    border-color: #d2ae6d;
    color: #d2ae6d;
    font-weight: 700;
}

.sbs-calendar-day.available:hover {
    background: #d2ae6d;
    color: white;
}

.sbs-calendar-day.selected {
    background: #d2ae6d;
    color: white;
    border-color: #d2ae6d;
}

.sbs-calendar-day.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.sbs-calendar-day.today {
    border-color: #2a2a2a;
    box-shadow: inset 0 0 0 2px #2a2a2a;
}

/* Time Slots */
.sbs-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.sbs-time-slot {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: white;
    transition: all 0.2s;
}

.sbs-time-slot:hover:not(.disabled) {
    border-color: #d2ae6d;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.sbs-time-slot.available:hover {
    background: #d2ae6d;
    color: white;
}

.sbs-time-slot.selected {
    background: #d2ae6d;
    color: white;
    border-color: #d2ae6d;
}

.sbs-time-slot.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Order Summary */
.sbs-order-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.sbs-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.sbs-summary-row:last-child {
    border-bottom: none;
}

.sbs-summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: #d2ae6d;
    padding-top: 20px;
    padding-bottom: 0;
    border-top: 2px solid #ddd;
}

/* Buttons */
.sbs-button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.sbs-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sbs-btn-primary {
    background: #d2ae6d;
    color: white;
}

.sbs-btn-primary:hover {
    background: #d2ae6d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
    /* color: #f2f2f2 */
}

.sbs-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.sbs-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.sbs-btn-secondary:hover {
    background: #e9e9e9;
    border-color: #999;
}

/* Loading Spinner */
.sbs-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    animation: sbs-spin 1s linear infinite;
}

/* Modal Loading Spinner */
.sbs-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px;
}

.sbs-modal-loading::before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #d2ae6d;
    border-radius: 50%;
    animation: sbs-spin 1s linear infinite;
    margin-bottom: 20px;
}

.sbs-modal-loading-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.sbs-btn:disabled .sbs-loading-spinner {
    border-top-color: #ccc;
}

@keyframes sbs-spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.sbs-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.sbs-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.sbs-alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.sbs-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.sbs-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sbs-modal-container {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .sbs-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .sbs-calendar-grid {
        gap: 5px;
    }

    .sbs-calendar-day {
        font-size: 11px;
        padding: 5px;
    }

    .sbs-progress-bar span {
        font-size: 12px;
        padding-top: 35px;
    }

    .sbs-progress-bar span::before {
        width: 30px;
        height: 30px;
    }
}
