/* Basic Reset */
body {
    margin: 0;
    font-family: 'Roboto', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Variables for consistency */
:root {
    --primary-color: #007bff; /* Blue for primary actions */
    --primary-color-lightened: #66b3ff; /* Lighter shade of primary blue */
    --success-color: #28a745; /* Deeper green for successful/reserved states */
    --success-color-lightened: #d4edda; /* Light green for reserved backgrounds */
    --border-color: #d1d1d1;
    --light-gray: #f4f5f6;
    --red-color: #e51d1d; /* For error/disabled states if needed */
    --text-color: #333;
    --subtle-text-color: #777;
    --button-bg: #E1E1E1; /* Default button background */
    --button-border: #9B9B9B; /* Default button border */
}

/* General Layout */
.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    padding: 0.6rem 1.5rem; 
    margin-right: 10px; 
    border-radius: 6px; 
    display: inline-block;
}

.nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.nav hr {
    border: none;
    border-top: 1px solid #e0e0e0; 
    margin-top: 12px;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.6em 1em;
    border-radius: 20px; /* Pill shape */
    font-size: 0.9em;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    -webkit-appearance: none; /* Remove default button styles for consistency */
    -moz-appearance: none;
    appearance: none;
    margin-bottom: 0; /* Override any default margins */
}

.button-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.button-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

select {
    width: 100%;
    padding: 0.6em 1em;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20512%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M192%20256L64%20128v256l128-128z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    background-size: 0.6em;
}

/* Status messages */
#status {
    margin-top: 1em;
    padding: 1em;
    border-radius: 4px;
}

.success {
    background-color: var(--success-color-lightened);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.error {
    background-color: #f8d7da; /* Using a slightly different red from var(--red-color) for error background */
    color: var(--red-color);
    border: 1px solid #f5c6cb;
}

/* Time Slots (Booking Page) */
.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    margin-bottom: 1.5em;
}

.time-slot {
    border-radius: 20px; /* Pill shape */
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Calendar (Reserve Page) */
.calendar {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 20px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--border-color);
}

.weekday {
    padding: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    color: var(--text-color);
}

.week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--light-gray);
}
.week:last-child {
    border-bottom: none;
}

.day {
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid var(--light-gray);
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    position: relative;
    box-sizing: border-box;
    transition: background-color 0.2s;
    color: var(--text-color);
}
.day:last-child {
    border-right: none;
}
.day.selected {
    background-color: var(--primary-color);
    color: #fff;
}
.day.today {
    background-color: #ffe0b2;
    border: 1px solid #ffb74d;
    color: var(--text-color);
}
.day.today.selected {
    background-color: var(--primary-color);
    color: #fff;
}
.day.reserve {
    background-color: var(--success-color-lightened);
    color: var(--text-color);
}
.day.reserve.selected {
    background-color: var(--success-color);
    color: #fff;
}
.day.disabled {
    background-color: #fcfcfc;
    color: var(--subtle-text-color);
    cursor: not-allowed;
    opacity: 0.7;
}
.day-number {
    font-size: 1.1em;
    font-weight: bold;
}
.day-name {
    font-size: 0.8em;
    color: var(--subtle-text-color);
}

/* Timeslots Grid (Reserve Page) */
.timeslots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8em;
}

.timeslot { /* This targets the button element */
    border-radius: 20px;
    padding: 0.6em 1em;
    font-size: 0.9em;
    line-height: 1;
    height: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 0 !important;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.timeslot:hover {
    opacity: 0.8;
}

/* Specific states for timeslots */
.timeslot.available.selected {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.timeslot.reserve {
    background-color: var(--success-color-lightened);
    border-color: var(--success-color);
    color: var(--text-color);
}
.timeslot.reserve.selected {
    background-color: var(--success-color);
    color: #fff;
    border-color: var(--success-color);
}

.date-header {
    font-size: 1.0em;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
}

/* Utility for grid layout in booking.html */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px; /* Adjust for column padding */
    margin-right: -15px; /* Adjust for column padding */
}

.column {
    flex: 1;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%; /* Ensure columns don't overflow */
}
