/* ===================================
   G5 Alert Modal Styles - 주소콘 핑크 테마 (리디자인)
   Main Color: #ff99a9
   =================================== */

@font-face {
    font-family: 'Paperlogy-8ExtraBold';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* 모달 배경 */
.g5-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 20, 25, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease;
}

.g5-modal.show {
    display: flex;
}

.g5-modal.closing {
    animation: fadeOut 0.25s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 모달 컨텐츠 */
.g5-modal-content {
    background: #fff;
    border-radius: 24px;
    padding: 44px 40px 36px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 20px 48px -12px rgba(255, 116, 137, 0.35);
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.g5-modal.closing .g5-modal-content {
    animation: modalSlideOut 0.25s ease forwards;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(16px) scale(0.97);
        opacity: 0;
    }
}

/* 모달 아이콘 (원형 배지) */
.g5-modal-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe4ec 0%, #ffd0dc 100%);
    animation: iconPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.g5-modal-icon svg {
    width: 38px;
    height: 38px;
}

/* 타입별 아이콘 색상 (SVG currentColor) */
.g5-modal-icon.info    { color: #ff7489; }
.g5-modal-icon.success { color: #ff8fa3; }
.g5-modal-icon.warning { color: #ff9e57; background: linear-gradient(135deg, #fff0e0 0%, #ffe2c4 100%); }
.g5-modal-icon.error   { color: #ff5a76; background: linear-gradient(135deg, #ffe0e6 0%, #ffcad4 100%); }

@keyframes iconPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* 모달 제목 */
.g5-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #2b2b2b;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    font-family: 'Paperlogy-8ExtraBold', 'Malgun Gothic', dotum, sans-serif;
    word-break: keep-all;
}

/* 모달 메시지 */
.g5-modal-message {
    font-size: 15.5px;
    color: #6b6b6b;
    line-height: 1.65;
    margin-bottom: 30px;
    word-break: keep-all;
    text-align: center;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Paperlogy-8ExtraBold', 'Malgun Gothic', dotum, sans-serif;
}

.g5-modal-message br {
    display: block;
    margin: 6px 0;
    content: "";
}

/* 스크롤바 스타일 */
.g5-modal-message::-webkit-scrollbar {
    width: 6px;
}

.g5-modal-message::-webkit-scrollbar-track {
    background: #fff0f4;
    border-radius: 3px;
}

.g5-modal-message::-webkit-scrollbar-thumb {
    background: #ffc2d1;
    border-radius: 3px;
}

.g5-modal-message::-webkit-scrollbar-thumb:hover {
    background: #ff99a9;
}

/* 모달 버튼 */
.g5-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    padding: 15px 36px;
    background: linear-gradient(135deg, #ff99a9 0%, #ff7489 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 8px 20px -6px rgba(255, 116, 137, 0.6);
    font-family: 'Paperlogy-8ExtraBold', 'Malgun Gothic', dotum, sans-serif;
    letter-spacing: 0.02em;
}

.g5-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(255, 116, 137, 0.7);
    filter: brightness(1.03);
    color: #fff;
}

.g5-modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px -4px rgba(255, 116, 137, 0.6);
}

.g5-modal-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 153, 169, 0.35), 0 8px 20px -6px rgba(255, 116, 137, 0.6);
}

/* 에러 타입 버튼 */
.g5-modal-content.error-type .g5-modal-btn {
    background: linear-gradient(135deg, #ff5a76 0%, #e02c58 100%);
    box-shadow: 0 8px 20px -6px rgba(224, 44, 88, 0.55);
}

.g5-modal-content.error-type .g5-modal-btn:hover {
    box-shadow: 0 12px 24px -6px rgba(224, 44, 88, 0.65);
}

/* 반응형 */
@media (max-width: 768px) {
    .g5-modal-content {
        padding: 38px 28px 32px;
        max-width: 90%;
    }

    .g5-modal-icon {
        width: 62px;
        height: 62px;
        margin-bottom: 18px;
    }

    .g5-modal-icon svg {
        width: 34px;
        height: 34px;
    }

    .g5-modal-title {
        font-size: 20px;
    }

    .g5-modal-message {
        font-size: 15px;
        margin-bottom: 26px;
    }
}

@media (max-width: 480px) {
    .g5-modal {
        padding: 16px;
    }

    .g5-modal-content {
        padding: 32px 22px 28px;
        border-radius: 20px;
    }

    .g5-modal-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .g5-modal-icon svg {
        width: 30px;
        height: 30px;
    }

    .g5-modal-title {
        font-size: 18px;
    }

    .g5-modal-message {
        font-size: 14px;
        margin-bottom: 22px;
        max-height: 200px;
    }

    .g5-modal-btn {
        max-width: 100%;
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* noscript 폴백 스타일 */
#validation_check {
    max-width: 600px;
    margin: 50px auto;
    padding: 34px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 48px -12px rgba(255, 116, 137, 0.3);
}

#validation_check h1 {
    font-size: 22px;
    color: #2b2b2b;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ffe4ec;
    font-family: 'Paperlogy-8ExtraBold', 'Malgun Gothic', dotum, sans-serif;
}

#validation_check .cbg {
    color: #6b6b6b;
    line-height: 1.65;
    margin-bottom: 20px;
}

#validation_check .btn_confirm {
    text-align: center;
    margin-top: 30px;
}

#validation_check .btn_confirm a,
#validation_check input[type="submit"] {
    display: inline-block;
    padding: 14px 34px;
    background: linear-gradient(135deg, #ff99a9 0%, #ff7489 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Paperlogy-8ExtraBold', 'Malgun Gothic', dotum, sans-serif;
}

#validation_check .btn_confirm a:hover,
#validation_check input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(255, 116, 137, 0.6);
    color: #fff;
}