/* Review Photos Styles */

/* Photo upload section */
.field-photos {
    margin: 20px 0;
}

.photo-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.photo-upload-label:hover {
    border-color: #23D3D3;
    background: #f0f9f9;
}

.photo-upload-label i {
    font-size: 20px;
    color: #23D3D3;
}

.photo-upload-label span {
    color: #666;
    font-size: 14px;
}

/* Photo preview container */
.photo-preview-container {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd; /* Added for debugging */
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.photo-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.photo-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.3s ease;
}

.photo-remove-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.photo-help-text {
    color: #666;
    font-size: 12px;
    margin: 0;
}

/* Review photos display */
.review-photos {
    margin-top: 15px;
}

.review-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.review-photo-item {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.review-photo-item:hover {
    transform: scale(1.05);
}

.review-photo-link {
    display: block;
    width: 100%;
    height: 100%;
}

.review-photo-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .photo-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .review-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .review-photo-thumbnail {
        height: 60px;
    }
    
    .photo-preview-image {
        height: 80px;
    }
}

/* Lightbox integration */
.review-photo-link {
    cursor: pointer;
}

/* Loading state for photo upload */
.photo-upload-loading {
    opacity: 0.6;
    pointer-events: none;
}

.photo-upload-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #23D3D3;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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