/* ==============================================
   popup.css (최종 수정본)
   ============================================== */

/* 1. 팝업 배경 (어둡게 & 완전 중앙 정렬) */
.popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* 배경 어둡게 */

    /* ★핵심: 화면 정중앙 배치 (Flexbox) */
    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999; /* 최상단 노출 */
}

/* 2. 팝업 내용 박스 */
.popup-content {
    background-color: #ffffff;
    padding: 30px 20px;
    border-radius: 25px; /* 둥글게 (KFC/최신 트렌드) */
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);

    width: 400px;
    max-width: 90%; /* 모바일 대응 */

    position: relative;
    border: 2px solid #0056b3; /* 브랜드 컬러 테두리 */

    /* 내용 길어지면 스크롤 */
    max-height: 90vh;
    overflow-y: auto;
}

/* 3. 할랄 로고 */
.popup-content img {
    width: 120px; /* 로고 크기 */
    height: auto;
    margin-bottom: 20px;

    /* 투명 배경 이미지 그림자 효과 */
    filter: drop-shadow(0 5px 10px rgba(0, 100, 0, 0.2));

    /* 등장 애니메이션 */
    animation: stamp-effect 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* 애니메이션 키프레임 */
@keyframes stamp-effect {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 4. 제목 스타일 */
.popup-content h2 {
    font-family: 'Georgia', serif;
    color: #0056b3;
    margin: 10px 0 20px 0;
    font-size: 1.6rem;
    font-weight: 800;
    word-break: keep-all;
}

/* 제목 아래 장식 선 */
.popup-content h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, #e67e22, #0056b3);
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

/* 5. 본문 텍스트 */
.popup-content p {
    line-height: 1.6; /* 오타 수정됨 (s 제거) */
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 25px;
    word-break: keep-all;
}

.lang-en {
    display: block;
    margin-top: 10px;
    font-size: 0.85em;
    color: #777;
    font-weight: normal;
}

/* 6. 버튼 영역 */
.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.popup-buttons button {
    flex: 1;
    padding: 14px 0;
    border: none;
    border-radius: 50px; /* 알약 모양 */
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 왼쪽 버튼: 오늘 하루 안 보기 (회색) */
#close-today-btn {
    background-color: #f1f3f4;
    color: #5f6368;
}
#close-today-btn:hover { background-color: #e8eaed; }

/* 오른쪽 버튼: 닫기 (주황색 강조) */
#close-btn {
    background-color: #e67e22;
    color: white;
}
#close-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

.popup-buttons button:active {
    transform: scale(0.95);
    box-shadow: none;
}

/* ★핵심: 자바스크립트가 이 클래스를 붙이면 팝업이 숨겨짐 */
.popup--hidden {
    display: none !important;
}

/* 모바일 미세 조정 */
@media (max-width: 768px) {
    .popup-content {
        width: 85%;
        padding: 25px 20px;
    }
    .popup-content h2 { font-size: 1.4rem; }
    .popup-buttons button { font-size: 0.9rem; padding: 12px 0; }
}