/**
 * Sistema de Soporte - Estilos Personalizados
 * Bootstrap 5 + Custom CSS
 */

/* ============================================
   FONT IMPORTS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

:root {
    --admin-green: #00A85E;
    --admin-orange: #CD6A15;
    --admin-blue: #0066cc;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   APLICACIÓN DE FUENTE GLOBAL
   Para cambiar la fuente, modifica SOLO la línea siguiente:
   var(--font-current)   → DM Sans (actual)
   var(--font-option-1)  → Outfit (geométrica)
   var(--font-option-2)  → Plus Jakarta Sans (humanista)
   var(--font-option-3)  → Manrope (grotesca moderna)
   var(--font-option-4)  → Bricolage Grotesque (única)
   ============================================ */
* {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

body {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    background-color: var(--bg-color) !important;
}

@view-transition {
    navigation: auto;
}
/* ============================================
   NAVIGATION BAR
   ============================================ */
.top-navbar {
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu a {
    color: #00A85E;
    text-decoration: none;
    padding: 6px 12px;  
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 14px;
    outline: 1px solid #00A85E;
    border-radius: 8px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-menu a:hover {
    transform: translateY(-1px);
    background-color: #00A85E;
    color: #fff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding-left: 10px;
    color: #333;
}

.btn-logout {
    border: none;
    padding: 6px 14px !important;
    border-radius: 8px;
    font-size: 14px;
    background-color: #CD6A15 !important;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    outline: 1px solid #CD6A15;
}



.btn-logout:hover {
    transform: translateY(-1px);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #E6F7F0 0%, #CCF0E1 100%);
    border: 2px solid var(--admin-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon i {
    font-size: 28px;
    color: var(--admin-green);
}

.header-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
}

.list-group {
    gap: 8px;
}

.list-group-item {
    background-color: transparent;
    font-size: 14px;
    border: 0;
    padding: 0;
}

.list-group-item a {
    color: #fff;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px !important;
    font-weight: 400;
    transition: all 0.3s ease;
}

.list-group-item a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.list-group-item .active {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.count {
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 8px;
}


/* ============================================
   ATTACHMENTS
   ============================================ */
.attachment-item,
.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-right: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    border: 1px solid #dee2e6;
    max-width: 175px;
    transition: all 0.2s ease;
}

.attachment-item:hover,
.attachment-link:hover {
    background: #e9ecef;
    border: 1px solid #adb5bd;
}

/* Fix para text-truncate dentro de attachment links */
.attachment-link .text-truncate {
    display: inline-block;
    max-width: 100px; /* Ajusta según el espacio disponible */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.attachment-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   SELECT2 CUSTOM STYLES - Refined Professional
   ============================================ */

/* Container & Selection Box */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.select2-container--bootstrap-5 .select2-selection:hover {
    border-color: #00A85E !important;
    box-shadow: 0 2px 4px rgba(0, 168, 94, 0.08) !important;
}

/* Focus State - Refined Green Accent */
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #00A85E !important;
    box-shadow: 0 0 0 3px rgba(0, 168, 94, 0.12),
                0 2px 4px rgba(0, 0, 0, 0.06) !important;
    outline: none;
}

/* Selected Value Text */
.select2-container--bootstrap-5 .select2-selection__rendered {
    color: #212529;
    padding-left: 12px;
    padding-right: 12px;
    line-height: 36px;
}

.select2-container--bootstrap-5 .select2-selection__placeholder {
    color: #6c757d;
    font-weight: 400;
}

/* Arrow Indicator */
.select2-container--bootstrap-5 .select2-selection__arrow {
    height: 36px;
    width: 36px;
    right: 4px;
}

.select2-container--bootstrap-5 .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent;
    border-width: 5px 4px 0 4px;
    margin-left: -4px;
    margin-top: -2px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection__arrow b {
    transform: rotate(180deg);
    border-color: #00A85E transparent transparent transparent;
}

/* Dropdown Container */
.select2-dropdown {
    border: 1.5px solid #dee2e6 !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1),
                0 2px 4px rgba(0, 0, 0, 0.06) !important;
    margin-top: 4px;
    animation: selectDropdownSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results List */
.select2-results {
    background-color: #ffffff;
}

.select2-results__options {
    max-height: 240px;
    padding: 4px;
}

/* Individual Options */
.select2-results__option {
    font-size: 14px !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
    margin-bottom: 2px;
    transition: all 0.15s ease;
    cursor: pointer;
    font-weight: 400;
}

/* Hover State */
.select2-results__option--selectable:hover {
    background-color: rgba(0, 168, 94, 0.08) !important;
    color: #212529 !important;
}

/* Highlighted State (keyboard navigation) */
.select2-results__option--highlighted {
    background-color: rgba(0, 168, 94, 0.12) !important;
    color: #212529 !important;
}

/* Selected State */
.select2-results__option--selected {
    background-color: #00A85E !important;
    color: #ffffff !important;
    font-weight: 600;
}

.select2-results__option--selected:hover {
    background-color: #008f50 !important;
}

/* Disabled State */
.select2-results__option--disabled {
    color: #adb5bd !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
    opacity: 0.6;
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection__rendered {
    color: #6c757d;
}

/* Multi-Select Styles */
.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: 38px;
    padding: 4px 8px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    line-height: normal;
}

/* Multi-Select Chosen Items (Tags) */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #00A85E !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    transition: all 0.15s ease;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice:hover {
    background-color: #008f50 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 168, 94, 0.2);
}

/* Remove Button in Multi-Select */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700;
    margin-right: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    opacity: 0.8;
    transition: opacity 0.15s ease;
    order: 2;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
    background: transparent !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
    order: 1;
}

/* Search Input (when enabled) */
.select2-search--dropdown {
    padding: 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #00A85E;
    box-shadow: 0 0 0 3px rgba(0, 168, 94, 0.12);
}

/* No Results Message */
.select2-results__option.select2-results__message {
    color: #6c757d;
    text-align: center;
    font-style: italic;
    padding: 16px !important;
}

/* Loading State */
.select2-results__option.loading-results {
    text-align: center;
    color: #6c757d;
}

/* Clear Selection Button */
.select2-container--bootstrap-5 .select2-selection__clear {
    color: #6c757d;
    font-size: 18px;
    font-weight: 700;
    margin-right: 8px;
    transition: color 0.15s ease;
    cursor: pointer;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: #CD6A15;
}

/* Scrollbar Styling for Dropdown */
.select2-results__options::-webkit-scrollbar {
    width: 6px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Firefox Scrollbar */
.select2-results__options {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* ============================================
   FLASH MESSAGES / NOTIFICATIONS
   ============================================ */

/* Estilos generales para flash messages */
.flash-message {
    top: 55px;
    margin: 10px;
    box-shadow: 0px 4px 4px rgba(0,0,0,0.1);
    animation: slideInRight 0.3s ease-out;
    border-radius: 8px;
}

.flash-message.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Success */
.alert-success.flash-message {
    background-color: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-success.flash-message i {
    color: var(--success-color);
}

/* Error */
.alert-danger.flash-message {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger-color);
}

.alert-danger.flash-message i {
    color: var(--danger-color);
}

/* Warning */
.alert-warning.flash-message {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

.alert-warning.flash-message i {
    color: var(--warning-color);
}

/* Info */
.alert-info.flash-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

.alert-info.flash-message i {
    color: var(--info-color);
}

/* Primary/Default */
.alert-primary.flash-message {
    background-color: #cfe2ff;
    color: #084298;
    border-left-color: var(--primary-color);
}

.alert-primary.flash-message i {
    color: var(--primary-color);
}

/* Animaciones */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Sidebar scrollbars with border-radius integration */
.sidebar-scroll {
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.3);
    border-radius: 8px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.5);
}

/* For Firefox */
.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 150, 150, 0.3) transparent;
}

/* Comments scrollbars with border-radius integration */
.comments-scroll {
    border-radius: 8px;
}

.comments-scroll::-webkit-scrollbar {
    width: 6px;
}

.comments-scroll::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 8px;
}

.comments-scroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.3);
    border-radius: 8px;
}

.comments-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.5);
}

/* For Firefox */
.comments-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 150, 150, 0.3) var(--bg-color);
}

/* Table scrollbars with border-radius integration */
.table-scroll {
    border-radius: 8px;
    background-color: #fff;
    overflow: auto;
}

.table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 8px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.3);
    border-radius: 8px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.5);
}

/* For Firefox */
.table-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 150, 150, 0.3) var(--bg-color);
}

/* ============================================
   MARQUEE TEXT ANIMATION
   ============================================ */
.marquee-container {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    animation-play-state: paused;
}

.marquee-container:hover .marquee-text {
    animation-play-state: running;
}

@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(calc(-100% - 20px));
    }
}

/* Variante que reinicia la animación */
.marquee-text.marquee-active {
    animation-play-state: running;
}

/* ============================================
   EMAIL RECIPIENTS TAGS (TagInput Component)
   ============================================ */
#email-recipients-section {
    background-color: #f8f9fa;
}

/* Dropdown items styling */
.dropdown-item {
    font-size: 14px;
    padding: 8px 12px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
    font-size: 16px;
}