@font-face {
    font-family: "parastoo";
    src: url("../../fonts/Parastoo.ttf") format("truetype");
}
@font-face {
    font-family: "calibri";
    src: url("../../fonts/calibril.ttf") format("truetype");
}

@font-face {
    font-family: "vivaldi";
    src: url("../../fonts/vivaldi.ttf") format("truetype");
}

.font-calibri {
    font-family: "calibri" !important;
}

.Vivaldi {
    font-family: "vivaldi" !important;
}

.font-parastoo {
    font-family: "parastoo" !important;
}

/* Body overwride */
body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* Overriding main colors */
.bg-primary {
    background-color: #a1a8a8 !important;
    color: #fff !important;
}

.bg-card {
    background-color: #829191 !important;
    color: #fff !important;
}

.btn-primary {
    background-color: #344f7b !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn.btn-primary.active {
    background-color: #344f7b !important;
    opacity: 0.8 !important;
}

.border-primary {
    border-color: #344f7b !important;
}

.bg-yellow {
    background-color: #f6e1c9 !important;
}

.text-primary {
    color: #344f7b !important;
}

.badge-primary {
    background-color: #344f7b !important;
    color: #fff !important;
}

/* Other CSS */

.bg-main {
    background-color: #95b8d1 !important;
}

.bg-app {
    background-color: #36454f !important;
}

.bg-nav {
    background-color: #d6eadf !important;
}

.bg-yellow {
    background-color: #f6e1c9 !important;
}

.app-header-primary .logo {
    height: 40px !important;
}

/* x-cloak to avoid ALPINE JS load hidden x-show on page load */
[x-cloak] {
    display: none !important;
}

.h-30px {
    height: 30px !important;
}

/* Max height 60px */
.mx-h-40 {
    max-height: 40px !important;
}

/* Max height 60px */
.mx-h-50 {
    max-height: 50px !important;
}

/* Max height 60px */
.mx-h-60 {
    max-height: 60px !important;
}

/* Max height 90px */
.mx-h-90 {
    max-height: 90px !important;
}

/* Max height 100px */
.mx-h-100 {
    max-height: 100px !important;
}

/* Max height 120px */
.mx-h-120 {
    max-height: 120px !important;
}

/* Min height 400px */
.mn-h-400 {
    min-height: 400px !important;
}

/* Table column bordered */
.table-column-bordered tr td {
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: #eaeaea;
}

/* Table column bordered */
.table-column-bordered-rtl tr td:not(:last-child) {
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: #eaeaea;
}

/* Table column bordered */
.table-column-bordered-ltr tr td:not(:first-child) {
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: #eaeaea;
}

/* Backgrounds */
.bg-purple {
    background: #b699bf !important;
    color: #fff !important;
    font-weight: bold;
}

/* Text rotation */
.rotate90 {
    height: 60px !important;
    width: 20px !important;
}

.rotate90 span {
    width: 50px !important;
    position: absolute;
    -webkit-transform: rotate(-90deg) translate(11px, -25px);
}

/* Text rotation */
.rotate270 {
    height: 70px !important;
    width: 20px !important;
}

.rotate270 span {
    width: 50px !important;
    position: absolute;
    -webkit-transform: rotate(-270deg) translate(-5px, -25px);
}

/* For Modal Printing */
@media screen {
    #printSection {
        display: none;
    }
}

/* Printing specification */
@media print {
    html,
    body {
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }
    body * {
        visibility: hidden;
        /* max-width: 100%; */
    }

    /* Print section: used by Javascript print function */
    #printSection,
    #printSection * {
        visibility: visible;
    }

    #printSection {
        position: absolute;
        width: 100%;
        left: 0;
        top: 0;
    }

    /* tbody::after {
        content: ''; display: block !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
    } */

    /* table {
        page-break-inside:auto !important;
    }

    tr {
        page-break-inside:avoid !important;
        page-break-after:auto !important;
    } */

    /* Start: Table bordering properties */
    /* .bordered-print {
        border: none !important;
    }

    .bordered-print td,
    th {
        border: 1px solid #000 !important;
    }

    .bordered-print > tbody > tr:last-child td {
        border: 1px solid #000 !important;
    }

    .bordered-print th {
        font-weight: bold !important;
    } */
    /* End: Table bordering properties */

    .break-always {
        page-break-after: always;
    }
}

.ml-auto {
    margin-left: auto;
}

.table-accent-bg-none {
    --bs-table-accent-bg: none !important;
}

.avatar-img {
    width: 130px;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 10px !important;
}

/* AJAX Loading Spinner Overlay */
.ajax-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    visibility: hidden;
}

.ajax-loader-overlay.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.ajax-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100000;
    gap: 2rem;
}

/* Modern Spinner */
.modern-spinner {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive sizing for mobile */
@media (max-width: 768px) {
    .modern-spinner {
        width: 150px;
        height: 150px;
    }

    .ajax-loader-content {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modern-spinner {
        width: 120px;
        height: 120px;
    }

    .ajax-loader-content {
        gap: 1rem;
    }
}

/* Rotating Rings */
.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-top-color: #dc3545;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    width: 200px;
    height: 200px;
    border-width: 5px;
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(2) {
    width: 160px;
    height: 160px;
    border-width: 4px;
    border-top-color: #ff6b7a;
    animation-duration: 1.2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 120px;
    height: 120px;
    border-width: 3px;
    border-top-color: #ff8c94;
    animation-duration: 1s;
}

/* Responsive ring sizes */
@media (max-width: 768px) {
    .spinner-ring:nth-child(1) {
        width: 150px;
        height: 150px;
        border-width: 4px;
    }

    .spinner-ring:nth-child(2) {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }

    .spinner-ring:nth-child(3) {
        width: 90px;
        height: 90px;
        border-width: 2.5px;
    }
}

@media (max-width: 480px) {
    .spinner-ring:nth-child(1) {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }

    .spinner-ring:nth-child(2) {
        width: 95px;
        height: 95px;
        border-width: 2.5px;
    }

    .spinner-ring:nth-child(3) {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }
}

/* Center dots */
.spinner-center {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

@media (max-width: 480px) {
    .spinner-center {
        gap: 6px;
    }
}

.spinner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #ff6b7a 100%);
    animation: pulse 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.spinner-dot:nth-child(1) {
    animation-delay: 0s;
}

.spinner-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@media (max-width: 480px) {
    .spinner-dot {
        width: 10px;
        height: 10px;
    }
}

/* Loading text */
.spinner-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.5px;
    animation: fadeInOut 2s ease-in-out infinite;
    text-align: center;
}

@media (max-width: 768px) {
    .spinner-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .spinner-text {
        font-size: 1rem;
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}
