﻿/* ========================================
   Toast Notifications Styles ->start
   ======================================== */

/* Toast Container */
#toast-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    max-width: 280px;
}

/* Base Toast - Blend custom slide with Bootstrap's fade */
.toast {
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    min-width: 350px;
    max-width: 350px;
    font-size: 0.875rem;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateX(100%);
}

    /* Smooth opacity + slide for fade toasts */
    .toast.fade {
        transition: opacity 0.28s ease, transform 0.28s ease;
    }

    .toast.show {
        opacity: 1;
        transform: translateX(0);
    }

    /* Apply off-screen only when element has .fade and not .show */
    .toast.fade:not(.show) {
        transform: translateX(100%);
        opacity: 0;
    }


    .toast .d-flex {
        padding: 2px 6px; /* Minimal padding */
        gap: 4px;
    }

    .toast .toast-body {
        flex-grow: 1;
        font-weight: 500;
    }

        .toast .toast-body i {
            font-size: 1rem;
            vertical-align: middle;
        }

    /* Colors */
    .toast.bg-success {
        background: linear-gradient(135deg, #28a745, #20c997);
        color: #fff;
    }

    .toast.bg-danger {
        background: linear-gradient(135deg, #dc3545, #fd7e14);
        color: #fff;
    }

    .toast.bg-warning {
        background: linear-gradient(135deg, #ffc107, #fd7e14);
        color: #212529;
        border: 1px solid rgba(0,0,0,0.1);
    }

    .toast.bg-primary {
        background: linear-gradient(135deg, #0d6efd, #6610f2);
        color: #fff;
    }

    /* Close Button */
    .toast .btn-close {
        opacity: 0.8;
        transition: opacity 0.2s ease;
        flex-shrink: 0;
    }

        .toast .btn-close:hover {
            opacity: 1;
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
        }

/* Responsive */
@media (max-width: 576px) {
    #toast-container {
        right: 1px;
        max-width: none;
        align-items: stretch;
        gap: 4px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        font-size: 0.85rem;
        border-radius: 4px;
    }

        .toast .d-flex {
            padding: 4px 8px;
        }
}
/* ========================================
   Toast Notifications Styles ->end
   ======================================== */
/* --------------------------------------------------
   FADE In Animation
-------------------------------------------------- */

.fade-in {
    animation: fadeInUp 0.2s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
    animation-delay: calc(var(--index, 0) * 0.1s); /* Stagger by 200ms per index; default 0 for safety */
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------
   Spinner Animation
    -------------------------------------------------- */
/* Common overlay for all variants */
.loading {
    position: relative;
    min-height: 150px; /* Adjust as needed */
}

    .loading::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 135deg, rgba(255, 255, 255, 0.75), rgba(230, 230, 230, 0.65) );
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(6px) saturate(120%);
        z-index: 10;
        border-radius: 10px;
    }

    /* Centering wrapper for the spinner */
    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 11;
    }


    /* Add this for Variant 2 */
    .loading.pulse-ring::after {
        width: 48px;
        height: 48px;
        border: 4px solid var(--secondary);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        box-shadow: 0 0 0 0 rgba(13, 152, 70, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(13, 152, 70, 0);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
    animation-delay: calc(var(--index, 0) * 0.2s); /* Stagger by 100ms per index; default 0 for safety */
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Buttons – Enterprise with Transitions
   ======================================== */

.btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.42rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
    /* TRANSITIONS */ transition: background-color 0.25s cubic-bezier(.4,0,.2,1), color 0.25s cubic-bezier(.4,0,.2,1), border-color 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1), transform 0.15s cubic-bezier(.2,0,0,1);
}

/* Primary */
.btn-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

    .btn-primary:hover {
        background-color: var(--primary);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
        transform: translateY(-1px);
    }

    .btn-primary:active {
        background-color: var(--accent);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
        transform: translateY(0);
    }

/* Secondary */
.btn-secondary {
    background-color: transparent;
    color: var(--dark-blue);
    border-color: var(--dark-blue);
}

    .btn-secondary:hover {
        background-color: var(--dark-blue);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

    .btn-secondary:active {
        background-color: var(--primary) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
        transform: translateY(0);
    }

/* Focus – accessible but subtle */
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25), 0 4px 10px rgba(0, 0, 0, 0.15);
}


.iti {
    width: 100% !important;
    display: block !important;
}



/* Optional: make the flag dropdown look nice inside Bootstrap inputs */
.iti__flag-container {
    background-color: #fff;
}

/* If you still want the original input to have .form-control styling */
.phone-input {
    width: 100% !important;
}

/* ========================================
   Card and Table Styles
   ======================================== */
.card {
    background: var(--white);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding:1rem;

}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius:10px !important; 
    margin-bottom:3px;

}

.table thead {
    background-color: var(--accent);
    color: var(--white);
}

    .table thead th {
        border: none;
        font-weight: 600;
    }

.table tbody tr {
    transition: var(--transition);
}

    .table tbody tr:hover {
        background-color: var(--light-sky);
    }

    .table tbody tr:nth-child(even) {
        background-color: var(--light-blue);
    }

        .table tbody tr:nth-child(even):hover {
            background-color: var(--light-sky);
        }

/* =========================================================
   Select2 Bootstrap 5 Inspired Theme
   ========================================================= */

/* Selection box */
.select2-container--default .select2-selection--single {
    height: 38px;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--light-blue);
    background-color: var(--white);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

/*     Selected text */
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: var(--text);
        padding-left: 0;
        line-height: normal;
    }

/* Placeholder */
.select2-container--default .select2-selection__placeholder {
    color: #6c757d;
}

/* Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 8px;
}

/* Hover */
.select2-container--default .select2-selection--single:hover {
    border-color: var(--secondary);
}

/* Focus / Open */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Disabled */
.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

/* =========================================================
   Dropdown
   ========================================================= */

.select2-dropdown {
    border-radius: 0.375rem;
    border: 1px solid var(--light-blue);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Search box */
.select2-search--dropdown .select2-search__field {
    border-radius: 0.25rem;
    border: 1px solid var(--light-blue);
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    outline: none;
}

    .select2-search--dropdown .select2-search__field:focus {
        border-color: var(--primary);
    }

/* Options */
.select2-results__option {
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

/* Hover option */
.select2-results__option--highlighted {
    background-color: var(--light-sky);
    color: var(--navy);
}

/* Selected option */
.select2-results__option--selected {
    background-color: var(--primary);
    color: var(--white);
}

/* No results */
.select2-results__message {
    padding: 0.5rem;
    color: #6c757d;
}

/* =========================================================
   Clear (x) icon
   ========================================================= */

.select2-selection__clear {
    color: #999;
    margin-right: 6px;
    transition: var(--transition);
}

    .select2-selection__clear:hover {
        color: var(--accent);
    }

li a {
    cursor: pointer;
}