@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Open+Sans:wght@400;600;700&display=swap");

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: hsl(0 0% 96%);
    color: hsl(200 10% 15%);
    font-family: "Open Sans", sans-serif;
    line-height: 1.45;
}

a {
    color: hsl(215 90% 42%);
}

.container {
    width: min(1200px, 94vw);
    margin: 1.7rem auto 2.2rem;
}

.container.narrow {
    width: min(760px, 94vw);
}

.order-hero {
    background: linear-gradient(135deg, hsl(130 55% 32%), hsl(130 40% 22%));
    border-bottom: 4px solid hsl(48 95% 50%);
}

.order-hero-inner {
    width: min(1200px, 94vw);
    min-height: 108px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0 auto;
    padding: 0.65rem 0;
}

.club-mark {
    width: 58px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(1px 0 0 #ffffff)
        drop-shadow(-1px 0 0 #ffffff)
        drop-shadow(0 1px 0 #ffffff)
        drop-shadow(0 -1px 0 #ffffff);
}

.order-hero-copy h1,
.card h1,
.card h2 {
    font-family: "Oswald", sans-serif;
    line-height: 1;
}

.order-hero-copy h1 {
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
    font-size: clamp(1.875rem, 3.2vw, 2.25rem);
    letter-spacing: 0;
}

.order-hero-copy p {
    margin: 0.2rem 0 0;
    color: hsl(0 0% 100% / 0.9);
    font-size: 0.875rem;
}

.order-hero-copy .order-hero-category {
    color: hsl(0 0% 100% / 0.78);
    font-size: 0.8rem;
    letter-spacing: 0;
}

.card {
    background: #ffffff;
    border: 1px solid hsl(200 10% 82%);
    border-radius: 6px;
    padding: 1.5rem;
}

.card h1,
.card h2 {
    margin: 0 0 0.8rem;
    color: hsl(200 10% 15%);
    font-size: 1.5rem;
}

.hint {
    color: hsl(200 10% 40%);
    font-size: 0.875rem;
    margin: 0;
}

.alert {
    margin-bottom: 1rem;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf3;
    border-color: #b7ebc6;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #854d0e;
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 1.2rem;
    margin-top: 1.2rem;
    align-items: start;
}

.side-stack {
    display: grid;
    gap: 1.2rem;
}

.calendar-toolbar {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.calendar-toolbar h2 {
    margin: 0;
    text-align: center;
    text-transform: uppercase;
}

.calendar-nav {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(200 10% 82%);
    border-radius: 6px;
    background: hsl(0 0% 96%);
    color: hsl(130 55% 26%);
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
}

.calendar-nav:hover {
    background: hsl(130 45% 95%);
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.calendar-weekdays span {
    color: hsl(200 10% 40%);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
}

.calendar-grid {
    gap: 0.35rem;
}

.calendar-day {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.48rem;
    border: 1px solid hsl(200 10% 82%);
    border-radius: 6px;
    background: #ffffff;
    color: hsl(200 10% 15%);
    text-decoration: none;
}

.calendar-day:hover {
    border-color: hsl(130 55% 32%);
    background: hsl(130 45% 97%);
}

.calendar-day.is-muted {
    background: hsl(0 0% 98%);
    color: hsl(200 8% 58%);
}

.calendar-day.is-selected {
    border-color: hsl(130 55% 32%);
    box-shadow: inset 0 0 0 2px hsl(130 55% 32%);
}

.calendar-day.is-today .calendar-date-number {
    background: hsl(48 95% 50%);
    color: hsl(200 10% 15%);
}

.calendar-date-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 700;
}

.calendar-badges {
    display: grid;
    gap: 0.25rem;
}

.reservation-chip,
.reservation-more {
    min-width: 0;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    padding: 0.22rem 0.32rem;
    background: hsl(130 55% 32%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reservation-tooltip {
    position: relative;
}

.reservation-tooltip-content {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 50;
    width: max-content;
    min-width: 190px;
    max-width: min(270px, 72vw);
    display: grid;
    gap: 0.2rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid hsl(130 55% 32%);
    border-radius: 6px;
    background: #ffffff;
    color: hsl(200 10% 15%);
    box-shadow: 0 12px 28px hsl(200 20% 15% / 0.18);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: normal;
}

.reservation-tooltip-content strong {
    color: hsl(130 55% 26%);
    font-family: "Oswald", sans-serif;
    font-size: 1rem;
    line-height: 1.05;
}

.reservation-tooltip-content small {
    color: hsl(200 10% 40%);
    font-size: 0.8rem;
    font-weight: 600;
}

.reservation-tooltip:hover {
    overflow: visible;
}

.reservation-tooltip:hover .reservation-tooltip-content,
.reservation-tooltip:focus .reservation-tooltip-content {
    opacity: 1;
    transform: translateY(0);
}

.reservation-more {
    background: hsl(200 10% 40%);
}

.empty-state {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: hsl(200 10% 40%);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

.reservation-list {
    display: grid;
    gap: 0.55rem;
}

.reservation-item {
    display: grid;
    gap: 0.15rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid hsl(200 10% 82%);
    border-left: 4px solid hsl(130 55% 32%);
    border-radius: 6px;
    background: hsl(0 0% 98%);
}

.reservation-item strong {
    color: hsl(130 55% 26%);
    font-family: "Oswald", sans-serif;
    font-size: 1.05rem;
}

.reservation-item small {
    color: hsl(200 10% 40%);
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: block;
    color: hsl(200 10% 15%);
    font-size: 0.875rem;
    font-weight: 700;
}

input,
select,
textarea,
button {
    width: 100%;
    min-height: 40px;
    margin-top: 0.25rem;
    border: 1px solid hsl(200 10% 82%);
    border-radius: 6px;
    background: hsl(0 0% 96%);
    padding: 0.5rem 0.68rem;
    font-family: inherit;
    font-size: 0.875rem;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid hsl(130 55% 72%);
    outline-offset: 1px;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.reservation-form {
    display: grid;
    gap: 1rem;
}

.reservation-fieldset {
    display: grid;
    gap: 1rem;
}

.required {
    color: #b42318;
}

.recaptcha-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 92px;
    padding-bottom: 8px;
}

.actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.button-primary {
    width: auto;
    min-width: 220px;
    background: hsl(130 55% 32%);
    border-color: hsl(130 55% 32%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
}

.button-primary:hover {
    filter: brightness(0.94);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid hsl(200 10% 82%);
    padding: 0.55rem 0.6rem;
    text-align: left;
    vertical-align: middle;
}

th {
    background: hsl(0 0% 98%);
    font-weight: 700;
}

.admin-table {
    min-width: 760px;
    background: #ffffff;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.admin-actions form {
    margin: 0;
}

.button-link,
.button-danger {
    width: auto;
    min-width: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    border-radius: 6px;
    padding: 0.42rem 0.68rem;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.button-link {
    border: 1px solid hsl(130 55% 32%);
    background: hsl(130 45% 97%);
    color: hsl(130 55% 26%);
}

.button-danger {
    border: 1px solid #b42318;
    background: #b42318;
    color: #ffffff;
}

code {
    border-radius: 4px;
    background: hsl(0 0% 92%);
    padding: 0.1rem 0.25rem;
}

@media (max-width: 980px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 104px;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(1200px, 96vw);
        margin-top: 1rem;
    }

    .order-hero-inner {
        min-height: 98px;
    }

    .club-mark {
        width: 50px;
        height: 74px;
    }

    .order-hero-copy h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 1rem;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 0.18rem;
    }

    .calendar-weekdays {
        gap: 0.18rem;
    }

    .calendar-day {
        min-height: 78px;
        padding: 0.28rem;
    }

    .calendar-date-number {
        width: 24px;
        height: 24px;
        font-size: 0.82rem;
    }

    .reservation-chip {
        padding: 0.15rem 0.22rem;
        font-size: 0.62rem;
    }

    .button-primary {
        width: 100%;
    }
}
