.mg-consult-popup[hidden] {
    display: none !important;
}

.mg-consult-popup {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.mg-consult-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.mg-consult-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: 1.5rem 1.35rem 1.35rem;
    border-radius: 16px;
    border: 1px solid rgba(199, 169, 67, 0.35);
    background: #202020;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    color: #fff;
}

.mg-consult-popup__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.mg-consult-popup__close:hover {
    color: #fff;
}

.mg-consult-popup__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mg-accent);
    font-weight: 700;
}

.mg-consult-popup__title {
    margin: 0 0 0.65rem;
    padding-right: 1.5rem;
    font-size: clamp(1.15rem, 2.4vw, 1.35rem);
    line-height: 1.25;
    font-weight: 700;
}

.mg-consult-popup__text {
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.mg-consult-popup__errors {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    list-style: none;
    border-radius: 8px;
    background: rgba(255, 80, 80, 0.12);
    color: #ffb4bc;
    font-size: 0.85rem;
}

.mg-consult-popup__form {
    display: grid;
    gap: 0.65rem;
}

.mg-consult-popup__field input {
    width: 100%;
    min-height: 46px;
    padding: 0 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #171717;
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
}

.mg-consult-popup__field input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.mg-consult-popup__field input:focus {
    outline: 2px solid var(--mg-accent);
    outline-offset: 1px;
}

.mg-consult-popup__submit {
    min-height: 48px;
    margin-top: 0.25rem;
    border: 0;
    border-radius: 8px;
    background: var(--mg-accent);
    color: #171717;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.mg-consult-popup__submit:hover {
    background: var(--mg-accent-hover);
}

body.mg-consult-popup-open {
    overflow: hidden;
}
