@tailwind base;
@tailwind components;
@tailwind utilities;

* {
    @apply text-pds-black-color;
}

body {
    @apply bg-pds-muted-blue-color;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.content-btn {
    @apply bg-white text-pds-black-color hover:bg-pds-blue-color hover:text-white py-3 px-8 rounded flex items-center;
}

.text-black-color {
    @apply text-pds-black-color;
}

.bg-blue-color {
    @apply bg-pds-blue-color;
}

.pagination-button:hover {
    @apply !text-white !bg-pds-blue-color;
}

.overlay {
    @apply fixed top-[10vh] h-full w-[-webkit-fill-available] z-[998] ease-in-out scale-[18rem];
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    backdrop-filter: blur(1px); /* The blur creates the frosted glass effect */
    -webkit-backdrop-filter: blur(1px); /* For Safari support */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Adds a soft shadow */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Slight border to enhance glass effect */
}

.validation-message {
    @apply text-red-500 text-sm;
}

.input-error {
    border: 2px solid #FF3B30 !important;
}
/* Tooltip Styling */
.relative:hover .tooltip-text {
    opacity: 1;
}

input[type=password]::-ms-reveal,
input[type=password]::-ms-clear {
    display: none;
}

/*Global BTN*/
.component-btn-header {
    padding: 10px 25px;
}

/*Global Table*/
table tbody tr:nth-child(odd):not(.no-alt-bg) {
    background-color: #6AADDF60;
}

table tbody tr:nth-child(even):not(.no-alt-bg) {
    background-color: #FFFFFF;
}

tbody tr:nth-child(odd) td.text-end:not(.no-alt-bg) {
    background-color: #6AADDF;
}

tbody tr:nth-child(even) td.text-end:not(.no-alt-bg) {
    background-color: #FFFFFF;
}
/*Login Loading Spinner*/

#table-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.30); /* transparent overlay */
    z-index: 50; /* ensures it's on top of the table */
}

.loader {
    width: 24px;
    height: 24px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.preloader {
    width: 40px;
    height: 40px;
    border: 7px solid #D9D9D9; /* Light gray border */
    border-bottom-color: #3B8AFF; /* Blue spinner color */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.content {
    min-width: 100%;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.icon {
    transition: opacity 0.3s ease;
}

.padding-left-8rem {
    padding-left: 8rem;
}

.alert-modal-custom {
    left: 54.5%;
    top: 8rem;
}


/*table component*/
.table-container {
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

thead.sticky-header th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: white;
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

tbody {
    overflow-y: scroll;
}

td, th {
    white-space: nowrap;
}

.sticky-action-column {
    position: sticky;
    right: 0;
    z-index: 3;
    background-color: white;
}

tbody td.text-end {
    text-align: right;
    position: sticky;
    right: 0;
    z-index: 1;
    opacity: 1;
    background-color: white;
}

thead th.text-end {
    @apply bg-white z-[1] right-0 sticky;
}

/*Global checkbox for group-component*/
.form-checkbox:checked {
    @apply bg-pds-blue-color text-white;
}

.form-checkbox {
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white; /* Default background */
    appearance: none;
    outline: 0;
    border: 1px solid white;
    @apply cursor-pointer rounded w-[20px] h-[20px] rounded;
}

    .form-checkbox:after {
        content: '';
        position: absolute;
        left: 35%;
        top: 5%;
        width: 6px;
        height: 12px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        display: none; /* Hidden by default */
    }

    .form-checkbox:checked:after {
        display: block;
    }
/* Apply this class to elements with scrollbars */

.custom-scrollbar::-webkit-scrollbar {
    width: 12px;
    /* Make the scrollbar thinner */
    height: 12px;
    /* For horizontal scrollbars */
}

.custom-scrollbar::-webkit-scrollbar-track {
    background-color: rgba(74, 74, 74, 0.25);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: rgba(74, 74, 74, 0.75);
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background-color: #4b5563;
        /* Slightly darker on hover */
    }

.select-container {
    position: relative;
    display: inline-block; /* Make it inline-block for proper spacing */
}

.approval-status-dropdown {
    -webkit-appearance: none; /* Remove default arrow for WebKit browsers */
    -moz-appearance: none; /* Remove default arrow for Firefox */
    appearance: none; /* Remove default arrow for other browsers */
    background: transparent; /* Ensure background is transparent */
    padding-right: 25px; /* Ensure space for the icon */
    padding-left: 0.5rem; /* Optional: Space on the left for text */
    border: none;
    outline: none;
    cursor: pointer;
}

.dropdown-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.approval-status-dropdown:focus {
    border: none;
}

.status-badge {
    width: 100px;
}
/*Quill Rich Text */
.ql-toolbar {
    border-radius: 5px !important;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border: 2px solid #ccc;
}
#nav {
    overflow-y: auto; /* Allows vertical scrolling */
    overflow-x: hidden; /* Prevents horizontal scrolling */
    max-height: 100vh; /* Ensures it fits within the viewport */
    /* Hide scrollbar for WebKit browsers (Chrome, Safari) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer/Edge */
}

#nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari */
}
.margin-right-2rem {
    margin-right: 2rem;
}