/* ---------------- Contacts modal (glass) ---------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(6, 12, 9, 0.55);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    position: relative;
    width: min(430px, 100%);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(155deg, rgba(44, 60, 44, 0.78), rgba(22, 34, 26, 0.82));
    box-shadow: 0 24px 64px rgba(5, 10, 7, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    padding: 1.75rem 1.5rem 1.5rem;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    /* visible: сугроб (.snow-cap) выступает над верхней кромкой карточки */
    overflow: visible;
}

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

.modal-close {
    position: absolute;
    z-index: 2; /* above .modal-stage, which is positioned and comes later in the DOM */
    top: 0.9rem;
    right: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    width: 2.75rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #f2d0a4;
}

.modal-stage {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-step[hidden] {
    display: none;
}

/* keep the first row clear of the close button */
.modal-step[data-step="contacts"] {
    padding-top: 1.75rem;
}

.modal-step[data-step="contacts"] .modal-title {
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size-adjust: var(--display-adjust);
    font-variant-numeric: lining-nums;
    font-size: 1.35rem;
    font-weight: var(--display-weight);
    color: #f2d0a4;
}

.modal-hint {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.68);
}

/* контакты не удалось загрузить с сервера */
.modal-hint.is-error {
    color: #ff9a8f;
}

/* Contacts list */

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(14, 24, 18, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.contact-row + .contact-row {
    margin-top: 0.6rem;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 0.75rem;
    color: #f2d0a4;
    background: rgba(242, 208, 164, 0.1);
    border: 1px solid rgba(242, 208, 164, 0.28);
}

.contact-body {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.contact-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.contact-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

a.contact-value:hover {
    color: #f2d0a4;
}

/* MAX ищет по номеру — номер копируется по нажатию */
.contact-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.contact-copy:hover {
    color: #f2d0a4;
}

.contact-copy-hint {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(242, 208, 164, 0.7);
}

.contact-copy.is-copied .contact-copy-hint {
    color: #9fe0a8;
}

.modal-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}


