/* ========================================
   DTF CALCULATOR - FLUJO OPTIMIZADO
   ======================================== */

/* Los estilos del formulario DTF se han movido a dtf-form.css */

/* ========================================
   ESTILOS GENERALES DEL FRONTEND
   ======================================== */

/* Estilos para mensajes y notificaciones */
.dtf-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dtf-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dtf-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dtf-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.dtf-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Estilos para elementos de utilidad */
.dtf-hidden {
    display: none !important;
}

.dtf-visible {
    display: block !important;
}

/* Estilos para estados de carga */
.dtf-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dtf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: dtf-spin 1s linear infinite;
}

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

/* Estilos para elementos de interfaz comunes */
.dtf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.dtf-button.primary {
    background: #007cba;
    color: white;
}

.dtf-button.primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.dtf-button.secondary {
    background: #6c757d;
    color: white;
}

.dtf-button.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.dtf-button.success {
    background: #28a745;
    color: white;
}

.dtf-button.success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.dtf-button.danger {
    background: #dc3545;
    color: white;
}

.dtf-button.danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Estilos para formularios generales */
.dtf-form-group {
    margin-bottom: 20px;
}

.dtf-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
}

.dtf-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.dtf-form-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.dtf-form-input.error {
    border-color: #dc3545;
}

.dtf-form-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Estilos para tooltips */
.dtf-tooltip {
    position: relative;
    display: inline-block;
}

.dtf-tooltip .dtf-tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.dtf-tooltip:hover .dtf-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Estilos para modales */
.dtf-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.dtf-modal.show {
    display: block;
}

.dtf-modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.dtf-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #6c757d;
}

.dtf-modal-close:hover {
    color: #1d2327;
}

/* Estilos para notificaciones toast */
.dtf-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.dtf-toast.show {
    transform: translateX(0);
}

.dtf-toast.success {
    border-left: 4px solid #28a745;
}

.dtf-toast.error {
    border-left: 4px solid #dc3545;
}

.dtf-toast.warning {
    border-left: 4px solid #ffc107;
}

.dtf-toast.info {
    border-left: 4px solid #17a2b8;
}

/* Estilos para elementos de navegación */
.dtf-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.dtf-nav-item {
    margin: 0;
}

.dtf-nav-link {
    color: #6c757d;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dtf-nav-link:hover,
.dtf-nav-link.active {
    color: #007cba;
    background: #f0f7ff;
}

/* Estilos para breadcrumbs */
.dtf-breadcrumb {
    display: flex;
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    gap: 10px;
    font-size: 14px;
}

.dtf-breadcrumb-item {
    color: #6c757d;
}

.dtf-breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin-left: 10px;
    color: #dee2e6;
}

.dtf-breadcrumb-item.active {
    color: #1d2327;
    font-weight: 600;
}

/* Estilos para paginación */
.dtf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.dtf-page-link {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    color: #007cba;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.dtf-page-link:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.dtf-page-link.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.dtf-page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background: #f8f9fa;
}

/* Estilos para tablas */
.dtf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.dtf-table th,
.dtf-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.dtf-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1d2327;
}

.dtf-table tr:hover {
    background: #f8f9fa;
}

/* Estilos para cards */
.dtf-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dtf-card-header {
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.dtf-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.dtf-card-body {
    color: #495057;
    line-height: 1.6;
}

.dtf-card-footer {
    border-top: 1px solid #e1e5e9;
    padding-top: 15px;
    margin-top: 20px;
    text-align: right;
}

/* Estilos para badges generales */
.dtf-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-align: center;
}

/* Estilos para badges específicos del formulario DTF */
.dtf-file-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
    border: 1px solid #bbdefb;
    white-space: nowrap;
    margin: 2px;
}

.dtf-file-badge .badge-icon {
    margin-right: 4px;
    font-size: 0.9em;
}

/* ✅ BADGE PRECIO POR COPIA - COLOR VERDE AZULADO */
.dtf-file-badge.dtf-file-price-per-copy-badge {
    background: #e0f2f1;
    color: #00695c;
    border-color: #b2dfdb;
}

/* ✅ BADGE METROS TOTALES INDIVIDUALES - COLOR NARANJA */
.dtf-file-badge.dtf-file-total-meters-badge {
    background: #fff8e1;
    color: #e65100;
    border-color: #ffcc80;
}

/* Estados de las badges */
.dtf-file-badge.analyzing {
    opacity: 0.7;
    animation: dtf-pulse 2s infinite;
}

.dtf-file-badge.analyzed {
    opacity: 1;
    animation: none;
}

/* Animación de pulso para badges en análisis */
@keyframes dtf-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.dtf-badge.primary {
    background: #007cba;
    color: white;
}

.dtf-badge.secondary {
    background: #6c757d;
    color: white;
}

.dtf-badge.success {
    background: #28a745;
    color: white;
}

.dtf-badge.danger {
    background: #dc3545;
    color: white;
}

.dtf-badge.warning {
    background: #ffc107;
    color: #212529;
}

.dtf-badge.info {
    background: #17a2b8;
    color: white;
}

/* Estilos para alertas */
.dtf-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid transparent;
}

.dtf-alert.primary {
    background: #cce7ff;
    color: #004085;
    border-color: #b8daff;
}

.dtf-alert.secondary {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

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

.dtf-alert.danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

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

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

/* Estilos para spinners */
.dtf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: dtf-spin 1s linear infinite;
}

.dtf-spinner.small {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

.dtf-spinner.large {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Estilos para progress bars */
.dtf-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.dtf-progress-bar {
    height: 100%;
    background: #007cba;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dtf-progress-bar.success {
    background: #28a745;
}

.dtf-progress-bar.warning {
    background: #ffc107;
}

.dtf-progress-bar.danger {
    background: #dc3545;
}

/* Estilos para tooltips avanzados */
.dtf-tooltip-advanced {
    position: relative;
    display: inline-block;
}

.dtf-tooltip-advanced .dtf-tooltip-content {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: white;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dtf-tooltip-advanced .dtf-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.dtf-tooltip-advanced:hover .dtf-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Estilos para elementos de interfaz responsivos */
@media (max-width: 768px) {
    .dtf-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .dtf-table {
        font-size: 14px;
    }
    
    .dtf-table th,
    .dtf-table td {
        padding: 8px;
    }
    
    .dtf-card {
        padding: 15px;
    }
    
    .dtf-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .dtf-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .dtf-toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .dtf-button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .dtf-form-input {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .dtf-card {
        padding: 12px;
    }
    
    .dtf-breadcrumb {
        font-size: 12px;
        gap: 8px;
    }
} 