/* 
 * Fire119 모바일 신고 접수 - 커스텀 스타일
 */

/* iOS Safe Area 지원 */
.safe-area-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* 스크롤바 숨기기 (모바일 경험 향상) */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 텍스트 선택 방지 (버튼 등) */
button, label {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 입력 필드 포커스 시 확대 방지 (iOS) */
input, textarea, select {
    font-size: 16px !important;
}

/* 녹음 버튼 활성화 상태 */
#voiceRecordBtn.recording {
    background: linear-gradient(to bottom right, #EF4444, #DC2626);
    animation: pulse 1s infinite;
}

#voiceRecordBtn.recording #recordingIndicator {
    display: block;
}

/* 이미지 미리보기 아이템 */
.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f3f4f6;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-preview-item .delete-btn:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* 로딩 스피너 */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 바운스 인 애니메이션 (모달용) */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-bounce-in {
    animation: bounce-in 0.3s ease-out forwards;
}

/* 상태 배너 스타일 */
#statusBanner.success {
    background: linear-gradient(to right, #10B981, #059669);
    color: white;
}

#statusBanner.error {
    background: linear-gradient(to right, #EF4444, #DC2626);
    color: white;
}

#statusBanner.info {
    background: linear-gradient(to right, #3B82F6, #2563EB);
    color: white;
}

/* 위치 로딩 애니메이션 */
#getLocationBtn.loading #locationIcon {
    animation: pulse 1s infinite;
}

/* 제출 버튼 로딩 상태 */
#submitBtn.loading {
    pointer-events: none;
}

#submitBtn.loading #submitIcon {
    display: none;
}

#submitBtn.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* 우선순위 선택 hover 효과 */
.priority-option > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 포커스 링 개선 */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: none;
    ring: 2px;
    ring-offset: 2px;
}

/* 터치 피드백 */
.active\:scale-95:active {
    transform: scale(0.95);
}

.active\:scale-\[0\.98\]:active {
    transform: scale(0.98);
}

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

/* 가로 모드 대응 */
@media (orientation: landscape) and (max-height: 500px) {
    header {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    header h1 {
        font-size: 1rem;
    }
    
    footer {
        padding: 0.5rem 1rem;
    }
    
    #submitBtn {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* 작은 화면 대응 */
@media (max-width: 360px) {
    #voiceRecordBtn {
        width: 100px;
        height: 100px;
    }
    
    #voiceRecordBtn #voiceIcon {
        font-size: 2rem;
    }
}

/* PWA 설치 배너 숨기기 */
@media all and (display-mode: standalone) {
    header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
}


