/**
 * Download Media Files - Styles
 * 
 * @package DownloadMediaFiles
 * @since 1.0.0
 * @since 2.0.0 Melhorias de acessibilidade e responsividade
 */

/* Container principal */
.dt-file-download {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Select de arquivos */
.dt-file-select {
    flex: 1;
    min-width: 200px;
    max-width: 100%;
    padding: 8px 30px 8px 10px !important;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #fff;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.dt-file-select:hover {
    border-color: #999;
}

.dt-file-select:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
    outline: none;
}

/* Botão de download */
.dt-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    user-select: none;
}

.dt-download-btn:hover:not(.dt-download-btn-disabled) {
    background-color: #005bb5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dt-download-btn:active:not(.dt-download-btn-disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.dt-download-btn:focus {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* Botão desabilitado */
.dt-download-btn-disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.dt-download-btn-disabled i {
    color: #999;
}

/* Container de botão único */
.dt-single-button-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

/* Ícone do botão */
.dt-download-btn i {
    font-size: 14px;
    line-height: 1;
}

/* Tema escuro */
.dt-file-download[data-skin="dark"] {
    color: #fff;
}

.dt-file-download[data-skin="dark"] .dt-file-select {
    background-color: #2c2c2c;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23fff" d="M6 9L1 4h10z"/></svg>');
    color: #fff;
    border-color: #444;
}

.dt-file-download[data-skin="dark"] .dt-file-select:hover {
    border-color: #666;
}

.dt-file-download[data-skin="dark"] .dt-file-select:focus {
    border-color: #00e6ff;
    box-shadow: 0 0 0 2px rgba(0, 230, 255, 0.2);
}

.dt-file-download[data-skin="dark"] .dt-download-btn {
    background-color: #00e6ff;
    color: #000;
}

.dt-file-download[data-skin="dark"] .dt-download-btn:hover:not(.dt-download-btn-disabled) {
    background-color: #00b8cc;
}

.dt-file-download[data-skin="dark"] .dt-download-btn:focus {
    outline-color: #00e6ff;
}

.dt-file-download[data-skin="dark"] .dt-download-btn-disabled {
    background-color: #444;
    color: #666;
}

.dt-file-download[data-skin="dark"] .dt-download-btn-disabled i {
    color: #666;
}

/* Responsividade */
@media screen and (max-width: 600px) {
    .dt-file-download {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-file-select {
        width: 100%;
        max-width: none;
    }

    .dt-download-btn {
        width: 100%;
        justify-content: center;
    }

    .dt-single-button-container {
        justify-content: stretch;
    }

    .dt-single-button-container .dt-download-btn {
        width: 100%;
    }
}

/* Acessibilidade - High Contrast Mode */
@media (prefers-contrast: high) {
    .dt-file-select,
    .dt-download-btn {
        border-width: 2px;
    }

    .dt-download-btn:focus {
        outline-width: 3px;
    }
}

/* Acessibilidade - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dt-file-select,
    .dt-download-btn {
        transition: none;
    }

    .dt-download-btn:hover:not(.dt-download-btn-disabled) {
        transform: none;
    }
}

/* Print styles */
@media print {
    .dt-file-download {
        display: none;
    }
}
