/* =========================================================
   FILE SHARE
   ========================================================= */

#homepage-fileshare-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}


#homepage-fileshare-modal .fs-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(5px);
}


#homepage-fileshare-modal .fs-modal {
    width: min(950px, 95vw);
    max-height: 90vh;

    overflow-y: auto;

    box-sizing: border-box;

    padding: 24px;

    border-radius: 16px;

    background: rgb(25, 25, 30);

    color: white;

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.6);
}


#homepage-fileshare-modal .fs-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 24px;
}


#homepage-fileshare-modal h2 {
    margin: 0;

    font-size: 24px;
}


#homepage-fileshare-modal .fs-close {
    border: 0;

    background: transparent;

    color: white;

    font-size: 28px;

    cursor: pointer;

    opacity: 0.7;
}


#homepage-fileshare-modal .fs-close:hover {
    opacity: 1;
}


#homepage-fileshare-modal label {
    display: block;

    margin-bottom: 18px;

    font-size: 14px;
}


#homepage-fileshare-modal input,
#homepage-fileshare-modal select {
    width: 100%;

    box-sizing: border-box;

    margin-top: 7px;

    padding: 11px 12px;

    border: 1px solid rgba(255,255,255,0.15);

    border-radius: 8px;

    background: rgba(255,255,255,0.07);

    color: white;

    outline: none;
}


#homepage-fileshare-modal option {
    background: #222;

    color: white;
}


#homepage-fileshare-modal .fs-dropzone {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 180px;

    margin: 20px 0;

    border: 2px dashed rgba(255,255,255,0.25);

    border-radius: 12px;

    cursor: pointer;

    text-align: center;

    transition:
        background 0.15s,
        border-color 0.15s;
}


#homepage-fileshare-modal .fs-dropzone:hover,
#homepage-fileshare-modal .fs-dropzone.dragover {
    border-color: rgba(255,255,255,0.7);

    background: rgba(255,255,255,0.05);
}


#homepage-fileshare-modal .fs-dropzone strong {
    font-size: 18px;
}


#homepage-fileshare-modal .fs-dropzone span {
    margin-top: 8px;

    opacity: 0.7;
}


#homepage-fileshare-modal .fs-dropzone small {
    margin-top: 12px;

    opacity: 0.5;
}


#homepage-fileshare-modal .fs-selected {
    margin: 12px 0;

    padding: 10px;

    border-radius: 8px;

    background: rgba(255,255,255,0.06);
}


#homepage-fileshare-modal .fs-button {
    width: 100%;

    padding: 12px 18px;

    border: 0;

    border-radius: 8px;

    background: rgba(255,255,255,0.15);

    color: white;

    cursor: pointer;

    font-weight: 600;

    transition:
        background 0.15s;
}


#homepage-fileshare-modal .fs-button:hover {
    background: rgba(255,255,255,0.22);
}


#homepage-fileshare-modal .fs-button:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}


#homepage-fileshare-modal .fs-progress-container {
    display: flex;

    align-items: center;

    gap: 10px;

    margin: 15px 0;
}


#homepage-fileshare-modal .fs-progress {
    flex: 1;

    height: 8px;

    overflow: hidden;

    border-radius: 20px;

    background: rgba(255,255,255,0.1);
}


#homepage-fileshare-modal #fs-progress-bar {
    width: 0;

    height: 100%;

    background: rgba(255,255,255,0.8);

    transition: width 0.15s ease;
}


#homepage-fileshare-modal .fs-error {
    margin-top: 12px;

    color: #ff7777;
}


#homepage-fileshare-modal .fs-success {
    margin-top: 12px;

    color: #75e6a0;
}


#homepage-fileshare-modal .fs-result-name {
    margin-bottom: 5px;

    font-size: 20px;

    font-weight: 600;
}


#homepage-fileshare-modal .fs-result-file {
    margin-bottom: 20px;

    opacity: 0.6;
}


#homepage-fileshare-modal .fs-table-wrapper {
    overflow-x: auto;
}


#homepage-fileshare-modal .fs-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}


#homepage-fileshare-modal .fs-table th,
#homepage-fileshare-modal .fs-table td {
    padding: 12px;

    border-bottom:
        1px solid rgba(255,255,255,0.08);

    text-align: left;

    vertical-align: middle;
}


#homepage-fileshare-modal .fs-table th {
    opacity: 0.6;
}


#homepage-fileshare-modal .fs-actions {
    white-space: nowrap;
}


#homepage-fileshare-modal .fs-actions button,
#homepage-fileshare-modal .fs-link-button {
    padding: 6px 9px;

    margin-left: 4px;

    border: 0;

    border-radius: 6px;

    background: rgba(255,255,255,0.1);

    color: white;

    cursor: pointer;
}


#homepage-fileshare-modal .fs-actions button:hover,
#homepage-fileshare-modal .fs-link-button:hover {
    background: rgba(255,255,255,0.2);
}


#homepage-fileshare-modal .fs-empty {
    padding: 40px;

    text-align: center;

    opacity: 0.5;
}

/* =========================================================
   FILE SHARE — ULTRA SMOOTH MODAL
   ========================================================= */

#homepage-fileshare-modal .fs-overlay {
    opacity: 0;
    animation: fs-overlay-in 180ms cubic-bezier(0.22, 1, 0.36, 1) forwards;

    /* GPU compositing */
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}


#homepage-fileshare-modal .fs-modal {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.985);

    animation: fs-modal-in 220ms cubic-bezier(0.22, 1, 0.36, 1) forwards;

    /* GPU compositing */
    will-change: transform, opacity;
    transform-origin: center center;
    backface-visibility: hidden;
}


/* =========================================================
   TŁO
   ========================================================= */

@keyframes fs-overlay-in {

    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

}


/* =========================================================
   OKNO
   ========================================================= */

@keyframes fs-modal-in {

    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #homepage-fileshare-modal .fs-overlay,
    #homepage-fileshare-modal .fs-modal {

        animation: none;
        opacity: 1;
        transform: none;

    }

}
