/* Modal shell for marketplace auth forms */
.mp-auth-modal-dialog {
    max-width: 480px;
    margin: 1.75rem auto;
}

.mp-auth-modal-dialog.mp-auth-modal-dialog-wide {
    max-width: 520px;
}

.mp-auth-modal .modal-content,
.modal-content.mp-auth-modal {
    border: none;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 16px 48px rgba(25, 51, 69, 0.16);
    overflow: visible;
}

.mp-auth-modal-body {
    position: relative;
    padding: 40px 36px 36px;
    color: #193345;
    font-family: Inter, "Segoe UI", sans-serif;
    max-height: min(90vh, 900px);
    overflow-y: auto;
}

.mp-auth-modal-body .mp-panel {
    width: 100%;
    gap: 18px;
}

.mp-auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #536B79;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.mp-auth-modal-close:hover,
.mp-auth-modal-close:focus {
    color: #193345;
    background: #F7FAFA;
    outline: none;
    box-shadow: none;
}

/* Marketplace link colors inside modals (normally scoped to body.mp-auth) */
.mp-auth-modal-body a {
    color: inherit;
    text-decoration: none;
}

.mp-auth-modal-body .mp-switch a {
    color: #193345;
    font-weight: 600;
}

.mp-auth-modal-body a.mp-pro,
.mp-auth-modal-body .mp-forgot a,
.mp-auth-modal-body .mp-terms a {
    color: #008D75;
}

.mp-auth-modal-body a.mp-pro:hover,
.mp-auth-modal-body .mp-switch a:hover,
.mp-auth-modal-body .mp-forgot a:hover {
    color: #006B59;
}

.mp-auth-modal-body a.mp-social {
    color: #193345;
}

.mp-auth-modal-body .mp-alert {
    display: none;
}

.mp-auth-modal-body .mp-alert.is-visible {
    display: block;
}

.mp-auth-modal-body .mp-error {
    display: none;
}

.mp-auth-modal-body .mp-error.is-visible {
    display: block;
}

.mp-auth-modal-body .mp-dropdown-list {
    z-index: 1060;
}

/* Beat legacy #loginModal / #signupModal dialog widths from new-style.css & signup-modal.css */
body.new-home-page #loginModal .modal-dialog,
body.new-home-page #forgotPasswordModal .modal-dialog,
body #loginModal .modal-dialog,
body #forgotPasswordModal .modal-dialog,
.mp-auth-modal-dialog {
    max-width: 480px !important;
}

body.new-home-page #signupModal .modal-dialog,
body #signupModal .modal-dialog,
.mp-auth-modal-dialog.mp-auth-modal-dialog-wide {
    max-width: 520px !important;
}

body.new-home-page #loginModal .modal-content,
body.new-home-page #signupModal .modal-content,
body.new-home-page #forgotPasswordModal .modal-content,
#loginModal .modal-content,
#signupModal .modal-content,
#forgotPasswordModal .modal-content {
    border: none;
    border-radius: 14px;
    background: #FFFFFF;
}

@media (max-width: 960px) {
    body.new-home-page #loginModal .modal-dialog,
    body.new-home-page #forgotPasswordModal .modal-dialog,
    body.new-home-page #signupModal .modal-dialog,
    body #loginModal .modal-dialog,
    body #forgotPasswordModal .modal-dialog,
    body #signupModal .modal-dialog,
    .mp-auth-modal-dialog {
        max-width: calc(100% - 24px) !important;
        margin: 12px auto;
    }

    .mp-auth-modal-body {
        padding: 32px 20px 24px;
    }

    /* Keep modal copy readable; page mobile rules hide these globally */
    .mp-auth-modal-body .mp-kicker {
        display: block;
    }

    .mp-auth-modal-body .mp-desktop-copy {
        display: inline;
    }

    .mp-auth-modal-body .mp-mobile-copy {
        display: none;
    }

    .mp-auth-modal-body .mp-social-short {
        display: inline;
    }

    .mp-auth-modal-body .mp-social-long {
        display: none;
    }

    .mp-auth-modal-body .mp-field-row {
        flex-direction: column;
        gap: 20px;
    }

    .mp-auth-modal-body .mp-socials {
        flex-direction: column;
    }

    .mp-auth-modal-body .mp-title {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    .mp-auth-modal-body .mp-kicker {
        display: none;
    }

    .mp-auth-modal-body .mp-desktop-copy {
        display: none;
    }

    .mp-auth-modal-body .mp-mobile-copy {
        display: inline;
    }

    .mp-auth-modal-body .mp-social-short {
        display: none;
    }

    .mp-auth-modal-body .mp-social-long {
        display: inline;
    }

    .mp-auth-modal-body .mp-divider::before,
    .mp-auth-modal-body .mp-divider::after {
        display: none;
    }
}
