/* ==========================================================================
   갤러리 컴포넌트 스타일
   ========================================================================== */

/* 갤러리 설명 */
.gallery-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

/* 갤러리 아이템 */
.gallery-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed #ddd;
}

.gallery-item:last-child {
    border-bottom: none;
}

.gallery-item img {
    max-height: 800px;
    width: auto;
    margin: 0 auto;
    display: block;
    transition: all 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    cursor: pointer;
}

/* 모바일 갤러리 메타 정보 */
.mobile-gallery-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-gallery-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.mobile-gallery-meta-item i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

.mobile-gallery-buttons {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* 갤러리 편집/업로드 스타일 */
.gallery-images-container {
    margin: 2rem 0;
}

.upload-zone {
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color) !important;
    background-color: #f8f9fa !important;
}

.image-preview {
    display: inline-block;
    margin: 5px;
    position: relative;
    text-align: center;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 2px solid #ddd;
}

.image-preview .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.current-images .image-preview {
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 5px;
    background: white;
}

.sortable-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sortable-image-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.sortable-image-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sortable-image-item.ui-sortable-helper {
    transform: rotate(5deg);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1000;
}

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

.image-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-control-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-control-btn.remove {
    background: rgba(220, 53, 69, 0.9);
}

.image-control-btn.remove:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.image-info {
    padding: 0.75rem;
    background: white;
}

.image-title-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.image-title-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 107, 138, 0.1);
}

.sort-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: move;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sortable-image-item:hover .sort-handle {
    opacity: 1;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .sortable-images {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .sortable-image-item img {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .mobile-gallery-meta-row {
        gap: 0.4rem;
    }
    
    .mobile-gallery-meta-item {
        font-size: 0.85rem;
    }
    
    .gallery-header-mobile h3 {
        font-size: 1.25rem;
    }
    
    .sortable-images {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .sortable-image-item img {
        height: 120px;
    }
} 