/**
 * 파일명: acts-phase3.css
 * 파일위치: /joyn-members-pro/modules/acts/assets/
 *
 * Acts 모듈 Phase 3 스타일
 * 프로필, 사역자 그리드, 후원 모달, 토스트, 알림 벨
 *
 * @since 1.1.0
 */

/* =========================================================
   프로필 헤더
   ======================================================= */
/* 프론트엔드 .acts-public-wrap .container와 동일한 가로폭(1400px) */
.acts-profile-wrap { max-width: 1400px; margin: 0 auto; }
.acts-profile-bg {
    border-radius: 16px;
    padding: 40px 32px 32px;
    display: flex;
    gap: 24px;
    align-items: center;
    color: #fff;
}
.acts-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.acts-profile-avatar {
    width: 110px; height: 110px;
    border-radius: var(--radius-lg);
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.acts-profile-level-badge {
    position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
    white-space: nowrap;
}
.acts-profile-name { margin: 0; font-size: 24px; font-weight: 700; }
.acts-profile-specialty { font-size: 14px; opacity: 0.85; margin-top: 4px; }
.acts-profile-bio { font-size: 14px; opacity: 0.75; margin-top: 8px; line-height: 1.6; }

/* 프로필 통계 */
.acts-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.acts-profile-stat {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.acts-profile-stat-icon { font-size: 22px; color: #1B3A5C; margin-bottom: 6px; }
.acts-profile-stat-num { font-size: 20px; font-weight: 700; color: #222; }
.acts-profile-stat-label { font-size: 12px; color: #999; margin-top: 2px; }

.acts-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 4px;
}
.acts-profile-section {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.acts-profile-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acts-profile-info-list { display: flex; flex-direction: column; gap: 4px; }
.acts-profile-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}
.acts-profile-info-row:last-child { border-bottom: none; }
.acts-info-label { color: #666; }

/* 학력: 레이블 한 줄 띄고 내용 표시 */
.acts-profile-education-row .acts-info-label,
.acts-profile-education-row .acts-info-value {
    display: block;
}
.acts-profile-education-row .acts-info-label {
    margin-bottom: 1em;
}
.acts-profile-education-row .acts-info-value {
    margin-top: 0;
}
.acts-info-value { font-weight: 600; color: #222; }

.acts-profile-church { font-size: 14px; opacity: 0.9; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.acts-profile-church i { color: rgba(255,255,255,0.9); }
.acts-profile-section-desc { color: #666; font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.acts-profile-section-note { color: #999; font-size: 12px; margin: 8px 0 0; }
.acts-profile-link-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.acts-profile-intro-text { font-size: 14px; line-height: 1.7; color: #444; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.acts-profile-news-list { list-style: none; margin: 0; padding: 0; }
.acts-profile-news-list li { padding: 6px 0; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; gap: 12px; }
.acts-profile-news-list a { font-weight: 500; }
.acts-profile-news-date { color: #999; font-size: 12px; flex-shrink: 0; }
.acts-profile-videos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.acts-profile-schedule-list { list-style: none; margin: 0 0 12px; padding: 0; }
.acts-profile-schedule-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 4px; }
.acts-profile-schedule-item:last-child { border-bottom: none; }
/* px: html rem 변동·iOS 뷰포트 재계산에 종속되지 않음 (acts-profile-all 모바일 토큰과 동일 철학) */
.acts-profile-schedule-meta { font-size: 14px; color: var(--acts-text-dim, #8A90A8); }
.acts-profile-shop-list { list-style: none; margin: 0 0 12px; padding: 0; }
.acts-profile-shop-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acts-profile-shop-item:last-child { border-bottom: none; }
.acts-profile-shop-price { font-weight: 600; color: var(--acts-gold, #D4A853); }
/* 통합 글쓰기: 글 카드 그리드 */
.acts-profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.acts-profile-post-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.acts-profile-post-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}
.acts-profile-post-body {
    padding: 12px;
}
.acts-profile-post-body a { font-weight: 600; }
.acts-profile-post-content {
    font-size: 14px;
    line-height: 1.5;
    margin: 6px 0 0;
    color: var(--acts-text-dim, #8A90A8);
}
.acts-profile-post-thumb-sm {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.acts-profile-schedule-item { display: flex; gap: 12px; align-items: flex-start; }
.acts-profile-video-card { display: inline-flex; flex-direction: column; max-width: 200px; }
.acts-profile-contact-info { margin-bottom: 12px; }
.acts-profile-contact-text { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.acts-profile-consultation-hours { font-size: 15px; color: var(--acts-text-dim, #8A90A8); display: flex; align-items: center; gap: 6px; }

/* =========================================================
   사역자 그리드
   ======================================================= */
.acts-ministers-filter {
    display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
}
.acts-minister-filter-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px; font-weight: 600;
    color: #666; background: #f5f5f5;
    text-decoration: none;
    transition: all 0.2s;
}
.acts-minister-filter-btn:hover { background: #e0e0e0; color: #333; }
.acts-minister-filter-btn.active { background: #1B3A5C; color: #fff; }

.acts-minister-grid {
    display: grid;
    gap: 16px;
}
.acts-minister-card {
    display: flex; flex-direction: column; align-items: center;
    background: #fff; border-radius: 14px;
    padding: 24px 16px; text-align: center;
    text-decoration: none; color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s;
}
.acts-minister-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    color: inherit;
}
.acts-minister-avatar {
    width: 80px; height: 80px;
    border-radius: var(--radius-lg);
    border: 3px solid #f0f0f0;
    object-fit: cover;
    margin-bottom: 10px;
}
.acts-minister-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.acts-minister-spec { font-size: 12px; color: #999; margin-top: 4px; }
.acts-minister-pts {
    font-size: 13px; font-weight: 600; color: #1B3A5C; margin-top: 8px;
    display: flex; align-items: center; gap: 4px;
}

/* =========================================================
   후원 모달
   ======================================================= */
.acts-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}
.acts-modal-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.acts-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    max-height: calc(100vh - 48px);
    max-height: min(90vh, calc(100dvh - max(24px, env(safe-area-inset-top, 0px)) - max(24px, env(safe-area-inset-bottom, 0px))));
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.acts-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
/* 후원하기 모달만: 닫기 버튼 왼쪽, 제목이 나머지 너비 */
#acts-funding-modal .acts-modal-header--funding {
    justify-content: flex-start;
    gap: 12px;
}
#acts-funding-modal .acts-modal-header--funding h3 {
    flex: 1;
    min-width: 0;
}
#acts-funding-modal .acts-modal-header--funding .acts-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.35);
}
#acts-funding-modal .acts-modal-header--funding .acts-modal-close i {
    color: #fff;
}
#acts-funding-modal .acts-modal-header--funding .acts-modal-close:hover {
    background: #b91c1c;
    color: #fff;
}
#acts-funding-modal .acts-modal-header--funding .acts-modal-close:hover i {
    color: #fff;
}
.acts-modal-header h3 {
    margin: 0; font-size: 17px;
    display: flex; align-items: center; gap: 6px;
}
.acts-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 20px; color: #999; padding: 4px;
}
.acts-modal-close:hover { color: #333; }
.acts-modal-body {
    padding: 22px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.acts-modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 16px 22px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}

.acts-funding-receiver {
    display: flex; gap: 12px; align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}
.acts-fund-my-balance-wrap {
    display: flex; align-items: center; gap: 10px;
    margin-top: 14px; margin-bottom: 20px; padding: 14px 18px;
    background: #e8eef4;
    border: 2px solid #1B3A5C;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(27, 58, 92, 0.08);
}
.acts-fund-my-balance-label {
    color: #444;
    font-weight: 600;
}
.acts-fund-my-balance-label i {
    margin-right: 6px;
    vertical-align: middle;
    font-size: 18px;
    color: #1B3A5C;
}
.acts-fund-my-balance-value {
    font-size: 20px;
    font-weight: 800;
    color: #1B3A5C;
    letter-spacing: -0.02em;
}
.acts-fund-my-balance-unit {
    font-weight: 700;
    color: #1B3A5C;
    font-size: 14px;
    margin-left: 2px;
}
.acts-fund-balance-hint {
    margin: -8px 0 16px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}
.acts-fund-balance-hint a.acts-fund-shop-link {
    color: #1B3A5C;
    font-weight: 600;
    text-decoration: underline;
}
.acts-fund-balance-hint a.acts-fund-shop-link:hover {
    color: #0f2744;
    text-decoration: none;
}

.acts-funding-amounts {
    display: flex; gap: 8px; margin-bottom: 10px;
}
.acts-amount-btn {
    flex: 1; padding: 10px;
    border: 1.5px solid #ddd; border-radius: 8px;
    background: #fff; cursor: pointer;
    font-size: 14px; font-weight: 600;
    color: #333;
    transition: all 0.2s;
}
.acts-amount-btn:hover { border-color: #1B3A5C; color: #1B3A5C; }
.acts-amount-btn.selected { background: #1B3A5C; color: #fff; border-color: #1B3A5C; }

.acts-fund-input {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #ddd; border-radius: 10px;
    font-size: 16px; font-weight: 600; text-align: center;
    color: #333; background: #fff;
}
.acts-fund-input::placeholder { color: #888; }
.acts-fund-input:focus { border-color: #1B3A5C; outline: none; }

/* 후원 방식·익명 (astra-child 백색 배경) */
.acts-funding-frequency label,
.acts-form-group.acts-funding-frequency .acts-frequency-options { display: block; }
.acts-frequency-options {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.acts-frequency-option {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px;
    border: 1.5px solid #e5e0d8; background: #fdfcfa;
    cursor: pointer; font-size: 13px; color: #3d3d3d;
    transition: border-color 0.2s, background 0.2s;
}
.acts-frequency-option:hover { border-color: #d4ac5e; background: #faf8f3; }
.acts-frequency-option input:checked + span { font-weight: 600; color: #2c2c2c; }
.acts-frequency-option:has(input:checked) {
    border-color: #d4ac5e; background: #faf6ee; color: #2c2c2c;
}
.acts-funding-visibility { margin-top: 12px; }
.acts-check-label {
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 14px; color: #3d3d3d;
}
.acts-check-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: #d4ac5e; }
.acts-form-hint {
    margin: 6px 0 0 26px; font-size: 12px; color: #7d7d7d;
}
/* 후원 모달·버튼 astra-child 백색 배경 */
.acts-modal-content { background: #fdfcfa; }
.acts-modal-header { border-bottom-color: #e5e0d8; }
.acts-modal-footer { background: #f8f6f2; border-top-color: #e5e0d8; }
.acts-funding-receiver { background: #f5f1eb; }
.acts-fund-my-balance-wrap {
    background: #faf6ee;
    border: 2px solid #c9a04a;
    box-shadow: 0 1px 4px rgba(201, 160, 74, 0.2);
}
.acts-fund-my-balance-label { color: #5c4a2a; }
.acts-fund-my-balance-label i { color: #b8923e; }
.acts-fund-my-balance-value {
    font-size: 20px;
    font-weight: 800;
    color: #8b6914;
}
.acts-fund-my-balance-unit { color: #5c4a2a; font-weight: 700; }
.acts-fund-balance-hint { color: #6b5b3a; }
.acts-fund-balance-hint a.acts-fund-shop-link { color: #b8923e; }
.acts-fund-balance-hint a.acts-fund-shop-link:hover { color: #8b6914; }
.acts-amount-btn { color: #2c2c2c; }
.acts-amount-btn.selected { background: #c9a04a; color: #fff; border-color: #c9a04a; }
.acts-amount-btn:hover { border-color: #d4ac5e; color: #5c4a2a; }
.acts-fund-input { color: #2c2c2c; background: #fff; }
.acts-fund-input::placeholder { color: #888; }
.acts-fund-input:focus { border-color: #d4ac5e; }
.acts-fund-submit-btn.acts-btn-primary,
#acts-funding-modal .acts-btn-primary {
    background: linear-gradient(135deg, #d4ac5e, #c9a04a) !important;
    color: #fff !important; border: none !important;
}
.acts-fund-submit-btn.acts-btn-primary:hover,
#acts-funding-modal .acts-btn-primary:hover {
    background: linear-gradient(135deg, #c9a04a, #b8923e) !important;
    box-shadow: 0 4px 16px rgba(212,172,94,0.35);
}

/* 전체 후원 내역 모달 (대시보드) */
.acts-loading-msg, .acts-empty-msg { text-align: center; padding: 24px; color: #666; }
.acts-funding-list-total { font-size: 13px; color: #666; margin-bottom: 12px; }
.acts-funding-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.acts-funding-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid #eee;
    font-size: 14px;
}
.acts-funding-list-item:last-child { border-bottom: none; }
.acts-funding-list-name { flex: 1; font-weight: 600; color: #333; }
.acts-funding-list-amount { font-weight: 700; color: #2e7d32; }
.acts-funding-list-date { font-size: 12px; color: #888; }

/* =========================================================
   토스트
   ======================================================= */
.acts-toast {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px; font-weight: 600;
    color: #fff; background: #333;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}
.acts-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.acts-toast-success { background: #2E7D32; }
.acts-toast-error { background: #C62828; }
.acts-toast-warning { background: #E65100; }

/* =========================================================
   알림 벨
   ======================================================= */
.acts-notification-bell {
    position: relative; cursor: pointer;
    display: inline-flex; align-items: center;
    font-size: 20px; color: #666;
}
.acts-notif-count {
    position: absolute; top: -6px; right: -8px;
    background: #C62828; color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center; justify-content: center;
    line-height: 1;
}

.acts-notif-dropdown {
    position: absolute; top: 100%; right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    margin-top: 8px;
}
.acts-notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 700; font-size: 14px;
}
.acts-notif-mark-all { font-size: 12px; font-weight: 400; text-decoration: none; color: #1B3A5C; }
.acts-notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f8f8f8;
    cursor: pointer;
    transition: background 0.15s;
}
.acts-notif-item:hover { background: #fafafa; }
.acts-notif-item.unread { background: #FFF8E1; }
.acts-notif-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.acts-notif-msg { font-size: 12px; color: #666; line-height: 1.4; }
.acts-notif-time { font-size: 11px; color: #bbb; margin-top: 4px; }
.acts-notif-empty { padding: 30px; text-align: center; color: #999; font-size: 13px; }

/* =========================================================
   공통 알림 바
   ======================================================= */
.acts-notice {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}
.acts-notice-info { background: #E3F2FD; color: #1565C0; }
.acts-notice-warning { background: #FFF3E0; color: #E65100; }
.acts-notice-success { background: #E8F5E9; color: #2E7D32; }
.acts-notice a { font-weight: 600; }

/* =========================================================
   반응형
   ======================================================= */
@media (max-width: 768px) {
    .acts-profile-bg { flex-direction: column; text-align: center; padding: 28px 20px; }
    .acts-profile-avatar { width: 90px; height: 90px; }
    .acts-profile-grid { grid-template-columns: 1fr; }
    .acts-minister-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .acts-modal-content {
        width: 95%;
        max-width: none;
        /* 주소창·노치 대비 — 본문(.acts-modal-body)만 세로 스크롤 */
        max-height: calc(100vh - 32px);
        max-height: min(92vh, calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)) - 16px));
    }
    .acts-funding-amounts { flex-wrap: wrap; }
    .acts-amount-btn { flex: 0 0 calc(50% - 4px); }
    .acts-notif-dropdown { width: 280px; right: -60px; }
}
@media (max-width: 480px) {
    .acts-minister-grid { grid-template-columns: 1fr !important; }
    .acts-profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 공개 영상 Live 뱃지 및 방송일시 */
.acts-video-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 4px;
}
.acts-video-schedule-link,
.acts-video-schedule-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--acts-text-dim, #64748b);
}
.acts-video-schedule-link:hover {
    color: var(--acts-blue, #3b82f6);
}

/* 생방송 일정 버튼 비활성 */
.acts-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
