/* ============================================================
   popup-notice.css
   iamallrights.com 홈페이지 리뉴얼 안내 팝업 스타일
   - 대형 리뉴얼 아이콘(톱니바퀴, 롤러) 2종 애니메이션 적용 (v5)
   ============================================================ */

/* --- 오버레이 배경 --- */
#iam-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iam-fadeIn 0.4s ease forwards;
}

@keyframes iam-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- 팝업 카드 박스 --- */
#iam-popup-overlay .iam-popup__box {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 520px;
    border-radius: 8px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: iam-slideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    z-index: 10;
}

@keyframes iam-slideUp {
    from { transform: translate3d(0, 40px, 0); opacity: 0; }
    to   { transform: translate3d(0, 0, 0);    opacity: 1; }
}

/* ============================================================
   배경 SVG 아이콘 (리뉴얼 컨셉 2종 대형)
   ============================================================ */

/* 아이콘 공통 스타일 */
#iam-popup-overlay .iam-popup__bg-icon {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    fill: none;
    stroke: #93192d;
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform;
}

/* ─── 아이콘 1: 대형 톱니바퀴 (우하단) ─── */
#iam-popup-overlay .iam-popup__bg-icon--gear {
    bottom: -15%;
    right: -10%;
    width: 280px;
    height: 280px;
    opacity: 0.20; /* 선명하면서도 텍스트를 막지 않는 투명도 */
    stroke-width: 2.0; /* 아이콘이 크므로 선은 약간 두껍게 */
    animation: iam-spin-gear 40s linear infinite !important; /* 무겁게 천천히 회전 */
}

/* ─── 아이콘 2: 대형 페인트 롤러 (좌상단) ─── */
#iam-popup-overlay .iam-popup__bg-icon--roller {
    top: -10%;
    left: -10%;
    width: 260px;
    height: 260px;
    opacity: 0.18;
    stroke-width: 2.2;
    animation: iam-roller-move 6s ease-in-out infinite alternate !important; /* 부드럽게 페인트칠 */
}

/* --- 애니메이션 키프레임 --- */
@keyframes iam-spin-gear {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes iam-roller-move {
    0%   { transform: translate3d(0, 0, 0) rotate(-15deg); }
    100% { transform: translate3d(30px, -20px, 0) rotate(-5deg); }
}

/* ============================================================
   팝업 헤더 & 본문
   ============================================================ */

#iam-popup-overlay .iam-popup__header {
    background: linear-gradient(135deg, #93192d 0%, #7a1526 100%);
    padding: 20px 60px 20px 28px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

#iam-popup-overlay .iam-popup__header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0,0,0,0.15);
}

#iam-popup-overlay .iam-popup__header-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px; /* 아이콘과 텍스트 사이 간격 */
}

#iam-popup-overlay .iam-popup__header-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    /* 필터를 은은하게 주어 아이콘에 깊이감 추가 */
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
    
    /* 주의를 끄는 흔들림 애니메이션 추가 */
    animation: iam-alert-wiggle 2.5s infinite;
    transform-origin: bottom center;
}

@keyframes iam-alert-wiggle {
    0%, 15%, 100% { transform: rotate(0deg); }
    3%  { transform: rotate(-15deg); }
    6%  { transform: rotate(15deg); }
    9%  { transform: rotate(-10deg); }
    12% { transform: rotate(10deg); }
}

#iam-popup-overlay .iam-popup__header-title {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

#iam-popup-overlay .iam-popup__close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.2s, transform 0.3s;
}

#iam-popup-overlay .iam-popup__close:hover {
    background: rgba(255,255,255,0.30);
    transform: translateY(-50%) rotate(90deg);
}

#iam-popup-overlay .iam-popup__container {
    position: relative;
    z-index: 5;
}

#iam-popup-overlay .iam-popup__body {
    padding: 36px 40px 40px;
    /* 배경의 커다란 아이콘을 잘 보이게 하기 위해 옅은 유리창 효과 */
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#iam-popup-overlay .iam-popup__section-title {
    font-size: 17px;
    font-weight: 800;
    color: #93192d;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

#iam-popup-overlay .iam-popup__section-text {
    font-size: 14.5px;
    font-weight: 500;
    color: #1f1f1f;
    line-height: 2.0;
    word-break: keep-all;
}

#iam-popup-overlay .iam-popup__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 26px 0;
}

#iam-popup-overlay .iam-popup__section--jp .iam-popup__section-title {
    color: #1a3a6b;
}

#iam-popup-overlay .iam-popup__footer {
    padding: 12px 36px;
    background: #f8f8f8;
    border-top: 1px solid #ebebeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 5;
}

#iam-popup-overlay .iam-popup__checkbox-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    user-select: none;
}

#iam-popup-overlay .iam-popup__checkbox-wrap:hover {
    color: #222;
}

#iam-popup-overlay .iam-popup__checkbox {
    margin: 0 6px 0 0;
    cursor: pointer;
}

#iam-popup-overlay .iam-popup__footer-text {
    font-size: 12px;
    color: #999999;
    font-style: italic;
    margin: 0;
}

/* ============================================================
   반응형 모바일
   ============================================================ */
@media (max-width: 768px) {
    #iam-popup-overlay .iam-popup__box { width: 92%; }
    #iam-popup-overlay .iam-popup__body { padding: 24px 22px 28px; }
    /* 모바일에서는 아이콘 비율 약간 소형화 */
    #iam-popup-overlay .iam-popup__bg-icon--gear { width: 200px; height: 200px; }
    #iam-popup-overlay .iam-popup__bg-icon--roller { width: 180px; height: 180px; }
}
