/**
 * resume-viewer.css - Стилі для компонента перегляду резюме
 */

:root {
    --jg-pdf-badge-bg: linear-gradient(135deg, #6b3333 0%, #4a2626 100%);
    --jg-pdf-badge-shadow: 0 4px 12px rgba(58, 28, 28, 0.28);
    --jg-pdf-badge-icon: #f2e6e6;
    --jg-pdf-status-bg: rgba(90, 42, 42, 0.2);
    --jg-pdf-status-color: #b08080;
    --jg-pdf-status-border: rgba(90, 42, 42, 0.35);
    --jg-docx-badge-bg: linear-gradient(135deg, #2a4a6b 0%, #1e3550 100%);
    --jg-docx-badge-shadow: 0 4px 12px rgba(30, 53, 80, 0.28);
    --jg-docx-badge-icon: #e8f0f8;
}

body.light-theme {
    --jg-pdf-status-bg: rgba(90, 42, 42, 0.12);
    --jg-pdf-status-color: #7a4242;
    --jg-pdf-status-border: rgba(90, 42, 42, 0.22);
    /* PDF-бейдж у світлій темі — яскравіший, краще видно на білій модалці */
    --jg-pdf-badge-bg: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --jg-pdf-badge-shadow: 0 2px 8px rgba(192, 57, 43, 0.28);
    --jg-pdf-badge-icon: #ffffff;
}

/* Покращення кнопки перегляду резюме */
.view-resume-btn-enhanced {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    min-height: 32px;
    text-decoration: none;
}

.view-resume-btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.view-resume-btn-enhanced:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: none;
    box-shadow: none;
}

.view-resume-btn-enhanced:hover::before {
    left: 100%;
}

.view-resume-btn-enhanced:active {
    transform: translateY(-1px);
}

.view-resume-btn-enhanced i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.view-resume-btn-enhanced:hover i {
    transform: scale(1.1);
}

/* Індикатор завантаження файлу */
.resume-upload-progress {
    width: 100%;
    height: 6px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.resume-upload-progress.show {
    display: block;
}

.resume-upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.resume-upload-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Покращення резюме секції у модальному вікні спеціаліста */
.specialist-resume-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 12px 0 0;
    border: none;
    transition: none;
}

.specialist-resume-section:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.resume-file-info-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.resume-file-icon {
    width: 36px;
    height: 36px;
    background: var(--jg-pdf-badge-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jg-pdf-badge-icon);
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: none;
}

.resume-file-icon.is-docx,
.resume-file-icon.is-doc {
    background: var(--jg-docx-badge-bg);
    box-shadow: var(--jg-docx-badge-shadow);
    color: var(--jg-docx-badge-icon);
}

.resume-file-icon i {
    color: inherit !important;
}

.resume-details-enhanced {
    flex: 1;
}

.resume-filename-enhanced {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 2px;
    word-break: break-word;
    line-height: 1.25;
}

.resume-filesize-enhanced {
    color: #95a5a6;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

.resume-filesize-enhanced i {
    color: #3498db;
}

/* Статус індикатори */
.resume-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.resume-status.pdf {
    background: var(--jg-pdf-status-bg);
    color: var(--jg-pdf-status-color);
    border: 1px solid var(--jg-pdf-status-border);
}

.resume-status.converted {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Анімації для кнопок */
@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2); }
    50% { box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); }
}

.view-resume-btn-enhanced.pulse {
    animation: buttonGlow 2s infinite;
}

/* Покращення для світлої теми */
body.light-theme .specialist-resume-section {
    background: transparent;
    border-color: transparent;
}

body.light-theme .specialist-resume-section:hover {
    background: transparent;
    border-color: transparent;
}

body.light-theme .resume-filename-enhanced {
    color: #2c3e50;
}

body.light-theme .resume-filesize-enhanced {
    color: #7f8c8d;
}

body.light-theme .view-resume-btn-enhanced {
    box-shadow: none;
}

body.light-theme .resume-upload-progress {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Адаптивні стилі */
@media (max-width: 768px) {
    .resume-file-info-enhanced {
        flex-direction: row;
        text-align: left;
        gap: 10px;
        width: 100%;
    }

    .view-resume-btn-enhanced {
        width: auto;
        max-width: 100%;
        justify-content: center;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .specialist-resume-section {
        padding: 0;
        margin: 12px 0 0;
    }

    .resume-filename-enhanced {
        font-size: 0.95rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .resume-file-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .view-resume-btn-enhanced {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .specialist-resume-section {
        padding: 0;
        margin: 10px 0 0;
    }
}

/* Покращення завантаження файлів */
.resume-upload-zone {
    border: 2px dashed rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(52, 152, 219, 0.02);
}

.resume-upload-zone:hover {
    border-color: rgba(52, 152, 219, 0.5);
    background: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
}

.resume-upload-zone.drag-over {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
    display: block;
}

.upload-text {
    font-size: 1.1rem;
    color: #ecf0f1;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    color: #95a5a6;
    font-size: 0.9rem;
}

body.light-theme .upload-text {
    color: #2c3e50;
}

body.light-theme .upload-hint {
    color: #7f8c8d;
}

/* Покращення відображення помилок */
.resume-error-enhanced {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.resume-error-enhanced i {
    color: #e74c3c;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.resume-error-enhanced .error-content {
    flex: 1;
}

.resume-error-enhanced .error-title {
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 5px;
}

.resume-error-enhanced .error-message {
    color: #bdc3c7;
    font-size: 0.9rem;
    line-height: 1.4;
}

body.light-theme .resume-error-enhanced .error-message {
    color: #7f8c8d;
}

/* Мобільний повноекранний перегляд PDF */
@media (max-width: 900px) {
    .resume-viewer-modal {
        z-index: 12000 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .resume-viewer-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .resume-viewer-modal.show .resume-viewer-content {
        transform: none !important;
    }

    .resume-viewer-header,
    .resume-viewer-footer {
        flex: 0 0 auto !important;
        border-radius: 0 !important;
        max-width: 100% !important;
    }

    .resume-viewer-footer {
        padding: 8px 10px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .resume-viewer-footer .resume-info {
        display: none !important;
    }

    .resume-viewer-footer .resume-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
    }

    .resume-viewer-footer .resume-btn {
        flex: 1 1 0 !important;
        justify-content: center !important;
        padding: 10px 12px !important;
    }

    .resume-viewer-body {
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        min-height: 0 !important;
        flex: 1 1 auto !important;
        background: #525659 !important;
        position: relative !important;
    }

    /* Базові розміри iframe (desktop / fallback) */
    .resume-viewer-iframe {
        display: block !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
    }

    /* pdf.js continuous scroll (mobile) */
    .jg-pdfjs-root {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: #525659 !important;
        overflow: hidden !important;
    }

    .jg-pdfjs-viewport {
        position: absolute !important;
        inset: 0 !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y pinch-zoom !important;
        overscroll-behavior: contain !important;
        background: #525659 !important;
    }

    .jg-pdfjs-pages {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 0 16px !important;
        transform-origin: top center !important;
    }

    .jg-pdfjs-page {
        display: block !important;
        width: 100% !important;
        margin: 0 0 10px !important;
        background: #fff !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
        line-height: 0 !important;
    }

    .jg-pdfjs-page:last-child {
        margin-bottom: 0 !important;
    }

    .jg-pdfjs-canvas {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        background: #fff !important;
    }

    .jg-pdf-open-full {
        display: none !important;
    }
} 