/* 2026-04-22 신규 플로팅 메뉴 + 소개자료 모달 (default/sub + default/index 공통) */

/* 신규 플로팅 바 */
.fixed-box-new {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 100;
}
.fixed-box-new > a.introcude-modal-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: #FF6A00;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(255, 106, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fixed-box-new > a.introcude-modal-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 106, 0, 0.35);
    color: #fff;
}

/* 모바일 — PC 버튼 크기 그대로 유지, 화면 하단 중앙 정렬만 조정 */
@media (max-width: 768px) {
    .fixed-box-new {
        bottom: 16px;
    }
}

/* 모달 오버레이 (Dim 처리) */
.introcude-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}
.introcude-modal-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모달 래퍼 */
.introcude-modal-wrap {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 680px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease;
}
.introcude-modal-wrap.is-open {
    display: block;
}

/* 오버레이 위 전역 로딩 (첫 form 로드 전) */
.introcude-modal-overlay-loading {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    height: 100%;
}
.introcude-modal-overlay.is-loading .introcude-modal-overlay-loading {
    display: flex;
}
.introcude-modal-overlay-spinner {
    display: none;
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: introcude-spin 0.8s linear infinite;
}
.introcude-modal-overlay.is-loading .introcude-modal-overlay-spinner {
    display: block;
}
.introcude-modal-overlay-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    opacity: 0.9;
    margin: 0;
}

/* 첫 불러오기: 외곽 박스 높이를 먼저 고정해 iframe height 조정이 겉으로 안 보이게 */
.introcude-modal-wrap.introcude-modal-opening {
    min-height: min(520px, calc(100vh - 96px));
}
.introcude-modal-wrap.introcude-modal-opening .introcude-modal-loading,
.introcude-modal-wrap.introcude-modal-opening .introcude-modal-loading.is-loading {
    transition: none;
}
.introcude-modal-wrap.introcude-modal-opening .introcude-modal-loading.is-loading {
    background: #fff;
}

.introcude-modal-iframe {
    width: 100%;
    max-height: calc(100vh - 64px);
    border: 0;
    display: block;
    opacity: 1;
}
.introcude-modal-wrap.is-open.introcude-modal-content-ready .introcude-modal-iframe {
    opacity: 1;
}
.introcude-modal-wrap.is-open:not(.introcude-modal-content-ready) .introcude-modal-iframe {
    opacity: 0;
}
.introcude-modal-wrap.introcude-modal-opening.is-open:not(.introcude-modal-content-ready) .introcude-modal-iframe {
    min-height: 0;
}

/* 모바일 모달 */
@media (max-width: 768px) {
    .introcude-modal-wrap {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 32px);
    }
    .introcude-modal-wrap.introcude-modal-opening {
        min-height: min(420px, calc(100vh - 48px));
    }
    .introcude-modal-iframe {
        height: 420px;
    }
}

/* 스크롤 잠금 */
body.introcude-modal-open {
    overflow: hidden;
}

/* 폼 전송·불러오기 로딩 오버레이 */
.introcude-modal-loading {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.96);
    z-index: 10;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.introcude-modal-loading.is-loading {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.introcude-modal-loading-inner {
    text-align: center;
}
.introcude-modal-loading-inner p {
    margin: 16px 0 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}
.introcude-modal-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #FFE0CC;
    border-top-color: #FF6A00;
    border-radius: 50%;
    animation: introcude-spin 0.8s linear infinite;
}
@keyframes introcude-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .introcude-modal-loading {
        transition: none;
    }
    .introcude-modal-spinner {
        animation: none;
    }
}
