.firebook-calendar-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: inherit;
    color: inherit;
}

.firebook-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -62px;
}

.firebook-calendar-navigation .button {
    z-index: 1;
}

.firebook-calendar-views {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 476px; /* Prevent bouncing between months of different lengths */
}

.firebook-month-view {
    flex: 1;
    min-width: 300px;
}

.firebook-month-view h3 {
    text-align: center;
    margin-bottom: 10px;
}

.firebook-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #ddd;
}

.firebook-day-header {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    background: #f4f4f4;
}

.firebook-day {
    aspect-ratio: 1/1;
    border: 0.5px solid #eee;
    position: relative;
    cursor: default;
    overflow: hidden;
}

.firebook-day.other-month {
    background: #fafafa;
    color: #ccc;
}

.firebook-day-number {
    position: absolute;
    top: 2px;
    left: 4px;
    z-index: 2;
    font-size: 0.8em;
    pointer-events: none;
    transition: color 0.2s;
}

/* Half-day fills */
.firebook-slot-fill {
    position: absolute;
    left: 0;
    width: 100%;
    background-color: var(--wp--preset--color--primary, #0073aa);
    opacity: 0.7;
    z-index: 1;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.firebook-slot-fill.start {
    top: 50%;
    height: 50%;
}

.firebook-slot-fill.end {
    top: 0;
    height: 50%;
}

.firebook-slot-fill.full {
    top: 0;
    height: 100%;
}

.firebook-slot-fill.start.end {
    top: 0;
    height: 100%;
}

.firebook-slot-fill:hover,
.firebook-slot-fill.highlight {
    background-color: var(--wp--preset--color--primary, #0073aa);
    opacity: 1;
}

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

.firebook-modal-content {
    background-color: #fefefe;
    border: 1px solid #888;
    width: 600px;
    max-width: 95%;
    max-height: 90vh;
    border-radius: 5px;
    color: #333;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.firebook-modal-header {
    padding: 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.firebook-modal-form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.firebook-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.firebook-modal-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

.firebook-name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.firebook-total-price-display {
    font-size: 1.2em;
    text-align: right;
    border-top: 2px solid #ddd;
    padding-top: 10px;
}

.firebook-confirmation-details {
    background: #f1f1f1;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.firebook-modal input,
.firebook-modal textarea,
.firebook-modal select {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: inherit;
}

.firebook-modal .button {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.firebook-modal .button-primary {
    background-color: var(--wp--preset--color--primary, #0073aa);
    color: #fff;
}

.firebook-modal .button-primary:hover {
    background-color: var(--wp--preset--color--primary, #0073aa);
    filter: brightness(0.9);
}

.firebook-modal .button:not(.button-primary) {
    background-color: #eee;
    color: #333;
    border-color: #ccc;
}

.firebook-modal .button:not(.button-primary):hover {
    background-color: #e0e0e0;
}

.firebook-modal .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Tooltip Styles */
.firebook-field-wrapper {
    position: relative;
}

.firebook-tooltip {
    position: absolute;
    background: #d63638;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1001;
    bottom: 100%;
    left: 0;
    margin-bottom: 5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: none;
}

.firebook-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 10px;
    border-width: 5px;
    border-style: solid;
    border-color: #d63638 transparent transparent transparent;
}

.firebook-field-wrapper > input[type="checkbox"] + .firebook-tooltip::after {
    left: auto;
    right: 10px;
}

.firebook-field-error input,
.firebook-field-error textarea,
.firebook-field-error select {
    border-color: #d63638 !important;
}

.firebook-terms-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    position: relative;
}

.firebook-terms-container input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}

.firebook-terms-text {
    font-size: 0.9em;
}

.firebook-form-message {
    margin-top: 15px;
    font-size: 0.9em;
}

body.firebook-no-scroll {
    overflow: hidden;
}

.firebook-terms-content h1 { font-size: 1.5em; margin-top: 0; }
.firebook-terms-content h2 { font-size: 1.3em; }
.firebook-terms-content h3 { font-size: 1.1em; }
.firebook-terms-content ul { padding-left: 20px; list-style-type: disc; }

@media (max-width: 650px) {
    .firebook-calendar-views {
        flex-direction: column;
    }
    .firebook-calendar-navigation {
        margin-bottom: 0;
    }
}
