@import "styles/buttons.css";
@import "styles/colors.css";
@import "styles/fonts.css";
@import "styles/inputs.css";
@import "styles/navigation.css";
@import "styles/modals.css";
@import "styles/table.css";

html {
  overflow: hidden;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: all var(--animation-duration) ease-in-out;
}

/* Shadows */
.shadow-small {
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shadow-medium {
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2);
}

.shadow-large {
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.3);
}

/* Separator */
.separator {
        display: flex;
        align-items: center;
        text-align: center;
}

.separator::before,
.separator::after {
        content: "";
        flex: 1;
        border-bottom: 1px solid white;
}

.separator:not(:empty)::before {
        margin-right: 0.25em;
}

.separator:not(:empty)::after {
        margin-left: 0.25em;
}

[x-cloak] {
  display: none !important;
}

#content {
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100vh - var(--navbar-height));
  margin-top: var(--navbar-height);
  padding: 1.5rem 1.5rem;
  transition: margin var(--animation-duration) ease-in-out;
}

.content-expanded {
  margin: 0;
}

.content-retracted {
  margin-left: var(--sidebar-width);
}

.content-mid-retracted {
  margin-left: var(--retracted-sidebar-width);
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-default {
  cursor: default;
}

@media (min-width: 768px) {
  #content {
    padding: 2.5rem 4rem;
  }
}

.toast-container {
        position: fixed;
        z-index: 1100;
}

/* Custom Pagination Styles */
.custom-pagination {
    --pagination-text-color: var(--primary-orange);
    --pagination-hover-color: var(--orange-darker);
    --pagination-disabled-color: #a9a9a9;
    --pagination-border-color: #dee2e6;
    --pagination-hover-bg: #f8f9fa;

    --bs-pagination-border-width: 0;
    border: 1px solid var(--pagination-border-color);
    border-radius: 0.375rem;
}

.custom-pagination .page-link {
    color: var(--pagination-text-color);
    background-color: transparent;
    border-radius: 0;
}

.custom-pagination .page-item:not(:last-child) .page-link {
    border-right: 1px solid var(--pagination-border-color);
}

.custom-pagination .page-item.active .page-link {
    background-color: transparent;
    color: var(--primary-orange);
    font-weight: 700;
    border: 2px solid var(--primary-orange);
    margin: -1px;
}

.custom-pagination .page-link:hover,
.custom-pagination .page-link:focus {
    color: var(--orange-darker);
    box-shadow: none;
}

.custom-pagination .page-item.disabled .page-link {
    color: var(--pagination-disabled-color);
    background-color: transparent;
}

/* --- Page Title Header --- */
.page-title {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--primary-green); /* Ensure this uses a var */
    text-transform: uppercase;
}

html[data-theme='dark'] .page-title {
    color: var(--color-white);
}

/* --- Custom Search Bar --- */
.search-bar-custom .input-group {
    width: 380px;
    height: 42px;
}

.search-bar-custom .input-group-text {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.search-bar-custom .bi-search {
    font-size: 1.1rem;
    color: var(--input-text);
}

.search-bar-custom .form-control {
    border: 1px solid var(--input-border);
    border-left: none;
    box-shadow: none;
}

.search-bar-custom .form-control::placeholder {
    color: #adb5bd;
}

.search-bar-custom .btn-search {
    background-color: var(--primary-orange);
    color: white;
    font-weight: 600;
    border: 2px solid var(--orange-darker);
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transition: background-color 0.2s ease-in-out;
    position: relative;
    z-index: 2;
}

.search-bar-custom .btn-search:hover {
    background-color: var(--orange-darker);
}

.search-bar-custom .btn-search:focus {
    box-shadow: none;
}

/* --- Sort Arrow --- */
.sort-arrow {
    cursor: pointer;
    font-size: 1.1em;
    margin-left: 0.5rem;
    transition: color 0.2s ease-in-out;
}

.sort-arrow-inactive {
    color: #a0a0a0;
}

.sort-arrow-inactive:hover {
    color: #333;
}

.sort-arrow-active {
    color: var(--primary-orange);
}

/* --- Dark Mode Pagination Overrides --- */
html[data-theme='dark'] .custom-pagination {
    border: none;
}

html[data-theme='dark'] .custom-pagination .page-item .page-link {
    border: none;
}

/* Ensure active item keeps its border */
html[data-theme='dark'] .custom-pagination .page-item.active .page-link {
    border: 2px solid var(--primary-orange);
}

html[data-theme='dark'] .custom-pagination .page-link:hover,
html[data-theme='dark'] .custom-pagination .page-link:focus {
    color: var(--color-white) !important;
    background-color: transparent;
    box-shadow: none;
}

/* --- Dark Mode Search Bar Override --- */
html[data-theme='dark'] .search-bar-custom .input-group-text {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

/* --- Toast Style for Success --- */
.bg-tkc-success {
    background-color: var(--secondary-lightGreen) !important;
    color: white !important;
}

/* --- Notifications --- */
.notification-badge {
    width: 10px;
    height: 10px;
    top: 10px !important;
    left: 25px !important;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    background-color: #8D8D8D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* The beige background for unread items */
.bg-unread {
    background-color: #FFF8E1 !important;
}

.notification-card {
    border-radius: 0.75rem !important;
    overflow: hidden;
}

.notification-list-body {
    max-height: 400px;
    overflow-y: auto;
}

/* Dark Mode Overrides for Notifications */
html[data-theme='dark'] .notification-card {
    background-color: var(--darkBlue-darker);
    border: 1px solid var(--darkBlue-lighter) !important;
}

html[data-theme='dark'] .notification-card .card-header {
    background-color: var(--darkBlue-medium) !important;
    border-bottom-color: var(--darkBlue-lighter) !important;
    color: var(--color-white);
}

html[data-theme='dark'] .bg-unread {
    background-color: var(--darkBlue-lighter) !important;
}

html[data-theme='dark'] .bg-white {
    background-color: var(--darkBlue-darker) !important;
}

html[data-theme='dark'] .notification-item {
    border-bottom-color: var(--darkBlue-lighter) !important;
}

html[data-theme='dark'] .notification-item .text-dark {
    color: var(--color-white) !important;
}

.notification-card-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.08)!important;
    transition: all 0.2s ease;
}

.notification-time-col {
    min-width: 100px;
}

.text-tiny-bold {
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- Notification Dropdown (Navbar) --- */
.notification-dropdown-card {
    width: 380px;
    z-index: 1050;
    right: 10px;
}

/* The CSS Triangle Arrow */
.notification-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
    position: absolute;
    top: 0;
    right: 0;
    transform: translateX(-50%);
    margin-top: -10px;
    margin-right: 1.5rem;
}

/* Dark Mode Arrow */
html[data-theme='dark'] .notification-arrow {
    border-bottom-color: var(--darkBlue-medium);
}

/* --- Notification Items --- */
.truncate-limit {
    max-width: 200px;
}
