/**
 * SmartWeb Booking System - Frontend Styles
 */

/* Booking Form Styles */
.smartweb-booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.smartweb-booking-form h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.smartweb-booking-step {
    margin-bottom: 30px;
}

.smartweb-booking-step h4 {
    margin-bottom: 15px;
    color: #555;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

/* Service Selection */
.smartweb-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.smartweb-service-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smartweb-service-card:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0,123,186,0.2);
}

.smartweb-service-card.selected {
    border-color: #007cba;
    background-color: #f8f9fa;
}

.smartweb-service-card h5 {
    margin: 0 0 8px 0;
    color: #333;
}

.smartweb-service-card .price {
    font-weight: bold;
    color: #007cba;
}

.smartweb-service-card .duration {
    color: #666;
    font-size: 0.9em;
}

/* Date & Time Selection */
.smartweb-date-picker {
    margin-bottom: 20px;
}

.smartweb-date-picker input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.smartweb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.smartweb-time-slot {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.smartweb-time-slot:hover {
    background-color: #f0f0f0;
    border-color: #007cba;
}

.smartweb-time-slot.selected {
    background-color: #007cba;
    color: #fff;
    border-color: #007cba;
}

.smartweb-time-slot.unavailable {
    background-color: #f8f9fa;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* AI Suggestions */
.smartweb-ai-suggestions {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.smartweb-ai-suggestions h5 {
    margin-top: 0;
    color: #007cba;
    display: flex;
    align-items: center;
}

.smartweb-ai-suggestions h5:before {
    content: "🤖";
    margin-right: 8px;
}

.smartweb-ai-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 8px 0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smartweb-ai-suggestion:hover {
    background-color: #e3f2fd;
}

.smartweb-ai-suggestion .suggestion-info {
    flex: 1;
}

.smartweb-ai-suggestion .suggestion-score {
    background: #007cba;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 10px;
}

/* Customer Information */
.smartweb-customer-form {
    display: grid;
    gap: 15px;
}

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

.smartweb-form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.smartweb-form-group input,
.smartweb-form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.smartweb-form-group input:focus,
.smartweb-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,123,186,0.2);
}

.smartweb-form-group.required label:after {
    content: " *";
    color: #dc3545;
}

/* Buttons */
.smartweb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.smartweb-btn-primary {
    background-color: #007cba;
    color: #fff;
}

.smartweb-btn-primary:hover {
    background-color: #005a87;
}

.smartweb-btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.smartweb-btn-secondary:hover {
    background-color: #545b62;
}

.smartweb-btn-outline {
    background-color: transparent;
    border: 2px solid #007cba;
    color: #007cba;
}

.smartweb-btn-outline:hover {
    background-color: #007cba;
    color: #fff;
}

.smartweb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Navigation */
.smartweb-booking-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Summary */
.smartweb-booking-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.smartweb-booking-summary h4 {
    margin-top: 0;
    color: #333;
}

.smartweb-summary-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 0;
}

.smartweb-summary-item.total {
    border-top: 1px solid #ddd;
    margin-top: 15px;
    padding-top: 15px;
    font-weight: bold;
    font-size: 1.1em;
}

/* Loading States */
.smartweb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: smartweb-spin 1s linear infinite;
}

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

.smartweb-loading-overlay {
    position: relative;
}

.smartweb-loading-overlay:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Messages */
.smartweb-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}

.smartweb-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.smartweb-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.smartweb-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.smartweb-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Calendar View */
.smartweb-calendar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.smartweb-calendar-header {
    background: #007cba;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smartweb-calendar-nav {
    display: flex;
    gap: 10px;
}

.smartweb-calendar-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.smartweb-calendar-nav button:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .smartweb-booking-form {
        margin: 0;
        padding: 15px;
        border-radius: 0;
    }
    
    .smartweb-services-grid {
        grid-template-columns: 1fr;
    }
    
    .smartweb-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .smartweb-booking-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .smartweb-booking-nav .smartweb-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .smartweb-time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .smartweb-summary-item {
        flex-direction: column;
        gap: 5px;
    }
}

/* Print Styles */
@media print {
    .smartweb-booking-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .smartweb-btn,
    .smartweb-booking-nav {
        display: none;
    }
}