:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --selected-color: #28a745;
    --selected-border: #1e7e34;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --text-color: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 1rem;
}

#app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 900px;
    width: 100%;
}

.calendar-wrapper {
    flex: 2;
    min-width: 320px;
}

.booking-form-wrapper {
    flex: 1;
    min-width: 280px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.calendar-header button {
    background: none;
    border: 1px solid var(--medium-gray);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background-color 0.2s;
}

.calendar-header button:hover {
    background-color: var(--medium-gray);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    position: relative;
}

.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}
.loading-spinner:after {
    content: ' ';
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #ccc;
    border-color: #ccc transparent #ccc transparent;
    animation: loading-spinner 1.2s linear infinite;
}
@keyframes loading-spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.day-name {
    font-weight: bold;
    text-align: center;
    padding-bottom: 0.5rem;
    color: var(--dark-gray);
}

.day-cell {
    border: 1px solid #ddd;
    background-color: white;
    height: 90px;
    padding: 5px;
    transition: background-color 0.2s;
}

.day-cell.other-month {
    background-color: var(--light-gray);
    color: #ccc;
}

.day-number {
    font-weight: bold;
    font-size: 0.9em;
}

.day-blocks {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.block {
    padding: 4px;
    border-radius: 4px;
    background-color: var(--medium-gray);
    color: #aaa;
    text-align: center;
    font-size: 0.8em;
    font-weight: 500;
}

.block.available {
    background-color: #c8e6c9;
    color: #2e7d32;
    cursor: pointer;
    transition: background-color 0.2s;
}

.block.available:hover {
    background-color: #a5d6a7;
}

.block.selected {
    background-color: var(--selected-color);
    color: white;
    border: 2px solid var(--selected-border);
    font-weight: bold;
}

.block.secondary-outline {
    border: 2.5px solid #137333 !important;
    background-color: #c8e6c9 !important;
    color: #2e7d32 !important;
    font-weight: bold;
}

.choice-btn {
    padding: 8px 18px;
    font-size: 1em;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.choice-btn.active {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-hover);
}
.choice-btn:not(.active):hover {
    background: var(--medium-gray);
}

.booking-form-wrapper h3 {
    margin-top: 0;
}

.selections p {
    margin: 0.5rem 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

label {
    font-weight: bold;
    font-size: 0.9em;
}

input {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button[type="submit"] {
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button[type="submit"]:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: var(--medium-gray);
    cursor: not-allowed;
}

#form-message {
    margin-top: 1rem;
    font-weight: bold;
}
#form-message.success { color: #2e7d32; }
#form-message.error { color: #d32f2f; }

