/* 교회 정보 관리 시스템 - 프론트엔드 스타일 */

/* 기본 리셋 */
.church-search-widget * {
    box-sizing: border-box;
}

/* 교회 검색 폼 */
.church-search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.church-search-form .form-group {
    margin-bottom: 15px;
}

.church-search-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.church-search-form select,
.church-search-form input[type="text"],
.church-search-form input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.church-search-form select:focus,
.church-search-form input[type="text"]:focus,
.church-search-form input[type="search"]:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.church-search-form button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.church-search-form button:hover {
    background: #135e96;
}

.church-search-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 교회 목록 위젯 */
.church-list-widget {
    margin: 20px 0;
}

.church-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.church-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.church-item h4 {
    margin: 0 0 10px 0;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
}

.church-address {
    color: #666;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.church-pastor {
    color: #333;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
}

.church-phone {
    color: #666;
    margin: 8px 0;
    font-size: 14px;
}

.church-denomination {
    display: inline-block;
    background: #e7f3ff;
    color: #2271b1;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
}

/* 검증 배지 */
.church-verified {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.church-unverified {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* 로딩 상태 */
.church-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.church-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 전체 검색 로딩 */
.church-loading-full {
    text-align: center;
    padding: 60px 40px;
    color: #333;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.church-loading-full h3 {
    margin: 20px 0 10px 0;
    color: #0073aa;
    font-size: 18px;
}

.church-loading-full p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.church-loading-full .progress-info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 5px;
    border: 1px solid #bbdefb;
}

.church-loading-full .current-count {
    font-weight: bold;
    color: #1976d2;
    font-size: 16px;
}

/* 검색 요약 */
.search-summary {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #2e7d32;
}

.search-summary .more-available {
    margin-left: 10px;
    color: #1976d2;
    font-weight: 600;
}

/* 전체 검색 요약 */
.full-search-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    animation: fadeIn 0.5s ease-in;
}

.full-search-summary .summary-content h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 16px;
}

.full-search-summary .summary-content p {
    margin: 5px 0;
    color: #856404;
}

.full-search-summary .search-tips {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ffeaa7;
}

.full-search-summary .search-tips p {
    font-size: 12px;
    color: #856404;
    font-style: italic;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 더보기 버튼 */
.church-load-more {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.church-load-more button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.church-load-more button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.church-load-more button:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.church-load-more .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.church-load-more .loading-spinner::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 무한 스크롤 로딩 스피너 */
.loading-spinner {
    display: inline-block;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: #6c757d;
    font-size: 14px;
    position: relative;
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* 교회 상세 정보 모달 */
.church-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.church-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.church-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.church-modal-close:hover {
    color: #333;
}

.church-detail-info {
    margin-top: 20px;
}

.church-detail-info h3 {
    color: #2271b1;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.church-detail-row {
    display: flex;
    margin-bottom: 12px;
    align-items: center;
}

.church-detail-label {
    font-weight: 600;
    color: #333;
    width: 120px;
    flex-shrink: 0;
}

.church-detail-value {
    color: #666;
    flex: 1;
}

/* 지도 컨테이너 */
.church-map-container {
    margin: 20px 0;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .church-search-form {
        padding: 15px;
    }
    
    .church-item {
        padding: 15px;
    }
    
    .church-item h4 {
        font-size: 16px;
    }
    
    .church-modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .church-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .church-detail-label {
        width: auto;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .church-search-form {
        padding: 12px;
    }
    
    .church-item {
        padding: 12px;
    }
    
    .church-modal-content {
        margin: 5% auto;
        padding: 15px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .church-search-form {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .church-search-form label {
        color: #e2e8f0;
    }
    
    .church-search-form select,
    .church-search-form input[type="text"],
    .church-search-form input[type="search"] {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .church-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .church-item h4 {
        color: #63b3ed;
    }
    
    .church-address,
    .church-phone {
        color: #a0aec0;
    }
    
    .church-pastor {
        color: #e2e8f0;
    }
    
    .church-denomination {
        background: #2c5282;
        color: #63b3ed;
    }
    
    .church-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .church-detail-label {
        color: #e2e8f0;
    }
    
    .church-detail-value {
        color: #a0aec0;
    }
}

/* 접근성 개선 */
.church-search-form button:focus,
.church-item:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .church-item {
        border-width: 2px;
    }
    
    .church-search-form {
        border-width: 2px;
    }
    
    .church-search-form button {
        border: 2px solid #135e96;
    }
}

/* 애니메이션 최적화 */
@media (prefers-reduced-motion: reduce) {
    .church-item,
    .church-search-form button,
    .church-load-more button {
        transition: none;
    }
    
    .church-item:hover {
        transform: none;
    }
    
    .church-loading::before {
        animation: none;
    }
} 