/* Furniture Popup Styles */

.fp-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.55);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    box-sizing: border-box;
}

.fp-popup-overlay.fp-is-open {
    opacity: 1;
    visibility: visible;
}

.fp-popup,
.fp-popup *,
.fp-popup *::before,
.fp-popup *::after {
    box-sizing: border-box;
}

.fp-popup {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 980px;
    max-height: 92vh;
    border-radius: 4px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
}

.fp-popup-overlay.fp-is-open .fp-popup {
    transform: translateY(0) scale(1);
}

.fp-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    z-index: 2;
    padding: 0;
}

.fp-popup__close:hover,
.fp-popup__close:focus {
    background: rgba(0, 0, 0, 0.06);
    outline: none;
}

.fp-popup__media {
    background-image: var(--fp-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100%;
}

.fp-popup__content {
    padding: 60px 56px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.fp-popup__title {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 400;
    margin: 0 0 36px;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.fp-popup__title strong {
    font-weight: 700;
}

.fp-popup__form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.fp-popup__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fp-popup__label {
    font-size: 14px;
    color: #6a6a6a;
    margin-bottom: 6px;
    font-weight: 400;
}

.fp-popup__input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #cfcfcf;
    background: transparent;
    padding: 8px 0;
    font-size: 16px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.fp-popup__input:focus {
    border-bottom-color: #1a1a1a;
}

.fp-popup__submit {
    background: #f5f3ee;
    border: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    padding: 14px 26px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    border-radius: 0;
    white-space: nowrap;
    line-height: 1;
}

.fp-popup__submit:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.fp-popup__submit:active {
    transform: translateY(1px);
}

.fp-popup__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fp-popup__dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    display: inline-block;
}

.fp-popup__message {
    margin: 16px 0 0;
    font-size: 14px;
    min-height: 20px;
    color: #2c7a3c;
    transition: opacity 0.7s ease;
    opacity: 1;
}

.fp-popup__message.fp-is-error {
    color: #c0392b;
}

.fp-popup__message.fp-is-success-large {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: center;
    padding: 18px 16px;
    background: #f5f3ee;
    border-radius: 4px;
    font-weight: 500;
}

.fp-popup__message.fp-is-fading {
    opacity: 0;
}

/* Tablet */
@media (max-width: 820px) {
    .fp-popup {
        max-width: 560px;
        grid-template-columns: 1fr;
        max-height: 94vh;
    }

    .fp-popup__media {
        height: 220px;
        min-height: 220px;
    }

    .fp-popup__content {
        padding: 36px 28px 32px;
    }

    .fp-popup__title {
        font-size: 22px;
        margin-bottom: 24px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .fp-popup-overlay {
        padding: 12px;
    }

    .fp-popup__media {
        height: 170px;
        min-height: 170px;
    }

    .fp-popup__content {
        padding: 28px 22px 26px;
    }

    .fp-popup__title {
        font-size: 19px;
        margin-bottom: 20px;
    }

    .fp-popup__form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fp-popup__submit {
        justify-content: center;
        padding: 14px 20px;
    }

    .fp-popup__close {
        top: 8px;
        right: 8px;
    }
}
