/**
 * Smart Booking Stylesheet
 * 
 * Styles for the Smart Booking & Reminder System
 */

/* ===== Base Styles ===== */
.smart-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.smart-booking-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.smart-booking-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.smart-booking-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* ===== Forms ===== */
.smart-booking-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.smart-booking-form {
    max-width: 800px;
    margin: 0 auto;
}

.smart-booking-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.smart-booking-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.smart-booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.smart-booking-form-group {
    margin-bottom: 20px;
}

.smart-booking-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.smart-booking-form-group input,
.smart-booking-form-group select,
.smart-booking-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.smart-booking-form-group input:focus,
.smart-booking-form-group select:focus,
.smart-booking-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.smart-booking-form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 14px;
}

.smart-booking-form-actions {
    text-align: center;
    margin-top: 30px;
}

.smart-booking-form-message {
    margin-top: 20px;
    text-align: center;
}

/* ===== Buttons ===== */
.smart-booking-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.smart-booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.smart-booking-btn:active {
    transform: translateY(0);
}

.smart-booking-btn-primary {
    background: #3498db;
    color: white;
}

.smart-booking-btn-primary:hover {
    background: #2980b9;
}

.smart-booking-btn-secondary {
    background: #95a5a6;
    color: white;
}

.smart-booking-btn-secondary:hover {
    background: #7f8c8d;
}

.smart-booking-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* ===== Alerts ===== */
.smart-booking-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.smart-booking-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.smart-booking-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.smart-booking-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.smart-booking-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== Modals ===== */
.smart-booking-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.smart-booking-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.smart-booking-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.smart-booking-close:hover {
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== Tables ===== */
.smart-booking-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.smart-booking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.smart-booking-table th,
.smart-booking-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.smart-booking-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.smart-booking-table tr:hover {
    background: #f8f9fa;
}

/* ===== Status Badges ===== */
.smart-booking-status-overdue {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.smart-booking-status-due {
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.smart-booking-status-upcoming {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.smart-booking-badge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.smart-booking-badge-warning {
    background: #f39c12;
}

/* ===== Lists ===== */
.smart-booking-list {
    max-height: 400px;
    overflow-y: auto;
}

.smart-booking-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.smart-booking-list-item:last-child {
    border-bottom: none;
}

.smart-booking-list-info {
    flex: 1;
}

.smart-booking-list-info strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

.smart-booking-list-info span {
    color: #7f8c8d;
    font-size: 14px;
}

.smart-booking-list-info small {
    display: block;
    color: #95a5a6;
    font-size: 12px;
    margin-top: 3px;
}

.smart-booking-list-actions {
    display: flex;
    gap: 10px;
}

/* ===== Loading Spinner ===== */
.smart-booking-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #3498db;
}

.smart-booking-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Dashboard Styles ===== */
.smart-booking-dashboard {
    padding: 20px;
}

.smart-booking-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.smart-booking-stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.smart-booking-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.smart-booking-stat-content h3 {
    font-size: 2rem;
    margin: 0;
    color: #2c3e50;
}

.smart-booking-stat-content p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.smart-booking-quick-actions {
    margin-bottom: 30px;
}

.smart-booking-quick-actions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.smart-booking-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.smart-booking-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.smart-booking-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: #3498db;
}

.smart-booking-action-btn i {
    font-size: 24px;
    color: #3498db;
}

.smart-booking-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.smart-booking-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.smart-booking-card-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smart-booking-card-header h3 {
    margin: 0;
    color: #2c3e50;
}

.smart-booking-card-content {
    padding: 20px;
}

.smart-booking-card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ===== Reminder Calendar ===== */
.smart-booking-reminder-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.smart-booking-reminder-day {
    text-align: center;
    padding: 15px 10px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.smart-booking-reminder-day.today {
    background: #3498db;
    color: white;
}

.smart-booking-reminder-date {
    margin-bottom: 10px;
}

.smart-booking-reminder-date .day-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.smart-booking-reminder-date .day-num {
    display: block;
    font-size: 18px;
    font-weight: bold;
}

.smart-booking-reminder-count {
    text-align: center;
}

.smart-booking-reminder-count .count {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
}

.smart-booking-reminder-day.today .smart-booking-reminder-count .count {
    color: white;
}

.smart-booking-reminder-count .label {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
}

.smart-booking-reminder-day.today .smart-booking-reminder-count .label {
    color: rgba(255,255,255,0.8);
}

/* ===== API Status ===== */
.smart-booking-api-status {
    text-align: center;
}

.smart-booking-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
}

.smart-booking-status-indicator.connected {
    background: #d4edda;
    color: #155724;
}

.smart-booking-status-indicator.warning {
    background: #fff3cd;
    color: #856404;
}

.smart-booking-status-indicator.error {
    background: #f8d7da;
    color: #721c24;
}

.smart-booking-api-message {
    margin-bottom: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

.smart-booking-api-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ===== Activity List ===== */
.smart-booking-activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.smart-booking-activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.smart-booking-activity-item:last-child {
    border-bottom: none;
}

.smart-booking-activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smart-booking-activity-icon.success {
    background: #d4edda;
    color: #155724;
}

.smart-booking-activity-icon.error {
    background: #f8d7da;
    color: #721c24;
}

.smart-booking-activity-icon.info {
    background: #d1ecf1;
    color: #0c5460;
}

.smart-booking-activity-content p {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.smart-booking-activity-content small {
    color: #7f8c8d;
    font-size: 12px;
}

/* ===== Bookings List ===== */
.smart-booking-bookings-list {
    margin-top: 40px;
}

.smart-booking-bookings-list h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .smart-booking-container {
        padding: 15px;
    }
    
    .smart-booking-header h2 {
        font-size: 2rem;
    }
    
    .smart-booking-form-container {
        padding: 20px;
    }
    
    .smart-booking-form-row {
        grid-template-columns: 1fr;
    }
    
    .smart-booking-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .smart-booking-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .smart-booking-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .smart-booking-reminder-calendar {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .smart-booking-api-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .smart-booking-header h2 {
        font-size: 1.5rem;
    }
    
    .smart-booking-form-group input,
    .smart-booking-form-group select,
    .smart-booking-form-group textarea {
        font-size: 14px;
    }
    
    .smart-booking-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .smart-booking-reminder-calendar {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* ===== Form Validation ===== */
.error {
    border-color: #e74c3c !important;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== Bookings List ===== */
.smart-booking-bookings-list {
    margin-top: 40px;
}

.smart-booking-bookings-list h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* ===== Print Styles ===== */
@media print {
    .smart-booking-btn,
    .smart-booking-modal,
    .smart-booking-actions-grid {
        display: none !important;
    }
    
    .smart-booking-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}