/**
 * Kian AI - Estilos del Modal de Configuraciones
 * Estilos específicos para la tabla de API keys y badges
 */

/* Modal más ancho para tabla */
.modal-large {
    max-width: 900px;
    width: 90%;
}

/* Secciones del modal */
.settings-section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

/* === Responsive Form Layout (Mobile/Small Screens) === */
@media (max-width: 600px) {
    .settings-section .form-group>div {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-section .form-input {
        width: 100% !important;
        /* Override inline styles */
        flex: 0 0 auto !important;
        /* Reset flex behavior so height doesn't collapse */
        margin-bottom: 10px;
    }

    .settings-section .btn {
        width: 100%;
        margin-top: 4px;
    }

    .modal-large {
        width: 95%;
        margin: 10px;
    }
}

.section-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Tabla de API Keys */
.api-keys-table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.api-keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.api-keys-table thead {
    background: var(--bg-secondary);
}

.api-keys-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.api-keys-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.api-keys-table tbody tr:last-child td {
    border-bottom: none;
}

.api-keys-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-badge.status-active {
    background: hsla(140, 70%, 50%, 0.15);
    color: hsl(140, 70%, 50%);
}

.status-badge.status-inactive {
    background: hsla(0, 70%, 50%, 0.15);
    color: hsl(0, 70%, 50%);
}

/* Stats Badges */
.stats-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.stat-badge.stat-success {
    background: hsla(140, 70%, 50%, 0.1);
    color: hsl(140, 70%, 50%);
    border-color: hsla(140, 70%, 50%, 0.3);
}

/* Botón pequeño para acciones en tabla */
.btn-icon-small {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon-small svg {
    width: 16px;
    height: 16px;
}

/* Mejoras a botones del modal */
.modal-footer .btn {
    min-width: 100px;
    font-weight: 500;
}

.btn-primary {
    background: var(--lime-green);
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: hsl(100, 80%, 45%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(100, 80%, 50%, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}