/* --- Select2 Fixes --- */
.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 25px;     /* vertically centers the text */
    padding-left: 10px;    /* aligns with Bootstrap inputs */
    color: #6c757d;
}

.select2-container--default .select2-selection--single {
    height: 36px;          /* match Bootstrap input height */
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin-top: -3px;      /* pull the box up slightly */
    margin-bottom: 0;      /* remove extra space below */
}

/* Make Select2 search box smaller */
.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 30px;   /* smaller height */
    font-size: 0.85rem; /* smaller text */
    padding: 2px 8px;
    border-radius: 0.25rem;
}

/* Make the search box container relative */
.select2-container--default .select2-search--dropdown {
    position: relative;
    padding-left: 24px; /* add space for icon */
}

/* Add the search icon inside the box */
.select2-container--default .select2-search--dropdown::before {
    content: "\f002"; /* FontAwesome search icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
}

/* Style the input smaller + align with icon */
.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 30px;
    font-size: 0.85rem;
    padding: 2px 8px;
    padding-left: 24px; /* so text doesn’t overlap the icon */
    border-radius: 0.25rem;
}

/* allow expansion — don't clip text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  white-space: nowrap !important;  /* no wrap, expand instead */
  overflow: visible !important;
}

/* dropdown options may still wrap */
.select2-results__option {
  white-space: normal !important;
  word-break: break-word;
}

/* Override Bootstrap grid restriction */
.col-md-2 .select2-container {
    width: auto !important;
    min-width: 150px;   /* starting width */
    max-width: 1000px;  /* prevent it from going offscreen */
}

/* Make KP and Sector font smaller */
#type + .select2-container .select2-selection__rendered,
#sector + .select2-container .select2-selection__rendered {
    font-size: 0.8rem;   /* smaller font */
    line-height: 1.2em;  /* tighter spacing */
}

#type + .select2-container .select2-results__option,
#sector + .select2-container .select2-results__option {
    font-size: 0.8rem;
}

/* Make dropdown options follow max width */
.select2-container .select2-dropdown {
    max-width: 350px !important; /* same cap as JS */
    white-space: normal !important;
    word-break: break-word;
}

 /* Hover gradient scale effect */
    .hover-gradient {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .hover-gradient:hover {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    }

    /* Compact button style */
    .program-btn {
        display: inline-block;
        font-size: 0.8rem;
        padding: 4px 12px;
        border-radius: 6px;
        margin-top: 8px;
        margin-right: 6px;
        color: #fff !important;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

    .program-btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

/* Hover gradient scale effect on Index */
    .hover-gradient {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .hover-gradient:hover {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    }

    /* Compact button style */
    .program-btn {
        display: inline-block;
        font-size: 0.8rem;
        padding: 4px 12px;
        border-radius: 6px;
        margin-top: 8px;
        margin-right: 6px;
        color: #fff !important;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
    }

    .program-btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }
/* Fix: Allow typing in Select2 */
.select2-container .select2-search--inline {
    display: inline !important;
    width: auto !important;
}
.select2-selection__choice {
    background-color: #5e72e4 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 2px 8px !important;
}

        

/* Hide Laravel pagination arrows */
nav[role="navigation"] svg {
    display: none !important;
}

/* Optional: make pagination smaller */
nav[role="navigation"] {
    font-size: 0.875rem;
}

.required::after {
        content: " *";
        color: #dc3545; /* Bootstrap danger red */
        font-weight: bold;
    }
/*.dislike-icon.disliked {
    color: #dc3545;
}
*/

.react-btn.active .reaction-icon {
    color: #0d6efd; /* Bootstrap primary blue */
}

.reaction-icon {
    transition: color 0.2s ease, transform 0.15s ease;
}

.react-btn.active .reaction-icon {
    transform: scale(1.15);
}

/*Article Cover image*/
.article-thumb-wrapper {
    height: 350px;
    overflow: hidden;
}

.article-thumb {
    width: 110%;
    height: 300px;
    object-fit: cover;
    object-position: 60% 40%;
    display: block;

    /* margin */
    margin: 10px 15px;   /* vertical horizontal */
}

/*------------------*/
/*Title Column*/

.title-wrap {
    max-width: 350px;        /* adjust as needed */
    white-space: normal;    /* allow wrapping */
    word-wrap: break-word;  /* legacy support */
    word-break: break-word; /* force break long words */
}

.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.title-wrap {
    max-width: 350px;
}

.title-link {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.author-wrap {
    max-width: 180px; /* adjust if needed */
}

.author-text {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

/* Remarks column */
.remarks-wrap {
    max-width: 120px; /* adjust as needed */
}
.remarks-text {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
}

/*---------------*/
/*Disclaimer text*/

.article-thumb-wrapper {
    overflow: hidden;
}

.kms-disclaimer-overlay {
    /*position: absolute;*/
    bottom: 2;
    left: 2;
    right: 2;
    /*background: rgba(0, 0, 0, 0.65);*/
    color: black;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.3;
}
/*Login disclaimer style*/
.disclaimer-text {
    font-family: 'Figtree', sans-serif !important;
    font-style: italic !important;
}

/*Dashboard Tab style gradient color*/

    /* Base tabs */
    #topTabs {
        border-bottom: 2px solid #e9ecef;
    }

    #topTabs .nav-link {
        border: none;
        margin-right: 8px;
        padding: 10px 18px;
        font-weight: 600;
        color: #6c757d;
        background: transparent;
        position: relative;
        transition: all .3s ease;
        border-radius: 10px 10px 0 0;
    }

    /* === ACTIVE TAB BASE === */
    #topTabs .nav-link.active {
        color: #fff !important;
        transform: translateY(-2px);
    }

    /* Underline glow */
    #topTabs .nav-link.active::after {
        content: "";
        position: absolute;
        left: 15%;
        right: 15%;
        bottom: -6px;
        height: 4px;
        border-radius: 20px;
        box-shadow: 0 0 12px currentColor;
    }

    /* === PER TAB GRADIENTS === */

    /* Liked */
    #liked-tab.active {
        background: linear-gradient(135deg, #ff4d6d, #ff758f);
        box-shadow: 0 8px 20px rgba(255, 77, 109, .35);
    }
    #liked-tab.active::after {
        background: #ff4d6d;
    }

    /* Downloaded */
    #downloaded-tab.active {
        background: linear-gradient(135deg, #0d6efd, #0dcaf0);
        box-shadow: 0 8px 20px rgba(13, 110, 253, .35);
    }
    #downloaded-tab.active::after {
        background: #0d6efd;
    }

    /* Commented */
    #commented-tab.active {
        background: linear-gradient(135deg, #198754, #20c997);
        box-shadow: 0 8px 20px rgba(25, 135, 84, .35);
    }
    #commented-tab.active::after {
        background: #198754;
    }

    /* Viewed */
  #viewed-tab.active {
    background: linear-gradient(135deg, #6f42c1, #a855f7);
    box-shadow: 0 8px 20px rgba(111, 66, 193, .35);
}
#viewed-tab.active::after {
    background: #6f42c1;
}

    /* Hover (inactive tabs) */
    #topTabs .nav-link:not(.active):hover {
        color: #000;
        background: rgba(0, 0, 0, 0.04);
        transform: translateY(-1px);
    }

    /* Remove default tab borders */
    #topTabs.nav-tabs {
        border-bottom: none;
    }

    #topTabs .nav-link {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* Remove focus/active border */
    #topTabs .nav-link:focus,
    #topTabs .nav-link:active {
        outline: none !important;
        box-shadow: none !important;
    }

   /* Button Loading effect*/

    button:disabled,
    a.disabled {
        opacity: 0.85;
        cursor: not-allowed;
    }

    .page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    }

    /* Modern circular loader */
    .loader-circle {
        width: 60px;
        height: 60px;
        border: 6px solid #e0e0e0;
        border-top: 6px solid #5e72e4; /* Argon primary */
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
}
    
    /*Saving effect style*/
    
    .page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    }

    .loader-circle {
        border: 6px solid #f3f3f3;
        border-top: 6px solid #007bff;
        border-radius: 50%;
        width: 60px;
        height: 60px;
        animation: spin 1s linear infinite;
        margin-bottom: 10px;
    }

    .loader-text {
        font-size: 1.2rem;
        font-weight: 500;
        color: #007bff;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /*Loading effect*/
    .select-loading {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='35' stroke='%23999' stroke-width='10' fill='none' stroke-dasharray='164' stroke-dashoffset='60'%3E%3CanimateTransform attributeName='transform' type='rotate' repeatCount='indefinite' dur='0.8s' values='0 50 50;360 50 50'/%3E%3C/circle%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 20px;
    }

/*Product Search*/
.custom-search-height {
    height: 42px;      /* adjust this */
    padding: 6px 10px; /* adjust spacing inside */
    font-size: 0.875rem;
}

/*Dropdown trigger hidden style*/
.filter-label {
    cursor: pointer;
    font-weight: 600;
    color: #0d6efd;
    display: inline-block;
    transition: 0.2s ease;
}

.filter-label:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.filter-label.active {
    color: #000;
}

/*SEARCH TAB DESIGN*/

/* ============================= */
/* SEMI-ROUNDED GRADIENT BUTTON TABS */
/* ============================= */

#filterTabs.nav-tabs {
    border-bottom: none !important; /* remove bottom line of tab container */
}

/* Base Tab */
#filterTabs .nav-link {
    position: relative;
    border: none !important;
    border-radius: 12px 12px 0 0;   /* semi-rounded top */
    color: #fff !important;
    font-weight: 500;
    margin-right: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: none !important;
    background-clip: padding-box; /* prevents unwanted inner borders */
}

/* Remove Bootstrap button borders for buttons specifically */
#filterTabs button.nav-link,
#filterTabs button.nav-link.active {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ASSORTED GRADIENT COLORS */
#filterTabs .nav-item:nth-child(1) .nav-link {
    background: linear-gradient(45deg, #5e72e4, #825ee4);
}
#filterTabs .nav-item:nth-child(2) .nav-link {
    background: linear-gradient(45deg, #11cdef, #1171ef);
}
#filterTabs .nav-item:nth-child(3) .nav-link {
    background: linear-gradient(45deg, #2dce89, #2dcecc);
}
#filterTabs .nav-item:nth-child(4) .nav-link {
    background: linear-gradient(45deg, #fb6340, #fbb140);
}
#filterTabs .nav-item:nth-child(5) .nav-link {
    background: linear-gradient(45deg, #f5365c, #f56036);
}
#filterTabs .nav-item:nth-child(6) .nav-link {
    background: linear-gradient(45deg, #172b4d, #1a174d);
}

/* Slight hover brighten */
#filterTabs .nav-link:hover {
    filter: brightness(1.1);
}

/* ========================= */
/* UNDERLINE EFFECT ONLY     */
/* ========================= */
#filterTabs .nav-link::after {
    content: "";
    position: absolute; 
    left: 15%;
    bottom: 0;       /* stick to bottom */
    width: 0%;
    height: 3px;
    background: #fff; /* underline color */
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Active underline */
#filterTabs .nav-link.active::after {
    width: 70%;
}

/*Table row color*/

/* Alternating row colors */
/*.table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.table tbody tr:nth-child(even) {
    background-color: #ffffff;
}*/
/* ============================= */
/* CUSTOM TABLE COLUMN DESIGN    */
/* ============================= */

/*.custom-table-head th {
    background: linear-gradient(90deg, #1f2d3d, #344767);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 10px;
    border: none;
}
*/
/* Remove default borders */
.table th,
.table td {
    border: none !important;
}

/* Add subtle bottom separator */
.table tbody tr {
    border-bottom: 1px solid #edf2f9;
}

/* Professional light header */
table.dataTable thead th {
    background: linear-gradient(87deg, #5e72e4 0, #825ee4 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
}

/* Make all table text white */
.table th{
    color: #fff !important;
}

/*image thumbnail*/

.a4-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.414; /* A4 portrait ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.a4-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop to fit */
}

/*FOR REMARKS WRAPPING*/

.remarks-wrap {
    max-width: 300px;
    white-space: normal;
    word-break: break-word;
}