/* Reset and base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* Header */
header {
    background: #1b5e20;
    color: white;
    padding: 1rem 2rem;
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    margin-bottom: 1rem;
    color: #1b5e20;
}

h2 {
    margin-bottom: 0.75rem;
    color: #2e7d32;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    margin-top: 2rem;
}

/* Month navigation */
.month-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.month-nav a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #1b5e20;
    border-radius: 4px;
    transition: background 0.2s;
}

.month-nav a:hover {
    background: #1b5e20;
    color: white;
}

/* Info card */
.info-card {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-day {
    text-align: center;
    padding: 0.5rem;
}

.info-day strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.info-day span {
    font-size: 0.8rem;
    color: #666;
}

.closed-label {
    color: #999 !important;
    font-style: italic;
}

/* Calendar grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header {
    text-align: center;
    font-weight: bold;
    padding: 0.75rem;
    background: #f5f5f5;
    font-size: 0.85rem;
}

.calendar-cell {
    min-height: 60px;
    padding: 0.5rem;
    text-align: center;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.calendar-cell.empty {
    background: transparent;
}

.calendar-cell.closed {
    background: #e0e0e0;
    color: #999;
}

.calendar-cell.booked {
    background: #ffcdd2;
    color: #b71c1c;
    cursor: pointer;
}

.calendar-cell.booked:hover {
    opacity: 0.8;
}

.calendar-cell.available {
    background: #c8e6c9;
    color: #1b5e20;
    cursor: pointer;
    font-weight: 500;
}

.calendar-cell.available:hover {
    opacity: 0.8;
    background: #a5d6a7;
}

.day-number {
    font-size: 1.1rem;
}

/* Booking page */
.closed-message {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.closed-message a {
    color: #1b5e20;
}

.error-message {
    background: #ffcdd2;
    color: #b71c1c;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.booking-layout {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.booking-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.job-selection-pane {
    flex: 1;
    min-width: 300px;
}

.availability-pane {
    flex: 1;
    min-width: 300px;
}

.contact-card {
    flex: 1;
    min-width: 300px;
    background: #e8f5e9;
    padding: 1.5rem;
    border-radius: 8px;
}

.contact-card p {
    margin-bottom: 0.5rem;
}

/* Form styling */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #555;
}

.radio-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal !important;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-label:hover {
    background: #f5f5f5;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal !important;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f5f5f5;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #1b5e20;
    box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.2);
}

/* Time slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}

.time-slot.busy {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.time-slot.selectable {
    background: #c8e6c9;
    cursor: pointer;
    border-color: #a5d6a7;
}

.time-slot.selectable:hover {
    background: #a5d6a7;
}

.time-slot.selected {
    background: #1b5e20;
    color: white;
    border-color: #1b5e20;
}

.time-slot.selected-block {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.slot-status {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Form actions */
.form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-submit {
    background: #1b5e20;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background: #2e7d32;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Job detail page */
.job-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
}

.job-status-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    text-transform: capitalize;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.status-booked {
    background: #fff3e0;
    color: #e65100;
}

.status-confirmed {
    background: #e8f5e9;
    color: #1b5e20;
}

.status-completed {
    background: #e3f2fd;
    color: #0d47a1;
}

.status-cancelled {
    background: #ffebee;
    color: #b71c1c;
}

.job-info {
    margin-bottom: 1.5rem;
}

.job-info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.job-info-row strong {
    width: 120px;
    flex-shrink: 0;
    color: #555;
}

.job-id {
    color: #999;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .info-card {
        grid-template-columns: repeat(4, 1fr);
    }

    .booking-columns {
        flex-direction: column;
    }

    .calendar-grid {
        font-size: 0.85rem;
    }

    .calendar-cell {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .info-card {
        grid-template-columns: repeat(2, 1fr);
    }
}
