/**
 * Conversor de Imagens - Estilos do componente de upload de arquivos.
 *
 * Paleta de cores do projeto:
 * #8ecae6 (Azul claro)
 * #219ebc (Azul médio)
 * #023047 (Azul escuro)
 * #ffb703 (Amarelo)
 * #fb8500 (Laranja)
 */

/* Área de upload */
.upload-area {
    border: 2px dashed #8ecae6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(142, 202, 230, 0.05);
    position: relative;
}

.upload-area:hover {
    background-color: rgba(142, 202, 230, 0.1);
    border-color: #219ebc;
}

.upload-area.dragover {
    background-color: rgba(142, 202, 230, 0.2);
    border-color: #219ebc;
    transform: scale(1.01);
    box-shadow: 0 0 15px rgba(33, 158, 188, 0.3);
}

.upload-area.upload-success {
    background-color: rgba(42, 157, 143, 0.1);
    border-color: #2a9d8f;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.upload-icon {
    font-size: 48px;
    color: #219ebc;
    margin-bottom: 15px;
    display: block;
}

.upload-text {
    margin: 5px 0;
    color: #555;
    font-size: 16px;
}

.upload-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

/* Container de erros */
.upload-errors {
    margin-top: 15px;
}

.upload-errors .alert {
    margin-bottom: 10px;
}

/* Prévia de imagens */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal centralizado */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    display: flex !important;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #8ecae6;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #023047;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #023047;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #fb8500;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: #023047;
}

.modal-message i {
    margin-right: 10px;
    font-size: 20px;
    vertical-align: middle;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-footer .btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

/* Tipos de alerta */
.alert-success {
    border-top: 4px solid #2a9d8f;
}

.alert-danger {
    border-top: 4px solid #e63946;
}

.alert-warning {
    border-top: 4px solid #fb8500;
}

.alert-info {
    border-top: 4px solid #219ebc;
}

.alert-success .modal-title,
.alert-success i {
    color: #023047;
}

.alert-danger .modal-title,
.alert-danger i {
    color: #023047;
}

.alert-warning .modal-title,
.alert-warning i {
    color: #023047;
}

.alert-info .modal-title,
.alert-info i {
    color: #023047;
}

/* Botões */
.btn-primary {
    background-color: #219ebc;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #8ecae6;
}

/* Lista de erros */
.error-list {
    padding-left: 20px;
    margin-top: 5px;
}

.error-list li {
    margin-bottom: 5px;
}