/* Car Workshop Appointment System - Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin-bottom: 5px;
    font-size: 24px;
}

.header p {
    font-size: 14px;
    color: #bdc3c7;
}

/* Navigation */
.nav {
    background-color: #34495e;
    padding: 10px 20px;
    text-align: right;
}

.nav a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.nav a:hover {
    color: #2ecc71;
}

/* Card / Box */
.card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.validation-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 3px;
}

/* Buttons */
.btn {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Mechanic Selection */
.mechanic-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.mechanic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mechanic-card {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    width: calc(50% - 5px);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
}

.mechanic-card:hover {
    border-color: #3498db;
}

.mechanic-card.selected {
    border-color: #3498db;
    background-color: #ebf5fb;
}

.mechanic-card.disabled {
    background-color: #f8f8f8;
    color: #999;
    cursor: not-allowed;
    border-color: #eee;
}

.mechanic-card .name {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 5px;
}

.mechanic-card .specialization {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

.mechanic-card .slots {
    font-size: 13px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
}

.slots-green {
    background-color: #d4edda;
    color: #155724;
}

.slots-yellow {
    background-color: #fff3cd;
    color: #856404;
}

.slots-red {
    background-color: #f8d7da;
    color: #721c24;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

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

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

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background-color: #2c3e50;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
}

table td {
    padding: 10px 8px;
    border-bottom: 1px solid #ddd;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #eef;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
}

/* Filter */
.filter-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-row label {
    font-weight: bold;
    font-size: 14px;
}

.filter-row input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.filter-row .btn-clear {
    background-color: #95a5a6;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: white;
    border-radius: 5px;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.modal-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Help Section */
.help-section {
    margin-top: 20px;
}

.help-toggle {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    border-radius: 4px;
    width: 100%;
    text-align: left;
}

.help-toggle:hover {
    background-color: #d5dbdb;
}

.help-content {
    display: none;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    padding: 15px;
    border-radius: 0 0 5px 5px;
}

.help-content.show {
    display: block;
}

.help-content h4 {
    color: #2c3e50;
    margin: 10px 0 5px 0;
    font-size: 14px;
}

.help-content h4:first-child {
    margin-top: 0;
}

.help-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

/* Placeholder text */
.placeholder-text {
    color: #999;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .mechanic-card {
        width: 100%;
    }
    
    .stats-row {
        flex-direction: column;
    }
    
    table {
        font-size: 12px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Print Styles for Booking Receipt */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    body * {
        visibility: hidden;
    }
    #receipt-modal, #receipt-modal-content, #receipt-modal-content * {
        visibility: visible;
    }
    #receipt-modal {
        display: flex !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        background-color: white !important;
    }
    #receipt-modal-content {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #receipt-modal-content .modal-buttons {
        display: none !important;
    }
}
