/* ═══════════════════════════════════════════════════════════════════════════
   POPUP OVERLAY
═══════════════════════════════════════════════════════════════════════════ */

.popup-overlay {
    min-height: 100vh;
    background: var(--second-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
}

/* ─── Close button ───────────────────────────────────────────────────────── */

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 40px;
    opacity: 0.6;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.popup-close > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

.popup-close__icon {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-close__icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POPUP CARD
═══════════════════════════════════════════════════════════════════════════ */

.popup-card {
    background: var(--white);
    width: 650px;
    max-width: 100%;
    padding: 60px 80px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}

/* ─── Decorative mask at top ─────────────────────────────────────────────── */

.popup-card__mask-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: -40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.popup-card__mask-inner {
    width: 100%;
    height: 100%;
    transform: rotate(180deg) scaleX(-1);
    position: relative;
    flex-shrink: 0;
}

.popup-card__mask-inner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

/* ─── Text block ─────────────────────────────────────────────────────────── */

.popup-card__text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.popup-card__title {
    font-family: var(--font-plus);
    font-weight: 700;
    font-size: 39px;
    line-height: 1;
    color: var(--black);
}

.popup-card__subtitle {
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.5;
    color: var(--black-70);
}

/* ═══════════════════════════════════════════════════════════════════════════
   POPUP FORM
═══════════════════════════════════════════════════════════════════════════ */

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 440px;
}

/* ─── Input row ──────────────────────────────────────────────────────────── */

.popup-form__row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.popup-input-wrap {
    flex: 1;
    border-bottom: 1px solid var(--black-30);
    padding: 20px 0;
}

.popup-input-wrap--full {
    flex: none;
    width: 100%;
}

.popup-input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: var(--black-30);
}

.popup-input::placeholder {
    color: var(--black-30);
}

/* ─── Dropdown ───────────────────────────────────────────────────────────── */

.popup-dropdown {
    flex: 1;
    border-bottom: 1px solid var(--black-30);
    position: relative;
}

.popup-dropdown__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    cursor: pointer;
}

.popup-dropdown__placeholder {
    flex: 1;
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: var(--black-30);
}

.popup-dropdown__chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
}

.popup-dropdown__chevron img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

/* Dropdown list */

.popup-dropdown__list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--second-bg);
    display: flex;
    flex-direction: column;
    height: 0;
    overflow: hidden;
    z-index: 10;
    transition: height 0.2s ease;
}

.popup-dropdown__list--open {
    height: auto;
}

.popup-dropdown__item {
    padding: 10px 20px;
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: var(--black-70);
    cursor: pointer;
}

.popup-dropdown__item--active {
    background: var(--accent);
    color: var(--black);
}

.popup-dropdown__item:hover:not(.popup-dropdown__item--active) {
    background: rgba(255, 200, 94, 0.3);
}

/* ─── Textarea ───────────────────────────────────────────────────────────── */

.popup-textarea-wrap {
    width: 100%;
    border-bottom: 1px solid var(--black-30);
    padding: 20px 0;
}

.popup-textarea {
    width: 100%;
    min-height: 80px;
    background: none;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--black-30);
}

.popup-textarea::placeholder {
    color: var(--black-30);
}

/* ─── Privacy ────────────────────────────────────────────────────────────── */

.popup-privacy {
    font-family: var(--font-onest);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: var(--black-70);
}

.popup-privacy a {
    color: var(--black);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUBMIT BUTTON  (accent 3-piece parallelogram, 50px tall)
═══════════════════════════════════════════════════════════════════════════ */

.popup-btn {
    display: inline-flex;
    align-items: center;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    text-decoration: none;
}

.popup-btn__left {
    width: 20px;
    height: 50px;
    flex-shrink: 0;
    position: relative;
}

.popup-btn__left img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

.popup-btn__center {
    background: var(--accent);
    height: 50px;
    padding: 15px 20px;
    font-family: var(--font-plus);
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    color: var(--black);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-btn__right-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-btn__rotate {
    flex: none;
    transform: rotate(180deg);
}

.popup-btn__right {
    width: 20px;
    height: 50px;
    position: relative;
}

.popup-btn__right img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE  (≤ 768px)
═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .page { min-width: 360px; }

    .popup-card {
        padding: 60px 20px 40px;
    }

    .popup-form__row {
        flex-direction: column;
        gap: 0;
    }

    .popup-card__title { font-size: 28px; }
}
