.easy-pool-booking {
    --pool-bg: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
    --pool-border: rgba(14, 116, 144, 0.14);
    --pool-accent: #0f766e;
    --pool-accent-dark: #115e59;
    --pool-text: #0f172a;
    --pool-muted: #475569;
    --pool-surface: #ffffff;
    --pool-available: #dff7f0;
    --pool-selected: #0f766e;
    --pool-booked: #d9e2ec;
}

.easy-pool-booking__shell {
    background: var(--pool-bg);
    border: 1px solid var(--pool-border);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
}

.easy-pool-booking__header {
    margin-bottom: 24px;
}

.easy-pool-booking__title {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.05;
    color: var(--pool-text);
}

.easy-pool-booking__description,
.easy-pool-booking__hint,
.easy-pool-booking__response {
    color: var(--pool-muted);
}

.easy-pool-booking__topbar,
.easy-pool-booking__grid,
.easy-pool-booking__legend,
.easy-pool-booking__tabs,
.easy-pool-booking__legend span,
.easy-pool-booking__location-meta,
.easy-pool-booking__footer {
    display: flex;
    gap: 16px;
}

.easy-pool-booking__topbar,
.easy-pool-booking__footer,
.easy-pool-booking__location-meta {
    justify-content: space-between;
    align-items: center;
}

.easy-pool-booking__topbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.easy-pool-booking__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.easy-pool-booking__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pool-text);
}

.easy-pool-booking input,
.easy-pool-booking textarea {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 16px;
    background: #fff;
    padding: 14px 16px;
    color: var(--pool-text);
}

.easy-pool-booking__availability {
    margin: 24px 0;
    min-height: 220px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 24px;
    padding: 10px;
}

.easy-pool-booking__tabs {
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.easy-pool-booking__tab {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: var(--pool-text);
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.easy-pool-booking__tab.is-active {
    background: var(--pool-accent);
    color: #fff;
    border-color: var(--pool-accent);
}

.easy-pool-booking__location-meta {
    margin-bottom: 16px;
}

.easy-pool-booking__location-meta-primary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.easy-pool-booking__location-meta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.easy-pool-booking__layout-toggle {
    border: 1px solid #0e7997;
    border-radius: 999px;
    background: #0e7997;
    color: white;
    font-size: 14px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.easy-pool-booking__layout-toggle::before {
    content: '';
    width: 14px;
    height: 14px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.easy-pool-booking__layout-preview {
    margin: 0 0 18px;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(14, 116, 144, 0.12);
}

.easy-pool-booking__layout-note {
    margin: 0;
    color: var(--pool-muted);
}

.easy-pool-booking__layout-viewport {
    width: 100%;
}

.easy-pool-booking__layout-stage {
    position: relative;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
}

.easy-pool-booking__layout-image {
    position: absolute;
    display: block;
    height: auto;
    max-width: none;
}

.easy-pool-booking__layout-spot {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
}

.easy-pool-booking__layout-spot.is-available {
    background: rgba(223, 247, 240, 0.82);
    color: var(--pool-accent-dark);
}

.easy-pool-booking__layout-spot.is-selected {
    background: rgba(15, 118, 110, 0.9);
    color: #fff;
}

.easy-pool-booking__layout-spot.is-booked {
    background: rgba(217, 226, 236, 0.9);
    color: #475569;
}

.easy-pool-booking__layout-spot:disabled {
    cursor: not-allowed;
}

.easy-pool-booking__locations span {
    color: var(--pool-muted);
    font-size: 14px;
}

.easy-pool-booking__spots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
}

.easy-pool-booking__spot {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: var(--pool-available);
    color: var(--pool-accent-dark);
    padding: 10px 10px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.easy-pool-booking__spot:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.16);
}

.easy-pool-booking__spot.is-selected {
    background: var(--pool-selected);
    color: #fff;
    border-color: var(--pool-selected);
}

.easy-pool-booking__spot.is-booked,
.easy-pool-booking__spot:disabled {
    background: var(--pool-booked);
    color: #64748b;
    cursor: not-allowed;
}

.easy-pool-booking__summary {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--pool-text);
}

.easy-pool-booking__grid {
    flex-wrap: wrap;
}

.easy-pool-booking__grid > .easy-pool-booking__field {
    flex: 1 1 220px;
}

.easy-pool-booking__grid > .easy-pool-booking__field--count {
    flex: 0 1 calc(50% - 8px);
    min-width: 0;
}

.easy-pool-booking__topbar > .easy-event-booking__field--date {
    grid-column: 1 / -1;
}

.easy-pool-booking__topbar > .easy-pool-booking__field--count {
    min-width: 0;
}

.easy-pool-booking__topbar > .easy-pool-booking__legend {
    grid-column: 1 / -1;
}

.easy-pool-booking__field--message {
    margin-top: 18px;
}

.easy-pool-booking__button,
.easy-pool-booking__modal-button {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pool-accent) 0%, #0284c7 100%);
    color: #fff;
    padding: 14px 24px;
    font-weight: 800;
    cursor: pointer;
}

.easy-pool-booking__response.is-error {
    color: #b91c1c;
}

.easy-pool-booking__response.is-success {
    color: #047857;
}

.easy-pool-booking__anti-bot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.easy-pool-booking__legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.easy-pool-booking__legend .is-available {
    background: var(--pool-available);
}

.easy-pool-booking__legend .is-selected {
    background: var(--pool-selected);
}

.easy-pool-booking__legend .is-booked {
    background: var(--pool-booked);
}

.easy-pool-booking__popup,
.easy-pool-booking__modal {
    position: fixed;
    inset: 0;
    z-index: 10070;
}

.easy-pool-booking__popup[hidden],
.easy-pool-booking__modal[hidden] {
    display: none !important;
}

.easy-pool-booking__popup-backdrop,
.easy-pool-booking__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.56);
}

.easy-pool-booking__popup-dialog,
.easy-pool-booking__modal-dialog {
    position: relative;
    width: min(1080px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    overflow: auto;
}

.easy-pool-booking__popup-dialog {
    background: var(--pool-bg);
    border: 1px solid var(--pool-border);
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
}

.easy-pool-booking__modal-dialog {
    width: min(460px, calc(100vw - 24px));
    margin-top: 12vh;
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    text-align: center;
}

.easy-pool-booking__popup-close {
    position: sticky;
    top: 10px;
    left: calc(100% - 48px);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
    z-index: 10071;
}

.easy-pool-booking__popup-close::before,
.easy-pool-booking__popup-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
}

.easy-pool-booking__popup-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.easy-pool-booking__popup-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 767px) {
    .easy-pool-booking__shell {
        border-radius: 22px;
    }

    .easy-pool-booking__popup-dialog {
        background: var(--pool-bg);
        border: 1px solid var(--pool-border);
        border-radius: 17px;
        padding: 20px;
        box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
    }

    .easy-pool-booking__title {
        font-size: 28px;
    }

    .easy-pool-booking__legend,
    .easy-pool-booking__legend span {
        font-size: 12px;
    }

    .easy-pool-booking__location-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .easy-pool-booking__layout-toggle {
        font-size: 12px;
        padding: 8px 12px;
    }

    .easy-pool-booking__layout-spot {
        font-size: 8px;
        padding: 2px;
    }

    .easy-pool-booking__tab {
        font-size: 12px;
    }

    .easy-pool-booking__topbar,
    .easy-pool-booking__footer,
    .easy-pool-booking__location-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .easy-pool-booking__popup-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}
