/*--------------------------------------------------Loading Effect-------------------------------------*/

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .spinner-overlay.show {
        opacity: 1;
        pointer-events: all;
        display: flex;
    }

.spinner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.spinner-overlay.show .spinner-container {
    transform: translateY(0);
}

.spinner {
    position: relative;
    width: 50px;
    height: 50px;
}

.spinner-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

    .spinner-border:nth-child(1) {
        animation-delay: 0s;
    }

    .spinner-border:nth-child(2) {
        width: 80%;
        height: 80%;
        top: 10%;
        left: 10%;
        border-top-color: #0056b3;
        animation-delay: 0.1s;
    }

    .spinner-border:nth-child(3) {
        width: 60%;
        height: 60%;
        top: 20%;
        left: 20%;
        border-top-color: #00408f;
        animation-delay: 0.2s;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-message {
    margin-top: 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.3px;
    position: relative;
    text-align: center;
    justify-content: center;
}

    .loading-message::after {
        content: "...";
        position: absolute;
        animation: dots 1.5s infinite;
        width: 24px;
        text-align: left;
    }

@keyframes dots {
    0%, 20% {
        content: ".";
    }

    40%, 60% {
        content: "..";
    }

    80%, 100% {
        content: "...";
    }
}

/* Smooth fade-in animation */
/*@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}*/
/*----------------------------------------------------Modal----------------------------------------------------*/


.modal-content:not(.custom-modal-content) {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-content.show {
    opacity: 1;
}


.custom-modal-content {
    opacity: 1 !important;
}

.modal.fade.hiding {
    transition: opacity 0.15s ease-out !important;
    opacity: 0 !important;
}


.modal-backdrop {
    transition: opacity 0.15s ease;
}


/*-----------------------------------------------------Input Floating Label--------------------------------------------------------*/
/* Floating Label Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 1.5rem;
}

.input-container {
    position: relative;
    width: 100%;
}

/* Floating Label */
.floating-label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: white;
    padding: 0 5px;
    color: #6c757d;
    font-size: 1rem;
    font-weight: normal !important;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
}

/* Label states */
.floating-input:focus ~ .floating-label,
.floating-input:valid ~ .floating-label,
.floating-input:not(:focus):not(:placeholder-shown) ~ .floating-label,
.floating-input.input-validation-error ~ .floating-label {
    top: -1px;
    left: 6px;
    font-size: 0.8rem;
}

.floating-input:focus ~ .floating-label {
    color: #007bff;
}

.floating-input:not(:focus):not(:placeholder-shown) ~ .floating-label {
    color: #6c757d;
}

.floating-input.input-validation-error ~ .floating-label {
    color: #dc3545;
}

/* Input styling */
.floating-input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    padding: 12px 10px;
    background-color: #fff;
    outline: none;
}

    .floating-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    }

    .floating-input.input-validation-error {
        border-color: #dc3545;
    }

        .floating-input.input-validation-error:focus {
            border-color: #dc3545;
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
        }

/*------------------------------------------------------------------------------------------------------------------*/

/* Error message styling */
.error-message {
    color: #ff0000;
    text-align: center;
    font-size: 1.2rem;
    margin-top: 20px;
}

.validation-message {
    display: block;
    font-size: 0.9rem;
    color: #dc3545;
}

/* Select2 Customization */
.select2-container {
    display: block !important;
}

.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.select2-container--default .select2-selection--single:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
}

.input-validation-error + .select2-container .select2-selection {
    border-color: #dc3545 !important;
}

    .input-validation-error + .select2-container .select2-selection:focus {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
    }

.select2-dropdown {
    border: 1px solid #ccc !important;
}

.select2-container--default .select2-dropdown--below {
    border-color: #007bff !important;
}

.select2-container.input-validation-error .select2-selection {
    border-color: #dc3545 !important;
}

.input-validation-error ~ .floating-label,
.select2-container.input-validation-error ~ .floating-label {
    color: #dc3545 !important;
}

.select2-container.input-validation-error .select2-selection:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

/*------------------------------------------------------------*/

.table tr:first-child th,
.table tr:first-child td {
    border-top: none;
}


/*------------------------------------style for user-info input sidebar------------------------------------*/

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #343a40;
    color: white;
    border-radius: 12px;
    padding: 1rem;
    width: 100%;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    flex-shrink: 0;
}

.image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
    width: 90px;
    height: 90px;
}

.border-effect {
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    padding: 2px;
    transition: all 0.3s ease-in-out;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .border-effect:hover {
        box-shadow: 0px 0px 6px 2px rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image stays circular */
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
    aspect-ratio: 1 / 1;
}

    .image-wrapper img:hover {
        transform: scale(1.05);
    }

.info-container {
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.sidebar-mini.sidebar-collapse .user-info {
    padding: 0.5rem;
}

.sidebar-mini.sidebar-collapse .image-wrapper {
    width: 60px;
    height: 60px;
    justify-content: center;
    align-items: center;
}


/* Show text when sidebar is hovered */
.sidebar-mini.sidebar-collapse:hover .info-container {
    opacity: 1;
    width: auto;
    height: auto;
    transition: opacity 0.3s ease-in-out, width 0.3s ease-in-out;
}

.sidebar-mini.sidebar-collapse:hover img {
    transform: scale(1);
}

/*-----------------------------------------------------------------------------------------------*/

.badge {
    font-size: 13px !important;
    padding: 5px 10px !important;
    border-radius: 15px !important;
}

/*------------------------------------GAA Multi-Step Form Modal------------------------------------*/
/* Set a default icon size on the container */
.progress-container {
    --icon-size: 60px;
    margin-bottom: 30px;
    position: relative;
}

/* Use the variable for the progress bar's placement */
.progress {
    position: absolute;
    top: calc(var(--icon-size) / 2); /* half the icon size */
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    overflow: hidden;
    z-index: 0;
}

.progress-bar {
    transition: width 0.6s ease-in-out, background 0.6s ease-in-out;
    background: linear-gradient(90deg, #4361ee, #3f8cff);
    height: 6px;
    border-radius: 3px;
    width: 0%;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

/* Use the custom property for the icon size */
.step-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 50%;
    background: white;
    border: 3px solid #e9ecef;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 2;
}

    .step-icon i {
        /* Adjust the icon size based on the icon's diameter: 
       this is relative to the initial, but can be adjusted further if needed */
        font-size: calc(var(--icon-size) * 0.4);
        transition: all 0.3s ease;
    }

.step.active .step-icon {
    border-color: #4361ee;
    color: #4361ee;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
    transform: scale(1.05);
}

.step.completed .step-icon {
    background: #4361ee;
    border-color: #4361ee;
    color: white;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.step.active .step-title,
.step.completed .step-title {
    color: #4361ee;
}

.steps-container:after {
    display: none;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .progress-container {
        --icon-size: 40px;
    }

    .step-title {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .progress-container {
        --icon-size: 32px;
    }

    .step-title {
        font-size: 10px;
    }
}



.section-title {
    color: #344767;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

    .section-title small {
        line-height: normal;
        display: block;
        margin: 0;
    }

.breakdown-row, .caf-row {
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #eee !important;
}

    .breakdown-row:hover, .caf-row:hover {
        background-color: #f1f3f5;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

.btn-action {
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .btn-action:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .btn-action:hover:after {
        transform: translateX(0);
    }

.btn-next {
    background-color: #4361ee;
    color: white;
    border: none;
    box-shadow: 0 3px 6px rgba(67, 97, 238, 0.2);
}

    .btn-next:hover {
        background-color: #3a56d4;
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
        transform: translateY(-2px);
    }

.btn-prev {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

    .btn-prev:hover {
        background-color: #e9ecef;
        transform: translateY(-2px);
        box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    }

.btn-add {
    background-color: white;
    color: #4361ee;
    border: 1px dashed #4361ee;
    border-radius: 6px;
    padding: 12px 18px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

    .btn-add:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(67, 97, 238, 0.08);
        z-index: -1;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
        border-radius: 5px;
    }

    .btn-add:hover {
        border-color: #3a56d4;
        box-shadow: 0 3px 8px rgba(67, 97, 238, 0.15);
        transform: translateY(-2px);
    }

        .btn-add:hover:before {
            transform: scaleX(1);
        }

.btn-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #fd5c70;
    background-color: white;
    color: #fd5c70;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

    .btn-remove:after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: rgba(253, 92, 112, 0.08);
        top: 0;
        left: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .btn-remove:hover {
        background-color: #fd5c70;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 3px 8px rgba(253, 92, 112, 0.25);
    }

        .btn-remove:hover:after {
            transform: translateY(0);
        }

.tab-pane {
    transition: opacity 0.3s ease;
}

    .tab-pane.fade {
        opacity: 0;
        display: none;
    }

        .tab-pane.fade.show {
            opacity: 1;
            display: block;
        }


/* Custom SweetAlert2 Bootstrap 4 Icon Adjustments */

/* Success Icon - Green */
.swal2-icon.swal2-success {
    border-color: #28a745 !important;
}

    .swal2-icon.swal2-success .swal2-success-ring {
        border-color: rgba(40, 167, 69, 0.3) !important;
    }

    .swal2-icon.swal2-success [class^='swal2-success-line'] {
        background-color: #28a745 !important;
    }

/* Error Icon - Red */
.swal2-icon.swal2-error {
    border-color: #dc3545 !important;
}

    .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
        background-color: #dc3545 !important;
    }

/* Warning Icon - Yellow/Orange */
.swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

/* Info Icon - Blue */
.swal2-icon.swal2-info {
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
}

/* Question Icon - Gray */
.swal2-icon.swal2-question {
    border-color: #6c757d !important;
    color: #6c757d !important;
}

/* Button Styling to Match AdminLTE */
.swal2-styled.swal2-confirm {
    background-color: #007bff !important;
    border: none !important;
    padding: .375rem .75rem;
}

    .swal2-styled.swal2-confirm:focus {
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5) !important;
    }

.swal2-styled.swal2-cancel {
    background-color: #6c757d !important;
    border: none !important;
    padding: .375rem .75rem;
}

    .swal2-styled.swal2-cancel:focus {
        box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5) !important;
    }

.swal2-styled.swal2-deny {
    background-color: #dc3545 !important;
    border: none !important;
    padding: .375rem .75rem;
}

/* Default title size - smaller and more balanced */
.swal2-title {
    font-size: 1.5rem !important; 
    font-weight: 600 !important;
    color: #343a40 !important;
    line-height: 1.4 !important;
    margin: 0 0 0.5rem !important;
}

    .swal2-title.swal2-title-small {
        font-size: 1.25rem !important;
    }

.swal2-html-container {
    font-size: 1rem !important;
    color: #6c757d !important;
    line-height: 1.5 !important;
}

.swal2-popup {
    padding: 1.5rem !important;
}