/* ====================================
   Public Booking System - CSS
   Mobile-First Responsive Design
   ==================================== */

/* Reset & Base */
.public-booking-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
}

/* Container */
.pb-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.pb-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pb-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.pb-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Progress Bar */
.pb-progress {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pb-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.pb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.pb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.pb-step.active .pb-step-number {
    color: white;
    transform: scale(1.1);
}

.pb-step.completed .pb-step-number {
    background: #4caf50;
    color: white;
}

.pb-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.pb-step.active .pb-step-label {
    font-weight: bold;
}

/* Card */
.pb-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

/* Step Content */
.pb-step-content h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.pb-step-description {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 14px;
}

/* Form Elements */
.pb-form-group {
    margin-bottom: 20px;
}

.pb-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.pb-input,
.pb-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pb-input:focus,
.pb-textarea:focus {
    outline: none;
}

.pb-textarea {
    resize: vertical;
    font-family: inherit;
}

/* Services List */
.pb-services-list {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.pb-service-item {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pb-service-item:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
}

.pb-service-item.selected {
    border-width: 2px;
}

.pb-service-item h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.pb-service-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.pb-service-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #ff9800;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
}

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

.pb-time-slot {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pb-time-slot:hover {
    background: #f8f9ff;
}

.pb-time-slot.selected {
    color: white;
}

.pb-time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* File Upload */
.pb-file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pb-file-input:hover {
    background: #f8f9ff;
}

.pb-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    display: none;
}

.pb-file-preview.active {
    display: block;
}

.pb-file-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Summary */
.pb-summary {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

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

.pb-summary-item:last-child {
    border-bottom: none;
}

.pb-summary-label {
    font-weight: 500;
    color: #666;
}

.pb-summary-value {
    color: #333;
    font-weight: 600;
}

/* Buttons */
.pb-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.pb-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.pb-btn-primary {
    color: white;
}

.pb-btn-primary:hover {
    transform: translateY(-2px);
}

.pb-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.pb-btn-secondary:hover {
    background: #d0d0d0;
}

.pb-btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.pb-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Loading Overlay */
.pb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pb-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.pb-loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

/* Info Messages */
.pb-info {
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    color: #1976d2;
    margin: 10px 0;
}

.pb-error {
    padding: 15px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    margin: 10px 0;
}

.pb-success {
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
    color: #2e7d32;
    margin: 10px 0;
}

/* Booking Disabled Message */
.booking-disabled-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    color: white;
}

.booking-disabled-message h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.booking-disabled-message p {
    font-size: 18px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .pb-container {
        padding: 15px;
    }
    
    .pb-header h1 {
        font-size: 24px;
    }
    
    .pb-card {
        padding: 20px;
    }
    
    .pb-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .pb-step-label {
        font-size: 10px;
    }
    
    .pb-actions {
        flex-direction: column;
    }
    
    .pb-btn {
        width: 100%;
    }
    
    .pb-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .pb-steps {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .pb-step {
        min-width: 60px;
    }
}

/* Modal Styles */
.pb-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pb-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    position: relative;
}

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

.pb-modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pb-modal-close:hover,
.pb-modal-close:focus {
    opacity: 0.8;
}

.pb-modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
}

.pb-modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    line-height: 1.8;
    color: #333;
}

.pb-modal-body::-webkit-scrollbar {
    width: 8px;
}

.pb-modal-body::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.pb-modal-body::-webkit-scrollbar-thumb {
    border-radius: 10px;
}

.pb-modal-body::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .pb-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .pb-modal-body {
        max-height: 300px;
    }
}
