/* ==============================================
   ConAdmin Chile - Additional Styles
   Estilos Adicionales y Overrides
   ============================================== */

/* ==============================================
   NOTIFICATION CONTAINER
   ============================================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background-color: var(--neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition-normal);
    position: relative;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.notification-success .notification-icon {
    background-color: var(--success);
}

.notification-info .notification-icon {
    background-color: var(--primary-500);
}

.notification-warning .notification-icon {
    background-color: var(--warning);
    color: var(--neutral-900);
}

.notification-error .notification-icon {
    background-color: var(--error);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--neutral-900);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    color: var(--neutral-700);
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.notification-close:hover {
    background-color: var(--neutral-200);
    color: var(--neutral-600);
}

/* ==============================================
   CHART STYLES
   ============================================== */

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-height: 100%;
    max-width: 100%;
}

/* Fallback chart styles are already included in charts.js */

/* ==============================================
   LOADING STATES
   ============================================== */

.loading-skeleton {
    background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* ==============================================
   EMPTY STATES
   ============================================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-xxxl);
    color: var(--neutral-500);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-lg);
    color: var(--neutral-400);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: var(--spacing-sm);
}

.empty-state-message {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ==============================================
   TOOLTIPS
   ============================================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    visibility: hidden;
    background-color: var(--neutral-900);
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--neutral-900) transparent transparent transparent;
}

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

/* ==============================================
   PROGRESS BARS
   ============================================== */

.progress {
    width: 100%;
    height: 8px;
    background-color: var(--neutral-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-500);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar.success {
    background-color: var(--success);
}

.progress-bar.warning {
    background-color: var(--warning);
}

.progress-bar.error {
    background-color: var(--error);
}

/* ==============================================
   TAGS AND BADGES
   ============================================== */

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    padding: 4px var(--spacing-xs);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    background-color: var(--neutral-200);
    color: var(--neutral-700);
    border: 1px solid transparent;
    cursor: default;
    transition: var(--transition-fast);
}

.tag.clickable {
    cursor: pointer;
}

.tag.clickable:hover {
    background-color: var(--primary-100);
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.tag.active {
    background-color: var(--primary-500);
    color: white;
}

/* ==============================================
   SEARCH AND FILTERS
   ============================================== */

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container .input {
    padding-left: calc(var(--spacing-xl) + var(--spacing-sm));
}

.search-icon {
    position: absolute;
    left: var(--spacing-sm);
    color: var(--neutral-500);
    width: 20px;
    height: 20px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

.filter-tag .remove {
    background: none;
    border: none;
    color: var(--primary-700);
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.filter-tag .remove:hover {
    background-color: var(--primary-200);
}

/* ==============================================
   FORM ENHANCEMENTS
   ============================================== */

.form-section {
    margin-bottom: var(--spacing-xl);
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--neutral-200);
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-md);
}

.form-help {
    font-size: 12px;
    color: var(--neutral-500);
    margin-top: var(--spacing-xs);
}

.form-error {
    font-size: 12px;
    color: var(--error);
    margin-top: var(--spacing-xs);
}

.form-success {
    font-size: 12px;
    color: var(--success);
    margin-top: var(--spacing-xs);
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group .input {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
}

.input-group-addon {
    padding: 12px var(--spacing-md);
    background-color: var(--neutral-200);
    border: 1px solid var(--neutral-300);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--neutral-700);
    font-size: 14px;
    white-space: nowrap;
}

.input-group .input:focus + .input-group-addon {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* ==============================================
   ANIMATIONS AND TRANSITIONS
   ============================================== */

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.3s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

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

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

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ==============================================
   PRINT STYLES
   ============================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
    
    .print-avoid-break {
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .btn {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
    }
}