/* Appointment Booking Frontend Styles */

.apb-booking-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.apb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.apb-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.apb-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form */
.apb-form {
    width: 100%;
}

.apb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.apb-form-group.apb-full-width {
    margin-bottom: 16px;
}

.apb-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.apb-form-group input[type="text"],
.apb-form-group input[type="tel"],
.apb-form-group input[type="date"],
.apb-form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.apb-form-group input:focus,
.apb-form-group select:focus {
    outline: none;
    border-color: #0f5c8c;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(15, 92, 140, 0.1);
}

.apb-form-group input::placeholder {
    color: #999;
}

.apb-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Other Service Field */
.apb-other-service {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Divider */
.apb-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.apb-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
}

.apb-divider span {
    position: relative;
    background-color: #fff;
    padding: 0 16px;
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

/* Slots Section */
.apb-slots-section {
    margin-top: 24px;
}

.apb-slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.apb-slots-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Day Toggle */
.apb-day-toggle {
    display: flex;
    gap: 8px;
}

.apb-day-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background-color: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apb-day-btn:hover {
    border-color: #0f5c8c;
    color: #0f5c8c;
}

.apb-day-btn.active {
    background-color: #0f5c8c;
    border-color: #0f5c8c;
    color: #fff;
}

/* Availability Notice */
.apb-availability-notice {
    text-align: center;
    color: #d94c4c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding: 8px;
    background-color: #fff5f5;
    border-radius: 4px;
}

/* Slots Grid */
.apb-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    min-height: 120px;
}

.apb-slot-btn {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apb-slot-btn:hover {
    border-color: #0f5c8c;
    background-color: #f0f7fb;
}

.apb-slot-btn.selected {
    background-color: #0f5c8c;
    border-color: #0f5c8c;
    color: #fff;
}

.apb-slot-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

/* Loading State */
.apb-slots-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.apb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #0f5c8c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.apb-no-slots {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Submit Button */
.apb-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    background-color: #d94c4c;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apb-submit-btn:hover:not(:disabled) {
    background-color: #c23b3b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 76, 76, 0.3);
}

.apb-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Screen */
.apb-success-container {
    text-align: center;
    padding: 40px 20px;
}

.apb-success-icon {
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.apb-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #4CAF50;
    margin: 0 0 16px 0;
}

.apb-success-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Booking Summary */
.apb-booking-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.apb-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.apb-summary-row:last-child {
    border-bottom: none;
}

.apb-summary-label {
    font-weight: 600;
    color: #666;
}

.apb-summary-value {
    color: #1a1a1a;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 600px) {
    .apb-booking-container {
        padding: 16px;
    }
    
    .apb-form-row {
        grid-template-columns: 1fr;
    }
    
    .apb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .apb-slots-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .apb-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .apb-title {
        font-size: 24px;
    }
}

/* Error Messages */
.apb-error-message {
    background-color: #fff5f5;
    color: #d94c4c;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #d94c4c;
    margin-bottom: 16px;
    font-size: 14px;
}

.apb-success-alert {
    background-color: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Hidden class */
.apb-hidden {
    display: none !important;
}
