/* Media Viewer Component - Shared between Baogia Share & Project Detail */
.quote-share__image-viewer[hidden] {
    display: none !important;
}

.quote-share__image-viewer:not([hidden]) {
    display: flex !important;
    animation: mediaViewerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mediaViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quote-share__image-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.quote-share__image-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.quote-share__image-viewer-panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* Floating Toolbar */
.quote-share__image-viewer-toolbar {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

.quote-share__image-viewer.is-chrome-hidden .quote-share__image-viewer-toolbar {
    opacity: 0;
    transform: translate(-50%, -20px);
    pointer-events: none;
}

.quote-share__image-viewer-info {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-share__image-viewer-info strong {
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quote-share__image-viewer-info span {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
}

.quote-share__image-viewer-file-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.quote-share__image-viewer-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-tool {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-tool:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-tool--close:hover {
    background: #ef4444;
}

.quote-share__image-viewer-zoom-label {
    min-width: 48px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
}

.v-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* Stage Container */
.quote-share__image-viewer-stage-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.quote-share__image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-share__image-viewer-nav--prev { left: 32px; }
.quote-share__image-viewer-nav--next { right: 32px; }

.quote-share__image-viewer-nav:hover:not(:disabled) {
    background: #3b82f6;
    border-color: #60a5fa;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.quote-share__image-viewer-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.quote-share__image-viewer.is-chrome-hidden .quote-share__image-viewer-nav {
    opacity: 0;
}

.quote-share__image-viewer-stage {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

.quote-share__image-viewer-stage img {
    max-width: min(96vw, calc(100vw - 120px));
    max-height: min(86vh, calc(100vh - 170px));
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 0;
}

.quote-share__image-viewer-stage video {
    width: auto;
    height: auto;
    max-width: min(96vw, calc(100vw - 120px));
    max-height: min(86vh, calc(100vh - 170px));
    object-fit: contain;
    border-radius: 0;
    background: #000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.quote-share__image-viewer-stage.is-zoomed { cursor: grab; }
.quote-share__image-viewer-stage.is-dragging { cursor: grabbing; }

/* Footer & Thumbs */
.quote-share__image-viewer-footer {
    padding: 24px;
    background: linear-gradient(to top, rgba(10, 15, 25, 0.8), transparent);
    z-index: 20;
    transition: all 0.3s ease;
}

/* Caption: task name + date */
.quote-share__image-viewer-caption {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.mv-caption__task {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 3px 12px;
    white-space: nowrap;
}

.mv-caption__date {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
}

.quote-share__image-viewer.is-chrome-hidden .quote-share__image-viewer-footer {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.quote-share__image-viewer-thumbs {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.quote-share__image-viewer-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    padding: 0;
}

.quote-share__image-viewer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.quote-share__image-viewer-thumb:hover img {
    opacity: 0.8;
}

.quote-share__image-viewer-thumb.is-active {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.5);
}

.quote-share__image-viewer-thumb.is-active img {
    opacity: 1;
}

.quote-share__image-viewer-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    z-index: 60;
}

.quote-share__image-viewer:fullscreen {
    padding: 0;
}

.quote-share__image-viewer:fullscreen .quote-share__image-viewer-backdrop {
    display: none;
}

.quote-share__image-viewer:fullscreen .quote-share__image-viewer-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
}

@media (max-width: 768px) {
    .quote-share__image-viewer-toolbar {
        top: 12px;
        gap: 8px;
        padding: 6px 10px;
    }
    .quote-share__image-viewer-info {
        display: none;
    }
    .quote-share__image-viewer-nav {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .quote-share__image-viewer-nav--prev { left: 12px; }
    .quote-share__image-viewer-nav--next { right: 12px; }
    .quote-share__image-viewer-thumb {
        width: 48px;
        height: 48px;
    }
}
