/**
 * Main CSS for Appointment Booking System
 */

/* Reset and Base Styles */
.ab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Buttons */
.ab-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.ab-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.ab-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.ab-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ab-btn-primary {
    background-color: #2196F3;
}

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

.ab-btn-success {
    background-color: #28a745;
}

.ab-btn-danger {
    background-color: #dc3545;
}

.ab-btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.ab-btn-info {
    background-color: #17a2b8;
}

.ab-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.ab-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Forms */
.ab-form-group {
    margin-bottom: 20px;
}

.ab-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.ab-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ab-form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.ab-form-control:invalid {
    border-color: #dc3545;
}

.ab-form-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.ab-form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Booking Form */
.ab-booking-form {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ab-booking-form h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.ab-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ab-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ab-form-section h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
}

.ab-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ab-form-col {
    flex: 1;
}

.ab-form-col-2 {
    flex: 0 0 calc(50% - 10px);
}

.ab-form-col-3 {
    flex: 0 0 calc(33.333% - 14px);
}

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

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

.ab-time-slot:hover {
    border-color: #2196F3;
    background-color: #f8f9fa;
}

.ab-time-slot.selected {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

.ab-time-slot:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Pricing Plans */
.ab-pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.ab-pricing-plan {
    background: white;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ab-pricing-plan:hover {
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.ab-pricing-plan.selected {
    border-color: #2196F3;
    background-color: #f8f9fa;
}

.ab-pricing-plan.featured {
    border-color: #28a745;
    position: relative;
}

.ab-pricing-plan.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ab-plan-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ab-plan-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ab-plan-pricing {
    margin-bottom: 25px;
}

.ab-price {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2196F3;
    margin-bottom: 5px;
}

.ab-price-period {
    color: #666;
    font-size: 14px;
}

.ab-feature-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: left;
}

.ab-feature-list li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.ab-feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Calendar */
.ab-calendar-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ab-calendar {
    width: 100%;
    min-height: 600px;
}

/* Appointment List */
.ab-appointment-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ab-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ab-appointment-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.ab-appointment-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #2196F3;
}

.ab-appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ab-appointment-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ab-appointment-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.ab-appointment-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.ab-appointment-actions {
    display: flex;
    gap: 10px;
}

/* Status Badges */
.ab-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.ab-status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ab-status-confirmed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ab-status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.ab-status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Notifications */
#ab-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.ab-notification {
    background: white;
    border-left: 4px solid;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease;
}

.ab-notification-success {
    border-left-color: #28a745;
}

.ab-notification-error {
    border-left-color: #dc3545;
}

.ab-notification-warning {
    border-left-color: #ffc107;
}

.ab-notification-info {
    border-left-color: #17a2b8;
}

.ab-notification-message {
    flex: 1;
    color: #333;
}

.ab-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    margin-left: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modals */
.ab-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;
}

.ab-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideInDown 0.3s ease;
}

.ab-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.ab-close:hover {
    color: #333;
}

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

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

/* Loading States */
.ab-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.ab-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Service List */
.ab-service-list {
    margin: 30px 0;
}

.ab-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ab-service-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ab-service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ab-service-image {
    height: 200px;
    overflow: hidden;
}

.ab-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-service-content {
    padding: 20px;
}

.ab-service-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ab-service-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.ab-service-pricing {
    margin-bottom: 20px;
}

.ab-service-pricing .ab-price {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: #2196F3;
    margin-right: 10px;
}

.ab-service-actions {
    display: flex;
    gap: 10px;
}

/* User Dashboard */
.ab-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ab-dashboard-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.ab-dashboard-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 300;
}

.ab-dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.ab-dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ab-dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Search */
.ab-search-container {
    margin-bottom: 30px;
}

.ab-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ab-search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.ab-search-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.ab-search-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ab-container {
        padding: 15px;
    }
    
    .ab-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .ab-form-col-2,
    .ab-form-col-3 {
        flex: 1;
    }
    
    .ab-pricing-plans {
        grid-template-columns: 1fr;
    }
    
    .ab-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .ab-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .ab-appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ab-appointment-actions {
        flex-wrap: wrap;
    }
    
    .ab-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    #ab-notifications {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .ab-dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .ab-search-form {
        flex-direction: column;
    }
    
    .ab-search-filters {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ab-booking-form {
        padding: 20px;
    }
    
    .ab-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ab-appointment-actions {
        flex-direction: column;
    }
    
    .ab-service-actions {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .ab-btn,
    .ab-appointment-actions,
    .ab-service-actions,
    #ab-notifications {
        display: none;
    }
    
    .ab-appointment-item,
    .ab-service-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}