/* Estilos para estados de personalización en tracking y checkout */

/* Alerta de personalización pendiente */
.customization-alert {
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
}

.customization-alert.alert-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.customization-alert.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.customization-alert.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.customization-alert .alert-heading {
    font-size: 17px;
    font-weight: 600;
    color: inherit;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.customization-alert .alert-heading i {
    font-size: 20px;
}

.customization-alert p {
    font-size: 14px;
    color: inherit;
    margin-bottom: 10px;
    line-height: 1.5;
}

.customization-alert hr {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 12px 0;
    opacity: 0.5;
}

/* Botón de personalización */
.btn-start-customization {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
    background-color: #007bff;
    color: white;
    border: none;
}

.btn-start-customization:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    background-color: #0056b3;
}

.btn-start-customization i {
    margin-right: 6px;
}

/* Badge de estado de orden con personalización (basado en order_status) */
.order-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status-badge.pending_customization,
.order-status-badge.status-pending_customization {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd0;
}

.order-status-badge.customized,
.order-status-badge.status-customized {
    background: #e8eaf6;
    color: #3f51b5;
    border: 1px solid #c5cae9;
}

/* Estados de orden con personalización */
.order-status.status-pending_customization {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd0;
}

.order-status.status-customized {
    background: #e8eaf6;
    color: #3f51b5;
    border: 1px solid #c5cae9;
}

/* Lista de items con personalización (basado en has_customization) */
.order-item-customization-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
}

.order-item-customization-info i {
    font-size: 13px;
}

.order-item-customization-info.pending {
    background: #fff3cd;
    color: #856404;
}

.order-item-customization-info.completed {
    background: #d4edda;
    color: #155724;
}

/* Animaciones */
@keyframes pulse-warning {

    0%,
    100% {
        box-shadow: 0 2px 6px rgba(255, 193, 7, 0.25);
    }

    50% {
        box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4);
    }
}

.customization-alert.alert-warning {
    animation: pulse-warning 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .customization-alert {
        padding: 12px 15px;
        margin: 12px 0;
    }

    .customization-alert .alert-heading {
        font-size: 15px;
    }

    .customization-alert p {
        font-size: 13px;
    }

    .btn-start-customization {
        width: 100%;
        padding: 8px 16px;
        font-size: 13px;
    }

    .order-status-badge {
        padding: 5px 10px;
        font-size: 10px;
    }

    .order-item-customization-info {
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* Modal Catálogos más pequeño y sin repetir propiedades */
#catalogsModal .modal-dialog {
    width: 80vw;
    max-width: 80vw;
    height: 75vh;
    max-height: 75vh;
}

#catalogsModal .modal-content,
#catalogsModal .modal-body {
    height: 100%;
}

#catalogsModal .modal-body {
    height: calc(100% - 120px);
    /* Ajustar para header y footer */
    overflow-y: auto;
}

/* h4 color blanco */
#catalogsModal .modal-header h4,
#pdfPreviewModal .modal-header h4 {
    color: #fff;
    font-weight: bold;
}

/* Estilos específicos para el modal de logo */
#logoModal .modal-dialog {
    width: 75vw;
    max-width: 75vw;
    height: 85vh;
    max-height: 85vh;
}

#logoModal .modal-content,
#logoModal .modal-body {
    height: 100%;
}

#logoModal .modal-body {
    height: calc(100% - 120px);
    /* Ajustar para header y footer */
    overflow-y: auto;
    padding: 15px;
}

#logoModal .modal-header h4 {
    color: #fff;
    font-weight: bold;
}

/* Estilos para inputs más pequeños */
#logoModal .form-control,
#logoModal .form-control-file {
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
}

#logoModal textarea.form-control {
    font-size: 12px;
    padding: 4px 8px;
    line-height: 1.2;
}

/* Estilos para área de upload de archivos */
.file-upload-area {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.file-upload-area.dragover {
    border-color: #28a745;
    background-color: #d4edda;
}

/* Previsualizaciones de archivos */
.file-preview {
    display: inline-block;
    margin: 5px;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.file-preview:hover {
    transform: scale(1.05);
}

.file-preview img,
.file-preview canvas {
    max-width: 100px;
    max-height: 100px;
    display: block;
    object-fit: cover;
}

.file-preview .pdf-preview {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 12px;
}

.file-preview .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.file-preview .remove-file:hover {
    background: rgba(220, 53, 69, 1);
}

.file-preview .file-name {
    font-size: 10px;
    padding: 3px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}