﻿/* ==========================================================================
   Tabulator + Font Awesome Icons
   License: Font Awesome Free (CC BY 4.0) + This CSS (MIT)
   Theme: Light Blue / Bootstrap-like
   ========================================================================== */

/* ---- Palette ---- */
:root {
    --t-primary: #1e88e5; /* blue 600 */
    --t-primary-dark: #1565c0;
    --t-success: #198754; /* green */
    --t-danger: #dc3545; /* red */
    --t-warning: #f59e0b; /* amber */
    --t-info: #0ea5e9; /* sky blue */
    --t-muted: #6b7280; /* gray */
    --t-hover-bg: rgba(30,136,229,0.08);
    --t-hover-scale: 1.08;
    --t-transition: 140ms ease;
}

/* ---- Base Icon ---- */
.t-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8em;
    height: 1.8em;
    font-size: 1.15rem;
    line-height: 1;
    vertical-align: middle;
    color: var(--t-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: transform var(--t-transition), color var(--t-transition), background-color var(--t-transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .t-icon:hover {
        transform: scale(var(--t-hover-scale));
        background-color: var(--t-hover-bg);
    }

    .t-icon:focus-visible {
        outline: 2px solid var(--t-primary);
        outline-offset: 2px;
    }

    /* Disabled icons */
    .t-disabled,
    .t-icon[aria-disabled="true"] {
        opacity: 0.5;
        pointer-events: none;
        cursor: not-allowed;
    }

/* ---- Size Helpers ---- */
.t-xs {
    font-size: 0.9rem;
}

.t-sm {
    font-size: 1.05rem;
}

.t-md {
    font-size: 1.25rem;
}

.t-lg {
    font-size: 1.5rem;
}

/* ---- Action Colors ---- */
.t-primary {
    color: var(--t-primary);
}

    .t-primary:hover {
        color: var(--t-primary-dark);
    }

.t-success {
    color: var(--t-success);
}

.t-danger {
    color: var(--t-danger);
}

.t-warning {
    color: var(--t-warning);
}

.t-info {
    color: var(--t-info);
}

/* ---- Semantic Classes ---- */
.ti-edit {
    color: var(--t-primary);
}

.ti-delete {
    color: var(--t-danger);
}

.ti-add {
    color: var(--t-success);
}

.ti-view {
    color: var(--t-info);
}

.ti-save {
    color: var(--t-success);
}

.ti-refresh {
    color: var(--t-primary);
}

.ti-download {
    color: var(--t-primary);
}

.ti-upload {
    color: var(--t-primary);
}

.ti-filter {
    color: var(--t-warning);
}

.ti-clear {
    color: var(--t-danger);
}

/* ---- Tooltip (optional helper) ---- */
.t-tip {
    position: fixed;
    z-index: 99999;
    padding: 6px 8px;
    background: rgba(17,24,39,0.92);
    color: #fff;
    font: 12px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 120ms ease, transform 120ms ease;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

    .t-tip.show {
        opacity: 1;
        transform: translateY(-2px);
    }

    .t-tip::after {
        content: "";
        position: absolute;
        left: 12px;
        bottom: -6px;
        border: 6px solid transparent;
        border-top-color: rgba(17,24,39,0.92);
    }

/* ---- Ripple (optional effect) ---- */
.t-ripple {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
    pointer-events: none;
}

    .t-ripple > span {
        position: absolute;
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: .25;
        background: currentColor;
        width: 12px;
        height: 12px;
        animation: t-ripple 420ms ease-out forwards;
    }

@keyframes t-ripple {
    to {
        transform: translate(-50%, -50%) scale(6);
        opacity: 0;
    }
}
