/* ============================================
   Borom Notification - Frontend Premium Styles
   아정당 레퍼런스 스타일 알림함 디자인 시스템
   ============================================ */

/* --- 로그인 필요 영역 --- */
.dgd-notif-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5em 1.25em;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    margin: 1.25em 0;
}

.dgd-notif-login-required .login-req-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #f8fafc;
    border-radius: 50%;
    margin-bottom: 1.25em;
    color: #94a3b8;
}

.dgd-notif-login-required h4 {
    font-size: 1.125em;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5em 0;
}

.dgd-notif-login-required p {
    font-size: 0.875em;
    color: #64748b;
    margin: 0 0 1.5em 0;
}

.dgd-notif-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff !important;
    padding: 0.75em 1.75em;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875em;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
}

.dgd-notif-login-btn:hover {
    background: var(--dark);
    transform: translateY(-1px);
}

/* --- 알림함 래퍼 --- */
.dgd-notif-inbox-wrapper {
    max-width: 760px !important;
    margin: 1.25em auto;
    background: #ffffff;
}

/* --- 헤더 --- */
.dgd-notif-header {
    margin-bottom: 2em;
}

.dgd-notif-title {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 0.25em 0;
    letter-spacing: -0.02em;
}

.dgd-notif-desc {
    font-size: 0.875em;
    color: #64748b;
    margin: 0;
}

/* --- 필터 및 토글 바 --- */
.dgd-notif-filter-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0;
    margin-bottom: 1.5em;
}

.dgd-notif-subtab-btn {
    display: inline-block;
    background-color: #fff;
    padding: 4px 16px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -.3px;
    border-radius: 50px;
    font-weight: 400;
    color: #1f2429;
    border: 1px solid #dee2e6;
}

.dgd-notif-subtab-btn.active {
    color: #fff;
    border-color: var(--text-main);
    background: var(--dark);
    font-weight: 700;
}

.dgd-notif-tabs {
    display: flex;
    gap: 1.5em;
}

.dgd-notif-tab-btn {
    background: none;
    border: none;
    font-size: 1.125em;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.75em 0;
    position: relative;
    transition: color 0.2s;
}

.dgd-notif-tab-btn:hover {
    color: #475569;
}

.dgd-notif-tab-btn.active {
    color: #2563eb !important;
}

.dgd-notif-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #2563eb;
    border-radius: 3px 3px 0 0;
}

/* --- 안 읽음 토글 스위치 --- */
.dgd-unread-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.625em;
}

.dgd-unread-toggle-wrapper span {
    font-size: 0.875em;
    font-weight: 600;
    color: #475569;
}

.dgd-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.dgd-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dgd-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.2s;
    border-radius: 24px;
}

.dgd-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dgd-switch input:checked+.dgd-slider {
    background-color: #2563eb;
}

.dgd-switch input:checked+.dgd-slider:before {
    transform: translateX(20px);
}

/* --- 알림 카드 목록 --- */
.dgd-notif-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* --- 개별 알림 카드 --- */
.dgd-notif-card {
    display: flex;
    gap: 1.25em;
    border-radius: 12px;
    padding: 1.25em;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    cursor: pointer;
    border: 1px solid #f1f5f9;
}

.dgd-notif-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

/* 안읽은 알림: 은은한 파란빛/회색빛 배경 */
.dgd-notif-card.unread {
    background: #f4f6fa;
    border-bottom: 1px solid #ecf0f4;
}

/* 읽은 알림: 흰색 배경 */
.dgd-notif-card.read {
    background: #ffffff;
}

/* --- 아이콘 박스 --- */
.dgd-notif-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eff6ff;
    color: #3b82f6;
    flex-shrink: 0;
}

/* 커뮤니티 아이콘 (초록색 계열 피드백) */
.dgd-notif-icon-box.community-icon {
    background: #f0fdf4;
    color: #22c55e;
}

/* 활동/시스템 아이콘 (기본 파란색 계열) */
.dgd-notif-icon-box.activity-icon {
    background: #eff6ff;
    color: #3b82f6;
}

/* --- 정보 영역 --- */
.dgd-notif-info {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    flex-grow: 1;
    min-width: 0;
    /* text-overflow 작동을 위한 min-width */
}

.dgd-notif-card-title {
    font-size: 1.0625em;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.4;
}

/* 안읽은 알림 제목 더 강조 */
.dgd-notif-card.unread .dgd-notif-card-title {
    color: #0f172a;
}

.dgd-notif-card-content {
    font-size: 0.9375em;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dgd-notif-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25em;
}

.dgd-notif-time {
    font-size: 0.8125em;
    color: #94a3b8;
}

.dgd-notif-link-btn {
    font-size: 0.8125em;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: color 0.15s;
}

.dgd-notif-link-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* --- 빈 상태 --- */
.dgd-notif-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4em 1.25em;
    text-align: center;
}

.dgd-notif-empty-icon {
    margin-bottom: 1em;
    color: #cbd5e1;
}

.dgd-notif-empty-state p {
    font-size: 0.9375em;
    color: #64748b;
    margin: 0;
}

/* --- 페이징 --- */
.dgd-notification-pagination {
    display: flex;
    justify-content: center;
    gap: 0.375em;
    margin-top: 2em;
}

.dgd-notification-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    border-radius: 6px;
    font-size: 0.8125em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.dgd-notification-pagination .page-numbers:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.dgd-notification-pagination .page-numbers.current {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

/* --- 스켈레톤 로딩 --- */
.dgd-notif-loading {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.dgd-notif-skeleton-card {
    display: flex;
    gap: 1.25em;
    border-radius: 12px;
    padding: 1.25em;
    background: #ffffff;
    border: 1px solid #f1f5f9;
}

.dgd-notif-skeleton-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    flex-shrink: 0;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.dgd-notif-skeleton-info {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    flex-grow: 1;
}

.dgd-notif-skeleton-title {
    width: 40%;
    height: 16px;
    background: #f1f5f9;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.dgd-notif-skeleton-content {
    width: 85%;
    height: 36px;
    background: #f1f5f9;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.dgd-notif-skeleton-footer {
    width: 20%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% {
        background-color: #f1f5f9;
    }

    50% {
        background-color: #e2e8f0;
    }

    100% {
        background-color: #f1f5f9;
    }
}

/* ============================================
   반응형 브레이크포인트 (em 단위 기반)
   ============================================ */

/* 600px 이하 모바일 전용 */
@media (max-width: 37.5em) {
    .dgd-notif-inbox-wrapper {
        padding: 1.25em;
        margin: 0.625em auto;
        border-radius: 12px;
    }

    .dgd-notif-filter-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75em;
        padding-bottom: 0.75em;
    }

    .dgd-notif-tabs {
        width: 100%;
        justify-content: flex-start;
        gap: 1.25em;
    }

    .dgd-unread-toggle-wrapper {
        width: 100%;
        justify-content: space-between;
    }

    .dgd-notif-card {
        padding: 1em;
        gap: 0.875em;
    }

    .dgd-notif-icon-box {
        width: 36px;
        height: 36px;
    }

    .dgd-notif-icon-box svg {
        width: 16px;
        height: 16px;
    }

    .dgd-notif-card-title {
        font-size: 0.9375em;
    }

    .dgd-notif-card-content {
        font-size: 0.875em;
    }
}

/* ============================================
   알림 상세 페이지 (single-notification.php) 스타일
   ============================================ */
.dgd-notification-single-wrapper {
    max-width: 540px;
    margin: 2.5em auto;
    padding: 0 1.25em;
}

.dgd-notification-single-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5em;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

.dgd-notification-single-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    margin-bottom: 0.75em;
}

.dgd-notification-single-title {
    font-size: 1.75em;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5em 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.dgd-notification-single-date {
    font-size: 0.875em;
    color: #94a3b8;
    margin-bottom: 2em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid #f1f5f9;
}

.dgd-notification-single-content {
    font-size: 1em;
    color: #334155;
    line-height: 1.8;
}

.dgd-notification-single-footer {
    text-align: center;
    margin-top: 2.5em;
    padding-top: 1.5em;
    border-top: 1px solid #f1f5f9;
}

.dgd-notification-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569 !important;
    font-size: 0.875em;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 0.625em 1.5em;
    border-radius: 8px;
    transition: all 0.2s;
}

.dgd-notification-back-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a !important;
}

@media (max-width: 37.5em) {
    .dgd-notification-single-wrapper {
        margin: 1.25em auto;
    }

    .dgd-notification-single-card {
        padding: 1.5em;
        border-radius: 12px;
    }

    .dgd-notification-single-title {
        font-size: 1.375em;
    }
}