/* 맞춤 공사비 자가 진단 계산기 — 모달 */
.cost-diagnosis-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cost-diagnosis-backdrop[hidden],
.cost-diagnosis-backdrop.is-hidden {
    display: none !important;
}

.cost-diagnosis-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 42rem;
    max-height: min(92vh, 760px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 40px -12px rgba(15, 23, 42, 0.45);
    overflow: hidden;
}

.cost-diagnosis-modal__header {
    flex-shrink: 0;
    padding: 1.25rem 3rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.6));
}

.cost-diagnosis-modal__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #2563eb;
}

.cost-diagnosis-modal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.cost-diagnosis-modal__desc {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
}

.cost-diagnosis-modal__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cost-diagnosis-modal__close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

.cost-diagnosis-modal__frame-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
}

.cost-diagnosis-modal__frame {
    display: block;
    width: 100%;
    height: 600px;
    max-height: calc(92vh - 7.5rem);
    border: 0;
}

.consultation-bar__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .cost-diagnosis-backdrop {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .cost-diagnosis-modal {
        max-height: 96vh;
        border-radius: 1.25rem 1.25rem 0 0;
    }

    .cost-diagnosis-modal__frame {
        height: min(600px, calc(96vh - 6.5rem));
    }
}
