/* ===================================
   G5 Alert Modal Styles - 주소와이 레드 테마
   Main Color: #e5091d / Point: #c00020
   =================================== */

@font-face {
    font-family: 'yg-jalnan';
    src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_four@1.2/JalnanOTF00.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 모달 배경 */
.g5-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 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: 12px;
    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(0, 0, 0, 0.28);
    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, #f4f4f4 0%, #e9e9e9 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: #e5091d; }
.g5-modal-icon.success { color: #00b050; background: linear-gradient(135deg, #eef7f0 0%, #ddefe3 100%); }
.g5-modal-icon.warning { color: #ffaf00; background: linear-gradient(135deg, #fff6e2 0%, #ffecc6 100%); }
.g5-modal-icon.error   { color: #c00020; background: linear-gradient(135deg, #fdeaec 0%, #fbd6da 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: 'yg-jalnan', '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: 'yg-jalnan', '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: #f4f4f4;
    border-radius: 3px;
}

.g5-modal-message::-webkit-scrollbar-thumb {
    background: #dfdfdf;
    border-radius: 3px;
}

.g5-modal-message::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* 모달 버튼 */
.g5-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    padding: 15px 36px;
    background: linear-gradient(135deg, #e5091d 0%, #c00020 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    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(192, 0, 32, 0.5);
    font-family: 'yg-jalnan', 'Malgun Gothic', dotum, sans-serif;
    letter-spacing: 0.02em;
}

.g5-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(192, 0, 32, 0.6);
    filter: brightness(1.03);
    color: #fff;
}

.g5-modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px -4px rgba(192, 0, 32, 0.5);
}

.g5-modal-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(229, 9, 29, 0.28), 0 8px 20px -6px rgba(192, 0, 32, 0.5);
}

/* 에러 타입 버튼 */
.g5-modal-content.error-type .g5-modal-btn {
    background: linear-gradient(135deg, #c00020 0%, #8f0018 100%);
    box-shadow: 0 8px 20px -6px rgba(143, 0, 24, 0.55);
}

.g5-modal-content.error-type .g5-modal-btn:hover {
    box-shadow: 0 12px 24px -6px rgba(143, 0, 24, 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: 10px;
    }

    .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: 12px;
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.22);
}

#validation_check h1 {
    font-size: 22px;
    color: #2b2b2b;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dfdfdf;
    font-family: 'yg-jalnan', '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"],
#validation_check .btn_confirm button {
    display: inline-block;
    padding: 14px 34px;
    background: linear-gradient(135deg, #e5091d 0%, #c00020 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'yg-jalnan', 'Malgun Gothic', dotum, sans-serif;
}

#validation_check .btn_confirm a:hover,
#validation_check input[type="submit"]:hover,
#validation_check .btn_confirm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(192, 0, 32, 0.5);
    color: #fff;
}