.dealer-popup-modal {
    z-index: 9999;
}

.dealer-popup-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: min(90vh, 42rem);
    background: var(--color-ducati-white, #fff);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .dealer-popup-shell {
        max-width: 50rem;
    }
}

.action-modal.is-open .dealer-popup-shell {
    transform: translateY(0) scale(1);
}

.dealer-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 24rem;
    height: 100%;
}

.dealer-popup-media {
    position: relative;
    min-height: 16rem;
    background: var(--color-ducati-black, #1a1a1a);
    overflow: hidden;
}

.dealer-popup-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dealer-popup-image--empty {
    min-height: 100%;
    background: linear-gradient(
        135deg,
        var(--color-ducati-black, #1a1a1a) 0%,
        var(--color-ducati-gray, #333) 100%
    );
}

.dealer-popup-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 2rem 2rem 2.25rem;
    background: var(--color-ducati-white, #fff);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dealer-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: var(--color-ducati-gray, #333);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dealer-popup-close:hover,
.dealer-popup-close:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-ducati-black, #1a1a1a);
    outline: none;
}

.dealer-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-ducati-black, #1a1a1a);
}

.prose-dealer-popup > *:first-child {
    margin-top: 0;
}

.prose-dealer-popup > *:last-child {
    margin-bottom: 0;
}

.prose-dealer-popup h1,
.prose-dealer-popup h2,
.prose-dealer-popup h3,
.prose-dealer-popup h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-family-heading, 'Bebas Neue', sans-serif);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.prose-dealer-popup h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.prose-dealer-popup p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-ducati-gray, #333);
}

.prose-dealer-popup label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.prose-dealer-popup input[type="text"],
.prose-dealer-popup input[type="email"],
.prose-dealer-popup input[type="url"],
.prose-dealer-popup input[type="tel"],
.prose-dealer-popup textarea,
.prose-dealer-popup select {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: #f3f3f3;
    color: var(--color-ducati-black, #1a1a1a);
}

.prose-dealer-popup .button,
.prose-dealer-popup button[type="submit"],
.prose-dealer-popup input[type="submit"],
.prose-dealer-popup a.dealer-popup-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12rem;
    margin-top: 0.5rem;
    padding: 0.9rem 1.5rem;
    border: 0;
    border-radius: 9999px;
    background: var(--color-ducati-red, #c00);
    color: var(--color-ducati-white, #fff);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.prose-dealer-popup .button:hover,
.prose-dealer-popup button[type="submit"]:hover,
.prose-dealer-popup input[type="submit"]:hover,
.prose-dealer-popup a.dealer-popup-cta:hover {
    background: var(--color-ducati-red-dark, #900);
    color: var(--color-ducati-white, #fff);
}

.prose-dealer-popup a:not(.dealer-popup-cta) {
    color: var(--color-ducati-gray, #333);
}

@media (max-width: 767px) {
    .dealer-popup-grid {
        grid-template-columns: 1fr;
    }

    .dealer-popup-media {
        min-height: 12rem;
        max-height: 14rem;
    }

    .dealer-popup-panel {
        padding: 1.5rem 1.25rem 1.75rem;
    }
}
