/**
 * HC Login Pro - 교회 검색 모달 스타일
 */

/* 교회 검색 모달 */
.hc-church-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.hc-church-modal.show {
    display: block;
}

.hc-church-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.hc-church-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 모달 헤더 */
.hc-church-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.hc-church-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.hc-church-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.hc-church-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 모달 바디 */
.hc-church-modal-body {
    padding: 24px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* 검색 섹션 */
.hc-search-section {
    margin-bottom: 24px;
}

.hc-search-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.hc-search-hint strong {
    color: #1f2937;
    font-weight: 500;
}

/* 데이터 소스 정보 - 숨김 처리 */
.hc-data-source-info {
    display: none !important;
}

/* 검색 로딩 */
.hc-search-loading {
    text-align: center;
    padding: 40px 20px;
}

.hc-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hc-loading {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 검색 결과 */
.hc-church-search-results {
    margin-top: 24px;
}

.hc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.hc-results-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.hc-results-count {
    font-size: 14px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 16px;
}

.hc-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 스크롤바 스타일링 */
.hc-results-list::-webkit-scrollbar {
    width: 8px;
}

.hc-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hc-results-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.hc-results-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.hc-church-result-item {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.hc-church-result-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.hc-church-result-item.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.hc-church-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 16px;
}

.hc-church-address {
    color: #6b7280;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.hc-church-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #9ca3af;
}

.hc-church-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 검색 결과 없음 */
.hc-no-results-section {
    text-align: center;
    padding: 40px 20px;
}

.hc-no-results-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hc-no-results-message .dashicons {
    font-size: 48px;
    color: #9ca3af;
}

.hc-no-results-message p {
    margin: 0;
    color: #6b7280;
}

.hc-text-small {
    font-size: 14px;
}

/* 새 교회 등록 옵션 */
.hc-new-church-option {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* 교회 등록 폼 */
.hc-church-register-form {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* 폼 그룹 */
.hc-form-group {
    margin-bottom: 16px;
}

.hc-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.hc-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.hc-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hc-form-input::placeholder {
    color: #9ca3af;
}

.hc-church-register-form h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

/* 선택된 교회 표시 */
.hc-selected-church {
    margin-top: 16px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    display: none;
}

.hc-selected-church.show {
    display: block;
}

.hc-selected-church-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hc-selected-church-title {
    font-weight: 600;
    color: #0c4a6e;
}

.hc-selected-church-name {
    color: #0369a1;
    font-weight: 500;
}

/* 버튼 스타일 */
.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

/* 폼 액션 버튼 그룹 */
.hc-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.hc-form-actions .hc-btn {
    flex: 1;
}

.hc-form-actions .hc-btn:last-child {
    flex: 0 0 auto;
}

.hc-btn-primary {
    background: #3b82f6;
    color: white;
}

.hc-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.hc-btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.hc-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.hc-btn-full {
    width: 100%;
}

/* 메시지 스타일 */
.hc-error-message {
    background: #ffebee;
    color: #d32f2f;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #d32f2f;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.hc-success-message {
    background: #e8f5e8;
    color: #388e3c;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #388e3c;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hc-church-modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .hc-church-modal-body {
        padding: 20px;
        max-height: calc(90vh - 120px);
    }
    
    .hc-church-info {
        flex-direction: column;
        gap: 8px;
    }
}
