/* ==========================================================================
   RINO Utilities - Custom CSS classes to replace inline styles
   ========================================================================== */

/* ---------- Status Colors (Charts Dashboard) - Pastel Semaphore ---------- */
.text-status-ok {
    color: #4caf50;
}

.text-status-warning {
    color: #ff9800;
}

.text-status-danger {
    color: #ef5350;
}

.border-status-ok {
    border-color: #81c784 !important;
}

.border-status-warning {
    border-color: #ffb74d !important;
}

.border-status-danger {
    border-color: #e57373 !important;
}

/* Status card backgrounds */
.card.border-status-ok {
    background: linear-gradient(135deg, rgba(129,199,132,0.08) 0%, rgba(255,255,255,1) 100%);
}
.card.border-status-warning {
    background: linear-gradient(135deg, rgba(255,183,77,0.08) 0%, rgba(255,255,255,1) 100%);
}
.card.border-status-danger {
    background: linear-gradient(135deg, rgba(229,115,115,0.08) 0%, rgba(255,255,255,1) 100%);
}

/* ---------- Chart containers ---------- */
.chart-container {
    width: 100%;
    min-height: 280px;
}

.chart-container-lg {
    width: 100%;
    min-height: 380px;
}

/* ---------- Status counters ---------- */
.status-count {
    font-size: 2rem;
    font-weight: 700;
}

/* ---------- Card interactions ---------- */
.selected-card {
    border-width: 3px !important;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* ---------- Landing page header ---------- */
.rino-header-bg {
    background-color: #044cbc;
}

/* ---------- Logo sizing ---------- */
.logo-sm {
    max-width: 7rem;
}

.logo-company {
    height: 6rem;
    object-fit: contain;
}

.logo-company-lg {
    height: 7rem;
    object-fit: contain;
}

/* ---------- Banner cards ---------- */
.banner-overlay {
    border-radius: 0.35rem;
    background-size: cover;
    background-position: center center;
}

/* ---------- Smooth transitions ---------- */
.card.lift {
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* ---------- Loading overlay (unified) ---------- */
#loading {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.7;
    background-color: #fff;
    z-index: 99;
}

#loading-image {
    z-index: 100;
}

/* ---------- Chat Widget (parametrized colors) ---------- */
#chat-circle {
    background: var(--primary, #003a70) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 30px color-mix(in srgb, var(--primary, #003a70) 20%, transparent);
}

.chat-box-header {
    background: linear-gradient(135deg, var(--primary, #003a70), var(--secondary, #6900c7)) !important;
}

.chat-submit {
    color: var(--primary, #003a70) !important;
}

.chat-submit:hover {
    color: var(--secondary, #6900c7) !important;
}

#chat-circle:hover {
    transform: scale(1.08);
    transition: transform 0.2s ease;
}

/* ---------- Bootstrap-select: match form-control styling ---------- */
.bootstrap-select > .dropdown-toggle.btn-light {
    background-color: #fff;
    border: 1px solid #ced4da;
    font-weight: 400;
    color: #495057;
    font-size: 0.85rem;
}
.bootstrap-select > .dropdown-toggle.btn-light:focus,
.bootstrap-select > .dropdown-toggle.btn-light:active {
    background-color: #fff;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
.bootstrap-select .filter-option-inner-inner {
    font-weight: 400;
}

/* ---------- DataTables select fix (número no se superpone con flechas) ---------- */
.dataTables_length select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 0.5rem center/8px 10px no-repeat;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    min-width: 60px;
}

.dataTables_length label {
    font-size: 0.85rem;
}

/* ---------- Bootstrap-fileinput zoom/preview icons ---------- */
.file-zoom-dialog .kv-zoom-actions .btn-kv {
    color: #495057;
}
.file-zoom-dialog .kv-zoom-actions .btn-kv:hover {
    color: #212529;
}
.krajee-default .file-actions .btn-kv,
.krajee-default .file-footer-buttons .btn-kv {
    color: #495057;
}
.krajee-default .file-actions .btn-kv:hover,
.krajee-default .file-footer-buttons .btn-kv:hover {
    color: #212529;
}

/* ---------- Focus visible styles (a11y) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary, #003a70);
    outline-offset: 2px;
}

/* ---------- Skip to content (a11y) ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary, #003a70);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

#main-content:focus {
    outline: none;
}

/* ---------- Reduced motion (WCAG 2.3.1) ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
