/* ------------------------------------------------ */
/* FILES STYLES */
/* ------------------------------------------------ */
#logo-files {
    width: 500px;
    height: auto;
    opacity: 1;
}

.files-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 68.75rem;
    margin-top: clamp(96px, 11vh, 136px);
    margin-bottom: 24px;
}

.files-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 43rem;
    min-height: 21rem;
    margin-bottom: 1.25rem;
    text-align: center;
    transition: box-shadow 0.3s ease;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.files-section select,
.files-section input,
.files-section button {
    width: 100%;
    max-width: 17rem;
    min-width: unset;
    margin-bottom: 0.75rem;
    padding: 0.65rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    box-sizing: border-box;
    text-align: center;
}

.files-section:hover {
    box-shadow: 0 0 1.25rem var(--login-hover);
}

.dark-theme .files-section {
    border-color: rgba(155, 208, 255, 0.24);
}

.files-blocked {
    width: 100%;
    max-width: 680px;
    margin: 0 auto 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
    font-weight: 600;
    text-align: center;
}

.files-section.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.files-section h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.files-section h2::before,
.files-section h2::after {
    content: "—";
    color: var(--hover-text-color);
    margin: 0 0.3rem;
}

.files-section h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.field-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.files-lang-row {
    width: 100%;
    max-width: 36rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}

.files-lang-row .field-row {
    width: 100%;
}

.files-lang-row .dropdown-label {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.files-lang-row select {
    max-width: none;
}

.dropdown-label {
    position: relative !important;
    font-size: 1.10rem !important;
    font-weight: bold;
    color: var(--dropdown-label-color);
    margin-bottom: 0.3125rem;
    width: 100%;
    min-width: 18.75rem;
    max-width: 18.75rem;
    text-align: center;
}

.dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 18.75rem;
    margin: 0 auto;
}

#uploadButton {
    width: 100%;
    font-size: 0.95rem;
    font-weight: bold;
    background: var(--autobutton-bg);
    color: var(--autobutton-text-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    max-width: 17rem;
}

#uploadButton:hover {
    background: var(--autobutton-hover-bg);
    transform: scale(1.05);
}

#uploadButton:active {
    transform: translateY(0.125rem);
}

#uploadButton.disabled,
#uploadButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ------------------------------------------------ */
/* DROPZONE STYLES */
/* ------------------------------------------------ */

.drop-zone {
    border: 0.125rem dashed var(--border-color);
    background-color: var(--wrapper-bg);
    color: var(--text-color);
    border-radius: 0.75rem;
    padding: 1.875rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    width: 100%;
    max-width: 37.5rem;
    margin: 0 auto;
    box-shadow: var(--wrapper-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-zone:hover {
    background-color: var(--input-focus-bg);
    border-color: var(--hover-text-color);
}

.drop-zone.dragging {
    background-color: var(--input-focus-bg);
    border-color: var(--button-bg);
}

.drop-zone p {
    font-size: 1rem;
    color: var(--text-color);
}

.drop-zone button {
    background: none;
    border: none;
    color: var(--link-color);
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: underline;
}

.drop-zone button:hover {
    color: var(--hover-text-color);
}

.drop-icon {
    width: 3rem;
    height: 3rem;
    opacity: 0.9;
}

/* ------------------------------------------------ */
/* FILE LIST STYLES */
/* ------------------------------------------------ */

.file-list-container {
    margin-top: 1rem;
    width: 100%;
    max-width: 37.5rem;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--wrapper-bg);
    box-shadow: var(--wrapper-shadow);
}

.file-list li {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 0.95rem;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-list li .file-remove {
    background: none;
    border: none;
    color: var(--link-color);
    cursor: pointer;
    font-size: 0.9rem;
}

.file-list li .file-remove:hover {
    color: var(--hover-text-color);
}

/* ------------------------------------------------ */
/* FILE LIST X BUTTON STYLES */
/* ------------------------------------------------ */

.file-list li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.3rem 0.6rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: none !important;
    gap: 0.5rem !important;
}

.remove-file-btn {
    all: unset !important;
    flex: 0 0 auto !important;
    width: 15px !important;
    height: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    color: var(--link-color) !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
    margin-left: 4px !important;
}

.remove-file-btn:hover {
    color: var(--hover-text-color) !important;
}

.remove-file-btn:focus-visible {
    outline: 2px solid var(--focus-ring-color) !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* ------------------------------------------------ */
/* SPINNER STYLES */
/* ------------------------------------------------ */

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--button-bg);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ------------------------------------------------ */
/* RESPONSIVE: SMARTPHONE (≤ 768px) */
/* ------------------------------------------------ */
@media screen and (max-width: 769px) {
    .files-lang-row {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 0;
    }

    html,
    body {
        margin: 0;
        padding: 0;
    }
    .wrapper,
    #mainWrapper {
        width: 90%;
        margin: 0 auto;
        padding: 1rem 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    #logo-files {
        max-width: 90%;
        height: auto;
        margin-bottom: 1rem;
    }
    .files-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-top: 104px;
    }
    .files-section {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .files-section select,
    .files-section input,
    .files-section button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 0.75rem;
    }
    .drop-zone {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1rem;
    }
    .file-list-container {
        width: 100%;
        max-width: 100%;
    }
}
