/**
 * 이미지 업로더 스타일시트
 *
 * - 슬라이드쇼 UI
 * - 업로드 버튼 (오른쪽 하단)
 * - 반응형 디자인
 */

/* ===== 갤러리 컨테이너 ===== */
.image-gallery-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 슬라이드쇼 영역 ===== */
.image-slideshow {
    position: relative;
    width: 100%;
    height: 300px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 이미지 없음 메시지 */
.no-images {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #999;
    font-size: 18px;
    text-align: center;
}

/* 슬라이드 래퍼 */
.slide-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 개별 슬라이드 */
.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image.active {
    opacity: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

/* 네비게이션 및 인디케이터 제거됨 */

/* ===== 삭제 버튼 ===== */
.slide-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slide-delete-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* 편집 모드가 아닐 때 숨김 */
body:not(.edit-mode) .slide-delete-btn {
    display: none !important;
}

/* ===== 이미지 없음 플레이스홀더 ===== */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 40px 20px;
    gap: 20px;
}

.placeholder-text {
    color: #999;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

/* ===== 업로드 버튼 ===== */
.upload-btn-inline {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
}

.upload-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 편집 모드가 아닐 때 숨김 */
body:not(.edit-mode) .upload-btn-inline {
    display: none !important;
}

/* ===== 반응형 디자인 ===== */

/* 태블릿 */
@media (max-width: 768px) {
    .image-slideshow {
        height: 280px;
    }

    .no-image-placeholder {
        min-height: 300px;
        padding: 30px 15px;
    }

    .placeholder-text {
        font-size: 16px;
    }
}

/* 모바일 */
@media (max-width: 480px) {
    .image-slideshow {
        height: 240px;
        border-radius: 4px;
    }

    .no-image-placeholder {
        min-height: 250px;
        padding: 20px 10px;
    }

    .placeholder-text {
        font-size: 14px;
    }
}

/* ===== 로딩 애니메이션 ===== */
.upload-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 터치 디바이스 최적화 - 버튼 제거됨 */

/* 접근성 - 버튼 제거됨 */

/* 스크린 리더 전용 텍스트 */
.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;
}
