/* css/extraer-columnas.css */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --secondary-gradient: linear-gradient(135deg, #64748b, #475569);
    --success-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Botón de volver */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    padding: 0 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: var(--hover-shadow);
}

.back-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* Contenedor principal */
.tool-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.5s ease-out;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.tool-header h1 {
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-header i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-description {
    color: #64748b;
    font-size: 1.1rem;
}

/* Secciones principales */
.main-content {
    display: grid;
    gap: 2rem;
}

.input-section,
.output-section,
.controls-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

/* Grupo de separadores */
.delimiter-group,
.columns-group,
.options-group {
    margin-bottom: 1.5rem;
}

.delimiter-group h3,
.columns-group h3,
.options-group h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.radio-option:hover {
    background: #f1f5f9;
}

.radio-option input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #2563eb;
    border-radius: 50%;
    cursor: pointer;
}

.radio-option span {
    color: #1e293b;
    font-size: 1rem;
}

/* Campo de separador personalizado */
#customDelimiter {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

#customDelimiter:focus {
    border-color: #2563eb;
    outline: none;
}

/* Campo de columnas */
.columns-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#columnsInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fafc;
}

#columnsInput:focus {
    border-color: #2563eb;
    outline: none;
    background: white;
}

/* Tooltip de ayuda */
.columns-help {
    position: relative;
    color: #2563eb;
    cursor: help;
}

.columns-help .tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 250px;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    font-size: 0.9rem;
    color: #1e293b;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.columns-help:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(-8px);
}

/* Opciones */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-option:hover {
    background: #f1f5f9;
}

.checkbox-option input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #2563eb;
    border-radius: 4px;
    cursor: pointer;
}

.checkbox-option span {
    color: #1e293b;
    font-size: 1rem;
}

/* Textareas */
textarea {
    width: 100%;
    height: 200px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    resize: vertical;
    background: #f8fafc;
    font-family: monospace;
}

textarea:focus {
    border-color: #2563eb;
    outline: none;
    background: white;
}

textarea::placeholder {
    color: #94a3b8;
}

/* Encabezados de sección */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header label {
    color: #1e40af;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.line-count,
.extracted-count,
.remaining-count {
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

.output-stats {
    display: flex;
    gap: 1rem;
}

/* Botones */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.primary {
    background: var(--primary-gradient);
    color: white;
}

.btn.secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn.success {
    background: var(--success-gradient);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* Sección de información */
.info-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.info-section h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-card {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: white;
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.info-card h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Notificaciones */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
    box-shadow: var(--card-shadow);
    z-index: 1000;
}

/* Animaciones */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tool-container {
        margin: 1rem;
        padding: 1rem;
    }

    .radio-group,
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .output-stats {
        width: 100%;
        justify-content: space-between;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .back-button-container {
        padding: 0 1rem;
    }
    
    .back-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .columns-input {
        flex-direction: column;
        align-items: stretch;
    }

    .columns-help .tooltip {
        width: 200px;
        right: -100px;
    }
}