/**
 * carejoa.kr - 추가 스타일시트
 * Tailwind CSS를 보완하는 커스텀 스타일
 */

/* 모바일 최적화 */
@media (max-width: 768px) {
    /* 카드 패딩 조정 */
    .card-shadow {
        padding: 1.5rem !important;
    }
    
    /* 텍스트 크기 조정 */
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* 버튼 높이 조정 */
    button[type="submit"] {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* 그리드 간격 축소 */
    .grid {
        gap: 0.75rem !important;
    }
}

/* 입력 요소 포커스 효과 */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 체크박스 커스터마이징 */
input[type="checkbox"]:checked {
    background-color: #667eea;
    border-color: #667eea;
}

/* 라디오 버튼 커스터마이징 */
input[type="radio"]:checked + div {
    animation: selectPulse 0.3s ease-out;
}

@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 스크롤 스무스 */
html {
    scroll-behavior: smooth;
}

/* 로딩 스피너 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 호버 효과 강화 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 그라데이션 애니메이션 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* 툴팁 스타일 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 인쇄 스타일 */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card-shadow {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 접근성 개선 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 스켈레톤 로딩 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 에러 메시지 스타일 */
.error-message {
    color: #dc2626;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 성공 메시지 스타일 */
.success-message {
    color: #059669;
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 뱃지 스타일 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: #ede9fe;
    color: #7c3aed;
}

.badge-success {
    background-color: #d1fae5;
    color: #059669;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* 카드 호버 효과 */
.card-interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.card-interactive:active {
    transform: translateY(-2px) scale(1.01);
}

/* 프로그레스 바 */
.progress-bar {
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* 리스트 스타일 */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.25rem;
}

/* 다크모드 대응 (선택사항) */
@media (prefers-color-scheme: dark) {
    /* 필요시 다크모드 스타일 추가 */
}

/* 고해상도 디스플레이 대응 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 레티나 디스플레이용 최적화 */
}
