﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Page zoom wrapper (note: zoom can affect plugin width calculations) */
.content-zoom-wrapper {
    zoom: 0.9;
    /* try 0.8, 0.85, 0.9 and pick what feels best */
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =======================
   Loader Styles
======================= */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    backdrop-filter: blur(5px);
}

    #loader-wrapper.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loader-content {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 50%;
    overflow: hidden; /* removes all square edges */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.loader-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    z-index: 2;
    animation: pulse 2s infinite ease-in-out;
}

.loader-spinner {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #28a745; /* Green */
    border-bottom-color: #007bff; /* Blue */
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

    .loader-spinner::before {
        content: "";
        position: absolute;
        inset: 5px;
        border: 3px solid transparent;
        border-top-color: #007bff; /* Blue */
        border-bottom-color: #28a745; /* Green */
        border-radius: 50%;
        animation: spin 2.5s linear infinite reverse;
    }

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.9;
    }
}

/* =======================
   Select2 Fixes
======================= */

/* Keep Select2 control same width as its container */
.select2-container {
    width: 100% !important;
}

/*
  IMPORTANT:
  Do NOT set dropdown min-width:100% here.
  Select2 dropdown is often appended to <body>, so 100% becomes the full page width.
*/
.select2-dropdown {
    width: auto !important;
    min-width: 0 !important;
}

/* Make dropdown appear above sidebar, modals, etc. */
.select2-container,
.select2-container--open,
.select2-dropdown {
    z-index: 999999 !important;
}

/* Prevent long option text from stretching UI */
.select2-results__option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =======================
   Select2 RTL Support
======================= */
.select2-container[dir="rtl"] .select2-selection {
    text-align: right;
}

.select2-container[dir="rtl"] .select2-results {
    text-align: right;
}

.select2-container[dir="rtl"] .select2-results__option {
    text-align: right;
    direction: rtl;
}

.select2-container[dir="rtl"] .select2-search__field {
    text-align: right;
    direction: rtl;
}
