.wsp-booking {
    border: 1px solid #ddd;
    padding: clamp(16px, 4vw, 28px);
    border-radius: 12px;
    background: #fafafa;
    width: 100%;
    margin: 0 0 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.wsp-booking h2 {
    margin-top: 0;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.wsp-booking-form {
    display: grid;
    gap: clamp(12px, 2.4vw, 18px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    transition: opacity 0.3s ease;
}

.wsp-booking.is-loading .wsp-booking-form {
    opacity: 0.3;
}

.wsp-booking-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 250, 0.85);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.wsp-booking.is-loading .wsp-booking-loader {
    opacity: 1;
    visibility: visible;
}

.wsp-loader-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.wsp-booking-loader .glass-spinner {
    --bg-color: rgba(255, 255, 255, 0.25);
    --highlight: rgba(255, 255, 255, 0.75);
    --spinner-size: 80px;
    --ring-size: 64px;
    --core-size: 24px;

    position: relative;
    width: var(--spinner-size);
    height: var(--spinner-size);
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
}

.wsp-booking-loader .glass-filter,
.wsp-booking-loader .glass-overlay,
.wsp-booking-loader .glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.wsp-booking-loader .glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    filter: url(#wsp-glass-distortion) saturate(120%) brightness(1.15);
}

.wsp-booking-loader .glass-overlay {
    z-index: 2;
    background: var(--bg-color);
}

.wsp-booking-loader .glass-specular {
    z-index: 3;
    box-shadow: inset 1px 1px 1px var(--highlight);
}

.wsp-booking-loader .glass-content {
    position: relative;
    z-index: 4;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wsp-booking-loader .spinner-ring {
    position: absolute;
    width: var(--ring-size);
    height: var(--ring-size);
    border: 2px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.8);
    border-right-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: wsp-glass-spin 1s linear infinite;
}

.wsp-booking-loader .spinner-core {
    width: var(--core-size);
    height: var(--core-size);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: wsp-glass-pulse 1s ease-in-out infinite alternate;
}

@keyframes wsp-glass-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wsp-glass-pulse {
    from {
        transform: scale(0.8);
        opacity: 0.5;
    }
    to {
        transform: scale(1);
        opacity: 0.8;
    }
}

@media (prefers-color-scheme: dark) {
    .wsp-booking-loader .glass-spinner {
        --bg-color: rgba(0, 0, 0, 0.25);
        --highlight: rgba(255, 255, 255, 0.15);
    }
}

.wsp-booking-form label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    gap: 4px;
}

.wsp-field-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wsp-custom-question.is-hidden {
    display: none;
}

.wsp-booking-form input,
.wsp-booking-form select,
.wsp-booking-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #c9c9c9;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.35;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wsp-booking-form textarea {
    min-height: 120px;
}

.wsp-booking-form input:focus,
.wsp-booking-form select:focus,
.wsp-booking-form textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
    outline: none;
}

.wsp-booking-form .wsp-submit {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 14px;
    cursor: pointer;
    border-radius: 999px;
    font-size: 1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wsp-booking-form .wsp-submit:hover:not(:disabled) {
    transform: translateY(-1px);
}

.wsp-booking-form .wsp-submit:disabled {
    background: #888;
    cursor: not-allowed;
    opacity: 0.75;
}

.wsp-feedback {
    min-height: 24px;
    color: #444;
    font-weight: 600;
}

.wsp-feedback.success {
    color: #1b8a1b;
}

.wsp-feedback.error {
    color: #b32626;
}

.wsp-required-flag {
    color: #b32626;
    margin-left: 4px;
    font-weight: 700;
}

.wsp-full-row {
    grid-column: 1 / -1;
}

.wsp-address-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: clamp(12px, 2.4vw, 18px);
}

.wsp-address-row label {
    width: 100%;
}

@media (max-width: 640px) {
    .wsp-address-row {
        grid-template-columns: 1fr;
    }

    .wsp-address-row .wsp-house-number {
        max-width: 240px;
    }
}

.wsp-success-state {
    display: none;
    text-align: center;
    padding: 20px;
}

.wsp-booking-success > h2 {
    display: none;
}

.wsp-booking-success .wsp-booking-form {
    display: none;
}

.wsp-booking-success .wsp-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 2vw, 14px);
}

.wsp-success-visual {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wsp-success-gif {
    width: clamp(220px, 32vw, 280px);
    height: clamp(220px, 32vw, 280px);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.wsp-success-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wsp-success-text {
    font-size: 1.1rem;
    font-weight: 700;
    max-width: 460px;
    margin: 0;
}

.wsp-confetti {
    position: absolute;
    inset: -8%;
    width: 116%;
    height: 116%;
    overflow: visible;
    pointer-events: none;
    z-index: 2;
}

.wsp-confetti span {
    position: absolute;
    width: 10px;
    height: 16px;
    opacity: 0;
    border-radius: 2px;
    transform: translateY(-20px) rotate(0deg);
}

.wsp-confetti.is-active span {
    animation: wsp-confetti-burst 0.9s ease-out forwards;
}

.wsp-confetti span:nth-child(1) { left:20%; background:#f44336; animation-delay:0s; }
.wsp-confetti span:nth-child(2) { left:30%; background:#ff9800; animation-delay:0.05s; }
.wsp-confetti span:nth-child(3) { left:40%; background:#4caf50; animation-delay:0.1s; }
.wsp-confetti span:nth-child(4) { left:50%; background:#03a9f4; animation-delay:0.15s; }
.wsp-confetti span:nth-child(5) { left:60%; background:#3f51b5; animation-delay:0.2s; }
.wsp-confetti span:nth-child(6) { left:70%; background:#9c27b0; animation-delay:0.25s; }
.wsp-confetti span:nth-child(7) { left:25%; background:#e91e63; animation-delay:0.3s; }
.wsp-confetti span:nth-child(8) { left:35%; background:#ffc107; animation-delay:0.35s; }
.wsp-confetti span:nth-child(9) { left:45%; background:#8bc34a; animation-delay:0.4s; }
.wsp-confetti span:nth-child(10) { left:55%; background:#00bcd4; animation-delay:0.45s; }
.wsp-confetti span:nth-child(11) { left:65%; background:#673ab7; animation-delay:0.5s; }
.wsp-confetti span:nth-child(12) { left:75%; background:#ff5722; animation-delay:0.55s; }

@keyframes wsp-confetti-burst {
    0% { opacity:1; transform:translateY(0) rotate(0deg); }
    50% { opacity:1; }
    100% { opacity:0; transform:translateY(120px) rotate(220deg); }
}

@media (max-width: 600px) {
    .wsp-booking {
        border-radius: 10px;
        border-width: 1px;
        padding: 18px;
    }

    .wsp-booking-form label {
        font-size: 0.95rem;
    }

    .wsp-booking-form input,
    .wsp-booking-form select,
    .wsp-booking-form textarea {
        font-size: 1rem;
    }
}

@media (max-width: 720px) {
    .wsp-booking-form {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .wsp-booking-form .wsp-submit {
        justify-self: start;
    }
}
