/*
 * Styles for Visual ZIP Previewer with AI (v2.2 - Universal Selection FINAL)
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

.vzp-container {
    font-family: 'Poppins', sans-serif;
    background: #f0f2f5;
    padding: 20px;
    border-radius: 16px;
    max-width: 900px;
    margin: 20px auto;
    border: 1px solid #e1e4e8;
}

/* --- Uploader Card --- */
.vzp-uploader-card { background: #ffffff; border-radius: 12px; padding: 30px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07); }
#vzp-drop-zone { border: 2px dashed #d0d7e0; border-radius: 10px; padding: 40px 20px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; }
#vzp-drop-zone.dragover { border-color: #4a90e2; background-color: #f7faff; transform: scale(1.02); }
.vzp-drop-zone-icon-container .vzp-icon { width: 60px; height: 60px; color: #6a11cb; }
.vzp-drop-zone-title { font-size: 24px; font-weight: 700; color: #333; margin: 10px 0; }
.vzp-drop-zone-text { font-size: 16px; color: #6c757d; }
.vzp-status { margin-top: 15px; font-weight: 600; min-height: 24px; transition: color 0.3s; }

/* --- Results Area --- */
.vzp-results-area { margin-top: 30px; }
.vzp-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #e0e0e0; flex-wrap: wrap; gap: 15px; }
.vzp-results-header h3 { margin: 0; font-size: 20px; color: #333; }
.vzp-results-header p { margin: 0; font-size: 14px; color: #6c757d; }
.vzp-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px; }

/* --- Interactive File Card (Updated) --- */
.vzp-file-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; padding: 15px 10px; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; overflow: hidden; cursor: pointer; position: relative; border: 2px solid transparent; }
.vzp-file-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.vzp-file-preview { width: 64px; height: 64px; margin: 0 auto 10px auto; display: flex; align-items: center; justify-content: center; background-color: #f0f2f5; border-radius: 6px; }
.vzp-file-preview img { max-width: 100%; max-height: 100%; border-radius: 4px; object-fit: cover; }
.vzp-file-name { font-size: 13px; font-weight: 600; color: #444; word-break: break-all; }

/* ★★★ NEW: Styles for the Quick Action Buttons ★★★ */
.vzp-card-actions {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0; /* Hidden by default */
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none; /* Can't be clicked when hidden */
}
.vzp-file-card:hover .vzp-card-actions {
    opacity: 1; /* Show on hover */
    transform: translateY(0);
    pointer-events: auto; /* Clickable when visible */
}
.vzp-action-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 5px;
}
.vzp-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}
.vzp-action-btn svg {
    width: 100%;
    height: 100%;
}

/* --- Header Buttons & Selection Visuals --- */
.vzp-header-buttons { display: flex; gap: 12px; }
.vzp-header-btn { border: none; padding: 10px 22px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.25s ease; text-transform: uppercase; letter-spacing: 0.5px; display: none; }
.vzp-header-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
#vzp-download-selected { background: linear-gradient(45deg, #007bff, #0056b3); color: white; box-shadow: 0 4px 20px rgba(0, 123, 255, 0.35); }
#vzp-download-selected:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 7px 25px rgba(0, 123, 255, 0.45); }
#vzp-reset-button { background: linear-gradient(45deg, #6c757d, #5a6268); color: white; box-shadow: 0 4px 20px rgba(108, 117, 125, 0.25); display: inline-block; }
#vzp-reset-button:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 7px 25px rgba(108, 117, 125, 0.35); }
.vzp-file-card.selected { transform: translateY(-5px) scale(1.03); box-shadow: 0 8px 30px rgba(74, 144, 226, 0.3); border-color: #4a90e2; }
.vzp-file-card .selection-overlay { position: absolute; top: -2px; left: -2px; width: calc(100% + 4px); height: calc(100% + 4px); background: rgba(74, 144, 226, 0.4); border-radius: 8px; opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.vzp-file-card .selection-tick { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: #4a90e2; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); font-weight: bold; font-size: 16px; pointer-events: none; box-shadow: 0 3px 8px rgba(0,0,0,0.3); border: 2px solid white; }
.vzp-file-card.selected .selection-overlay { opacity: 1; }
.vzp-file-card.selected .selection-tick { transform: scale(1); }

/* --- Lightbox (No changes) --- */
.vzp-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s; }
.vzp-lightbox.show { opacity: 1; visibility: visible; }
.vzp-lightbox-content { position: relative; width: 95vw; height: 95vh; overflow: auto; }
.vzp-lightbox-image { display: block; margin: auto; cursor: zoom-in; transition: all 0.3s ease; }
.vzp-lightbox-image.fit-mode { width: 100%; height: 100%; object-fit: contain; }
.vzp-lightbox-image.zoom-mode { width: auto; height: auto; object-fit: initial; cursor: zoom-out; }
.vzp-lightbox-btn { position: absolute; background: rgba(30,30,30,0.6); color: white; border: 1px solid rgba(255,255,255,0.2); cursor: pointer; font-size: 28px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.2s ease; }
.vzp-lightbox-btn:hover { background: rgba(0,0,0,0.8); }
.vzp-lightbox-close { top: 15px; right: 15px; }
.vzp-lightbox-prev { top: 50%; left: 15px; transform: translateY(-50%); }
.vzp-lightbox-next { top: 50%; right: 15px; transform: translateY(-50%); }