/**
 * Joyn Member Pro - 프론트엔드 스타일
 * 
 * @package JoynMemberPro
 * @since 1.0.0
 */

/* 기본 스타일 - 밝은 모드 전용 */
.joyn-member-pro {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

/* 신청서 폼 스타일 */
.joyn-application-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.joyn-application-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

/* 폼 헤더 */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.form-header h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.form-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 동의 체크박스 스타일 */
.agreement-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.agreement-section {
    margin-bottom: 20px;
}

.agreement-section:last-child {
    margin-bottom: 0;
}

.agreement-section h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.agreement-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.agreement-section li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

.important-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px;
    margin: 15px 0;
    color: #856404;
    font-weight: 500;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    margin: 15px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #007cba;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.4;
}

.checkbox-label .required {
    color: #e74c3c;
    font-weight: 600;
}

/* 폼 섹션 */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #34495e;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

/* 모듈별 색상 테마 */
.joyn-church-form {
    border-top: 4px solid #3498db;
}

.joyn-church-form .form-header h2 {
    color: #3498db;
}

.joyn-church-form .submit-btn {
    background: #3498db;
}

.joyn-church-form .submit-btn:hover {
    background: #2980b9;
}

.joyn-store-form {
    border-top: 4px solid #e74c3c;
}

.joyn-store-form .form-header h2 {
    color: #e74c3c;
}

.joyn-store-form .submit-btn {
    background: #e74c3c;
}

.joyn-store-form .submit-btn:hover {
    background: #c0392b;
}

.joyn-acts-form {
    border-top: 4px solid #f39c12;
}

.joyn-acts-form .form-header h2 {
    color: #f39c12;
}

.joyn-acts-form .submit-btn {
    background: #f39c12;
}

.joyn-acts-form .submit-btn:hover {
    background: #e67e22;
}

.joyn-mission-form {
    border-top: 4px solid #27ae60;
}

.joyn-mission-form .form-header h2 {
    color: #27ae60;
}

.joyn-mission-form .submit-btn {
    background: #27ae60;
}

.joyn-mission-form .submit-btn:hover {
    background: #229954;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group input[type="file"] {
    padding: 5px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background: #2980b9;
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* 로딩 스피너 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 알림 메시지 */
.joyn-notice {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.joyn-notice.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.joyn-notice.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.joyn-notice.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 멤버 페이지 스타일 */
.joyn-member-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.joyn-member-page h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.member-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.member-info ul {
    list-style: none;
    padding: 0;
}

.member-info li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.member-info li:last-child {
    border-bottom: none;
}

.member-info strong {
    color: #2c3e50;
    margin-right: 10px;
}

/* 신청서 목록 스타일 */
.joyn-application-list {
    max-width: 1000px;
    margin: 0 auto;
}

.application-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.application-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.application-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.application-status.pending {
    background: #fff3cd;
    color: #856404;
}

.application-status.approved {
    background: #d4edda;
    color: #155724;
}

.application-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

.application-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.application-content {
    color: #555;
    line-height: 1.6;
}

/* 추가 스타일 */
.business-type-badge,
.ministry-type-badge,
.mission-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #495057;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.submit-btn i {
    margin-right: 8px;
}

/* HC 연동 스타일 */
.jseeds-points-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.jseeds-points-display i {
    font-size: 18px;
    color: #ffd700;
}

.jseeds-points-display strong {
    font-size: 16px;
    font-weight: 600;
}

.joyn-notification {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.joyn-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.joyn-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.joyn-notification i {
    font-size: 16px;
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 자동 입력된 필드 스타일 */
.form-control.auto-filled {
    background-color: #f8f9fa;
    border-left: 3px solid #28a745;
}

.form-control.auto-filled::before {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
}

/* 로딩 상태 */
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn .ri-loader-4-line {
    animation: spin 1s linear infinite;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .joyn-application-form,
    .joyn-member-page,
    .joyn-application-list {
        margin: 10px;
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .application-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .application-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* 밝은 모드 전용 스타일 강화 */
.joyn-member-pro * {
    color-scheme: light;
}

/* 다크모드 비활성화 */
.joyn-member-pro,
.joyn-member-pro *,
.joyn-member-pro *::before,
.joyn-member-pro *::after {
    color-scheme: light !important;
    background-color: #ffffff !important;
    color: #333333 !important;
}

