﻿ 
/* ============================================================
   OLI GRID — GLOBAL FONT CONTROL
============================================================ */
.oli-grid,
.oli-grid * {
    font-family: "Poppins", sans-serif;
}
 
    /* ------------------------------------------------------------
   FONT AWESOME FIX
------------------------------------------------------------ */
    .oli-grid i,
    .oli-grid .fa,
    .oli-grid .fas,
    .oli-grid .far,
    .oli-grid .fal,
    .oli-grid .fab {
        font-family: "Font Awesome 6 Free" !important;
    }

    .oli-grid .fab {
        font-family: "Font Awesome 6 Brands" !important;
    }

    /* ------------------------------------------------------------
   RESTORE SYNCFUSION ICON FONT
------------------------------------------------------------ */
    .oli-grid .e-icons,
    .oli-grid .e-sortfilterdiv,
    .oli-grid .e-icon-ascending,
    .oli-grid .e-icon-descending,
    .oli-grid .e-columnmenu,
    .oli-grid .e-filter-icon,
    .oli-grid .e-ungroupbutton,
    .oli-grid .e-rowdragicon,
    .oli-grid .e-editing-icons {
        font-family: "e-icons" !important;
        padding: 0 15px !important;
    }

    /* ============================================================
   HEADER — ALIGNMENT & COLORS
============================================================ */
    .oli-grid .e-headercell {
        background-color: #32893b !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 10px 12px !important;
        vertical-align: middle !important;
        border-right: 1px solid #2e7a33 !important;
    }

    .oli-grid .e-headercelldiv {
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 14px !important;
    }

    .oli-grid .e-sortfilterdiv,
    .oli-grid .e-icon-ascending,
    .oli-grid .e-icon-descending,
    .oli-grid .e-filter-icon {
        color: #ffffff !important;
        opacity: 1 !important;
        display: flex !important;
        align-items: flex-end !important;
    }

    .oli-grid .e-headercell:hover {
        background-color: #2f7d37 !important;
    }

    /* Center last column header */
    .oli-grid .e-headercell:last-child .e-headercelldiv {
        justify-content: center !important;
        text-align: center !important;
    }

    /* ============================================================
   ROW STYLE
============================================================ */
    .oli-grid .e-rowcell {
        padding: 10px 12px !important;
        border-color: #e9e9e9 !important;
        vertical-align: middle !important;
    }

        .oli-grid .e-rowcell:hover {
            background-color: #eef8ea !important;
            color: #32893b !important;
        }

    /* ============================================================
   GROUP PANEL
============================================================ */
    .oli-grid .e-groupdroparea {
        background: #f4fff6 !important;
        border: 2px dashed #85bc4d !important;
        color: #32893b !important;
        font-weight: 500 !important;
        padding: 12px !important;
    }

/* ============================================================
   ACTION BUTTONS
============================================================ */
.action-btn {
    border: none;
    padding: 4px 12px;
    margin: 0 5px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.btn-view {
    background: #32893b;
    color: #fff;
}

.btn-edit {
    background: #85bc4d;
    color: #fff;
}

.btn-delete {
    background: #e74c3c;
    color: #fff;
}

.action-btn:hover {
    opacity: 0.88;
}

/* ============================================================
   PAGER
============================================================ */
.oli-grid .e-pager {
    background: #ffffff !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 14px !important;
}

    .oli-grid .e-pager .e-numericitem.e-active {
        background: #32893b !important;
        border-color: #32893b !important;
        color: #ffffff !important;
        border-radius: 6px;
    }

    .oli-grid .e-pager .e-numericitem:hover {
        background: #85bc4d !important;
        color: #fff !important;
    }

/* ============================================================
   TOOLBAR
============================================================ */
.oli-grid .e-toolbar {
    background: #f6fff9 !important;
    border-bottom: 1px solid #ddeedd !important;
    padding: 15px !important;
}

    .oli-grid .e-toolbar .e-btn {
        border-radius: 6px !important;
    }

        .oli-grid .e-toolbar .e-btn:hover {
            background-color: #e9f7ea !important;
        }

.oli-grid .e-input-group input {
    border-radius: 6px !important;
}

/* Allow toolbar wrap */
.e-toolbar.e-control.e-toolbar.e-lib {
    display: flex !important;
    flex-wrap: wrap !important;
    row-gap: 6px !important;
}

.e-toolbar-items {
    flex-wrap: wrap !important;
    width: 100% !important;
}

.e-toolbar-item {
    flex: 0 0 auto !important;
}

/* ============================================================
   CHECKBOX — FEATHER ICON STYLE
============================================================ */
.e-checkbox-wrapper .e-frame::after {
    display: none !important;
}

.e-checkbox-wrapper .e-frame {
    background-color: #32893b !important;
    border-color: #32893b !important;
    position: relative !important;
}

    /* Checked */
    .e-checkbox-wrapper .e-frame.e-check::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 12px;
        height: 12px;
        transform: translate(-50%, -50%);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 12px;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    }

    /* Indeterminate */
    .e-checkbox-wrapper .e-frame.e-stop::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 12px;
        height: 12px;
        transform: translate(-50%, -50%);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 13px;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'><line x1='5' y1='12' x2='19' y2='12'/></svg>");
    }

/* ============================================================
   CONTEXT MENU
============================================================ */
.oli-grid .e-contextmenu {
    font-family: "Poppins", sans-serif !important;
}

.oli-grid .cm-fake {
    color: orangered !important;
    font-weight: 600;
}

    .oli-grid .cm-fake:hover {
        background: #f9e6e6 !important;
    }

/* ============================================================
   EMPTY STATE
============================================================ */
.oli-empty-state {
    padding: 60px 20px;
    text-align: center;
    font-family: "Poppins", sans-serif;
    opacity: 0.95;
}

.oli-empty-icon {
    font-size: 60px;
    color: #32893b;
    margin-bottom: 15px;
    opacity: 0.85;
}

.oli-empty-title {
    font-size: 22px;
    font-weight: 600;
    color: #32893b;
    margin-bottom: 6px;
}

.oli-empty-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.oli-empty-btn {
    background-color: #32893b !important;
    border-color: #32893b !important;
    color: white !important;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    transition: 0.2s ease;
}

    .oli-empty-btn:hover {
        background-color: #276f30 !important;
        border-color: #276f30 !important;
    }


/* ============================================================
   FIX: SYNCFUSION CONTEXT MENU FONT (Poppins)
============================================================ */

/* Root context menu */
.e-contextmenu,
.e-contextmenu * {
    font-family: "Poppins", sans-serif !important;
}

    /* Menu items */
    .e-contextmenu .e-menu-item {
        font-size: 14px;
        font-weight: 500;
    }

        /* Hover state */
        .e-contextmenu .e-menu-item:hover {
            background-color: #f4f4f4;
        }

        /* Disabled items */
        .e-contextmenu .e-menu-item.e-disabled {
            opacity: 0.6;
        }

    /* Icons inside menu (keep Syncfusion icons intact) */
    .e-contextmenu .e-icons {
        font-family: "e-icons" !important;
    }
