/**
 * Skysset Theme CSS
 *
 * This file contains the custom theme styles for the Skysset platform.
 * It's intended to override or extend the base styles provided by Bootstrap 3.4.1
 * and other legacy CSS files.
 *
 * The main goals of this file are:
 * 1. Centralize custom styles for easier maintenance.
 * 2. Standardize UI components, starting with buttons.
 * 3. Gradually reduce the dependency on scattered CSS rules in other files.
 *
 * Guideline:
 * - Load this file AFTER the main Bootstrap CSS.
 * - Prefer overriding existing Bootstrap classes (.btn-primary, .btn-success, etc.)
 *   to maintain semantic HTML and avoid adding extra classes.
 *
 * Color Palette:
 * - Primary: #3A6EA5 (hover: #91B3FA, text/border: #0046A0)
 * - Danger: #EE1111 (hover: #DF5D50, text: #780909)
 * - Secondary: #F0F0F0
 * - Content highlight: #004E98
 * - Table titles: #1B264F
 */

/* ==========================================================================
   Buttons - Bootstrap 3.4.1 Compatible
   ========================================================================== */

/* Logout icon spacing */
#logoutLink i {
    margin-right: 8px;
}

/* PRIMARY BUTTON */
.btn-primary {
    background-color: #3A6EA5 !important;
    border-color: #3A6EA5 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
    background-color: #91B3FA !important;
    border-color: #0046A0 !important;
    color: #0046A0 !important;
    outline: none !important;
}

.btn-primary:focus {
    box-shadow: 0 0 0 2px rgba(58, 110, 165, 0.25) !important;
}

/* DANGER BUTTON */
.btn-danger {
    background-color: #EE1111 !important;
    border-color: #EE1111 !important;
    color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
    background-color: #DF5D50 !important;
    border-color: #780909 !important;
    color: #780909 !important;
    outline: none !important;
}

.btn-danger:focus {
    box-shadow: 0 0 0 2px rgba(238, 17, 17, 0.25) !important;
}

/* ==========================================================================
   SKYSSET FILTER FORMS - ESTRUCTURA ESTÁNDAR UNIVERSAL
   ========================================================================== */

/* Para sobreescribir el borde verde que aparece al validar un campo y viene de bootstrap3 nativo */
.has-success .form-control {
    border-color: #ccc !important;
}
.has-success .form-control:focus {
    border-color: #ccc !important;
    box-shadow: none !important;
}

.has-success .control-label {
    color: inherit !important;
}

/* Clase principal para todas las filas de filtros */
.skysset-filter-row {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Espaciado consistente para campos de filtro */
.skysset-filter-row .form-group {
    margin-bottom: 15px;
}

/* Alineación perfecta de etiquetas */
.skysset-filter-row .control-label {
    font-size: 12px;
    font-weight: 600;
    color: #0046A0 !important;
    margin-bottom: 5px;
    display: block;
}

/* Botones de filtro estandarizados */
.skysset-filter-row .btn {
    height: 34px; /* Altura estándar para alinear con inputs */
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Inputs y selects con altura consistente */
.skysset-filter-row .form-control {
    height: 34px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Select2 compatibility */
.skysset-filter-row .select2-container .select2-selection--single {
    height: 34px !important;
    line-height: 32px !important;
}

/* Tooltips para botones de filtro */
.skysset-filter-row [data-toggle="tooltip"] {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skysset-filter-row {
        padding: 10px 0;
    }
    
    .skysset-filter-row .form-group {
        margin-bottom: 10px;
    }
}

/* LEGACY SUPPORT - Mantener compatibilidad con clases anteriores */
/* Solo usar cuando la etiqueta fantasma no es viable técnicamente */
.filter-buttons-container {
    padding-top: 34px;
}

.filter-button {
    margin-top: 25px;
}

.form-group .filter-button {
    margin-top: 0;
}

.form-group-button {
    padding-top: 25px;
}

.filter-form-btn {
    margin-top: 25px;
}

.filter-form-btn-sm {
    margin-top: 20px;
}

/* Ajuste para estructuras especiales */
.form-group > .row .btn,
.form-group > .row a.btn {
    margin-top: 25px; /* Alinea con inputs cuando está en una fila dentro de form-group */
}

/* DEFAULT BUTTON */
.btn-default {
    background-color: #F0F0F0 !important;
    border-color: #F0F0F0 !important;
    color: #333 !important;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    background-color: #e0e0e0 !important;
    border-color: #ccc !important;
    color: #333 !important;
    outline: none !important;
}

.btn-default:focus {
    box-shadow: 0 0 0 2px rgba(204, 204, 204, 0.25) !important;
}

/* BUTTON CONSISTENCY FOR FILTERS */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    border-radius: 3px !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
    width: auto !important;
    max-width: 100% !important;
}

.btn-block {
    width: 100% !important;
    display: block !important;
}

/* Ajuste para btn-sm cuando está en contenedores pequeños */
.btn-sm.btn-block {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 480px) {
    .btn-sm {
        font-size: 11px !important;
        padding: 5px 10px !important;
    }
}

/* SUCCESS BUTTON */
.btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: #fff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
    background-color: #449d44;
    border-color: #398439;
    color: #fff;
    outline: none;
}

.btn-success:focus {
    box-shadow: 0 0 0 2px rgba(92, 184, 92, 0.25);
}

/* INFO BUTTON */
.btn-info {
    background-color: #5bc0de;
    border-color: #46b8da;
    color: #fff;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
    background-color: #31b0d5;
    border-color: #269abc;
    color: #fff;
    outline: none;
}

.btn-info:focus {
    box-shadow: 0 0 0 2px rgba(91, 192, 222, 0.25);
}

/* WARNING BUTTON */
.btn-warning {
    background-color: #f0ad4e;
    border-color: #eea236;
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
    background-color: #ec971f;
    border-color: #d58512;
    color: #fff;
    outline: none;
}

.btn-warning:focus {
    box-shadow: 0 0 0 2px rgba(240, 173, 78, 0.25);
}


/* ==========================================================================
   Empty State Images
   ========================================================================== */
.empty-state-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    padding-left: 50px;
}

/* ==========================================================================
   Mensaje de perfil no creado
   ========================================================================== */
.profile-not-created {
    color: #347bb8;
    font-weight: bold;
}

/* ==========================================================================
   Content and Typography Colors
   ========================================================================== */

/* Content highlight - for non-actionable content that needs emphasis */
.content-highlight {
    color: #004E98;
}

/* Table titles */
.table-title,
th.table-title {
    color: #1B264F;
    font-weight: 600;
}

/* Utility classes for brand colors */
.text-primary-brand {
    color: #3A6EA5 !important;
}

.text-content-highlight {
    color: #004E98 !important;
}

.text-table-title {
    color: #1B264F !important;
}

.bg-primary-brand {
    background-color: #3A6EA5 !important;
    color: #fff;
}

.bg-secondary-brand {
    background-color: #F0F0F0 !important;
    color: #333;
}

/* ==========================================================================
   Form Elements Alignment
   ========================================================================== */

/* For aligning form buttons with form fields */
.form-buttons-container {
    padding-top: 34px; /* Matches form field height with label */
}

/* For buttons that need vertical alignment with form fields */
.btn-aligned-with-fields {
    margin-top: 25px; /* Space for the hidden label */
}

/* ==========================================================================
   Component Cards (for icons, buttons, etc.)
   ========================================================================== */

.component-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-preview {
    padding: 15px;
    text-align: center;
    background-color: #f8f9fa;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-code {
    position: relative;
}

.card-code pre {
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.card-code .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.card-code .copy-btn:hover {
    opacity: 1;
}

.card-note {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #6c757d;
}

.card-note i {
    margin-right: 5px;
}

/* Legacy icon cards with warning styling */
.legacy-icon-card {
    border-left: 4px solid #dc3545;
}

.legacy-icon-card .card-note {
    background-color: #fff5f5;
    color: #dc3545;
    font-weight: bold;
}

.legacy-icon-card .card-note.replacement {
    background-color: #dff0d8;
    color: #3c763d;
    font-weight: bold;
    border-top: 1px solid #d6e9c6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legacy-icon-card .card-note.replacement code {
    background-color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
}

.card-note.replacement {
    color: #28a745;
    font-weight: bold;
}

/* ==========================================================================
   Button Size Consistency (Bootstrap 3 compatible)
   ========================================================================== */
/* Ensure consistent padding and sizing */

.btn {
    border-radius: 4px;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    user-select: none;
    transition: all 0.15s ease-in-out;
}

/* Button sizes - Bootstrap 3 compatible */
.btn-lg {
    padding: 10px 16px;
    font-size: 18px;
    line-height: 1.3333333;
    border-radius: 6px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.btn-xs {
    margin: 3px 3px;
    font-size: 10px;
    border-radius: 3px;
}

/* Clase para unificar el tamaño de botones con iconos */
.btn-size-fixed {
    min-width: 36px;  /* Ancho mínimo para todos los botones */
    height: 32px;     /* Altura fija para todos los botones */
    padding: 3px;     /* Padding reducido para centrarse en el icono */
}

/* Alineación vertical centrada para tablas */
.table td, .table th {
    vertical-align: middle !important;
}

/* Limitar ancho de celdas con texto largo */
.td-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

/* Asegurar que los iconos estén centrados */
.btn-size-fixed i {
    margin: 0 auto;
}

/* Ajuste específico para el botón de ellipsis que es más delgado */
.btn-size-fixed .fa-ellipsis-v {
    padding: 0 2px; /* Añadir un poco de padding horizontal al icono */
} 

/* ==========================================================================
   TABLES - Form Group Label 
   ========================================================================== */
.form-group .control-label { /* General, not window-notice specific */
    color: #0046A0 !important; /*  Antes: 004E98*/   
}