/* ============================================================
   Photo Upload Section (Location form)
   ============================================================ */

.photo-upload-section {
    margin: 8px 0 16px;
}

.photo-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.photo-upload-actions .btn-secondary {
    font-size: 13px;
    padding: 6px 14px;
}

.photo-upload-count {
    font-size: 13px;
    color: var(--text-secondary, #888);
    margin-bottom: 8px;
}

.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}

.photo-upload-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border, #333);
    background: var(--bg-secondary, #1a1a1a);
    transition: border-color 0.2s;
}

.photo-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-upload-thumb .photo-upload-status {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-thumb.uploaded {
    border-color: #22c55e;
}

.photo-upload-thumb.uploaded .photo-upload-status {
    background: #22c55e;
}

.photo-upload-thumb.failed {
    border-color: #ef4444;
}

.photo-upload-thumb.failed .photo-upload-status {
    background: #ef4444;
}

.photo-upload-thumb .photo-upload-error {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    font-size: 9px;
    padding: 4px 3px;
    text-align: center;
    line-height: 1.2;
    border-radius: 0 0 6px 6px;
    word-break: break-word;
}

.photo-upload-progress {
    margin-top: 10px;
}

.progress-bar-container {
    height: 6px;
    background: var(--border, #333);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary, #3b82f6);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin-top: 4px;
}

.photo-upload-inline-section {
    grid-column: 1 / -1;
    margin: 12px 0;
}

@media (max-width: 600px) {
    .photo-upload-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    .photo-upload-actions {
        flex-direction: column;
    }
}

/* Detail view photo upload panel */
.detail-photo-upload-panel {
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.detail-photo-upload-btn-row {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

