/* Navbar Search Bar  */
.custom-search-container {
    max-width: 350px;
    position: relative;
    margin: 0 15px;
}

.custom-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border-radius: 20px;
    border: none;
    background-color: #fff;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.34);
    transition: all 0.3s ease;

}

.custom-search-input:focus {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    border-color: #4e73df;
    outline: none;
}

.custom-search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #4e73df;
    cursor: pointer;
    padding: 8px;
}

.custom-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

/* Time display styling */
.custom-time-display {
    text-align: center;
    margin-left: 0px;
    margin-right: 15px;
    font-weight: 600;
    color: #333333;
    font-size: 2rem;
}

.small-ampm {
    font-size: 1rem;
    /* Makes AM/PM smaller */
    vertical-align: super;
    /* Raises it slightly */
    margin: 0;
}

@media (max-width: 630px) {
    .custom-search-container {
        margin: 10px auto;
        width: 90%;
    }

    /* .custom-time-display {
        margin: 8px 0;
    } */
}

@media (max-width: 704px) {
    .custom-time-display {
        font-size: 1rem;
    }

    .small-ampm {
        font-size: 0.5rem;
        /* Makes AM/PM smaller */
        vertical-align: super;
        /* Raises it slightly */
        margin: 0;
    }

}


/* ===== Flash Messages Styling====== */

.flash-container {
    position: absolute;
    top: 10px;
    /* Distance from the top of the viewport */
    right: 10px;
    /* Distance from the right side */
    z-index: 1000;
    /* Ensure it appears on top */
}

.flash {
    background-color: #db0303;
    /* Red background for error messages */
    color: #ffffff !important;
    /* White text */
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    /* Distribute space between elements */
    align-items: center;
    position: relative;
    /* Ensure position context for absolute elements */
    animation: fadeIn 0.5s, fadeOut 0.5s 14.5s;
    /* Fade in and fade out effect */
}


.flash-success {
    background-color: #28a745;
    padding-right: 30px;

    /* Green background for success messages */
}

.flash-warning {
    background-color: #ffc107;
    /* Yellow background for warning messages */
}

.flash-error {
    background-color: #dc3545;
    padding-right: 30px;
    /* Red background for error messages */
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    /* Ensure button color is visible against the background */
    font-size: 16px;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    /* Increase padding for better click area */
    position: absolute;
    /* Position it absolutely within the flash container */
    right: 10px;
    /* Align to the right */
    top: 40%;
    /* Center vertically */
    transform: translateY(-50%);
    /* Adjust for the vertical center */

}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}



/* Modal styling to match the red color theme */

/* Colors */
:root {
    --primary-red: #db0303;
    --lighter-red: #ff4d4d;
    --dark-red: #9a0000;
    --white: #fff;
    --black: #000;

}



.modal-header {
    background-color: var(--primary-red);
    color: var(--white);
}

.modal-title {
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--lighter-red);
    border-color: var(--lighter-red);
}

.form-control {
    border: 1px solid var(--lighter-red);
}

/* Close button customization */
.close {
    color: var(--white);
}

.close:hover {
    color: var(--lighter-red);
}




/* ===== Choose Login Option ==== */

.device-type-options {
    display: flex;
    /* Use flexbox for alignment */
    justify-content: space-around;
    /* Space out the options evenly */
    margin-top: 10px;
    /* Add some spacing above the options */
}

.device-option input[type="radio"] {
    margin-right: 5px;
    /* Add some spacing between the radio button and label */
}

.device-option label {
    font-weight: 500;
    /* Optional: bold the label */
}







/* Table styling */



/* ________________________________________
    ##########  ALERT NOTIFICATON ######## 
____________________________________________*/

.alert-notification {
    max-height: 300px;
    /* Set a fixed height */
    overflow-y: auto;
    /* Enable scrolling */
}





/* _____________________________________________________________________
    ##########  Custom styles for the knowledge base cards ######## 
_______________________________________________________________________*/

.preview-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.preview-image {
    max-height: 100%;
    object-fit: contain;
}

.description-container {
    height: 80px;
    overflow-y: auto;
}

/* Profile picture styling */
.profile-pic {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 3px solid #db0303;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.profile-pic-placeholder {
    width: 40px;
    height: 40px;
    background-color: #6c757d;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Card hover effect */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}



/* Knowledge Base Header Styling - Responsive Version */
.kb-header-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(1350deg, #f3f1f1c3, #fff);
    padding: 1.5rem;
    border-bottom: 4px solid #db0303;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    width: 100%;
}

/* .kb-header-container:hover {
    box-shadow: 0 6px 18px rgba(219, 3, 3, 0.3);
} */

.kb-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.kb-title {
    color: #000;
    margin: 0;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
    font-size: 1.75rem;
    line-height: 1.2;
    word-break: break-word;
    flex: 1;
    min-width: 200px;
}

.kb-title sup {
    font-size: 0.65em;
    top: -0.5em;
    position: relative;
}

.kb-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: #db0303;
    border-radius: 3px;
}

.kb-back-btn {
    background-color: transparent;
    color: #000;
    border: 2px solid #000;
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.kb-back-btn:hover {
    background-color: #fff;
    color: #db0303;
    transform: translateX(-5px);
    border-color: #db0303;
}

.kb-back-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.kb-back-btn:hover i {
    transform: translateX(-3px);
}

/* Scroll effect - header becomes more compact when scrolling */
.scrolled .kb-header-container {
    padding: 1rem 1.5rem;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .kb-header-container {
        padding: 1.25rem 1rem;
    }

    .kb-title {
        font-size: 1.5rem;
        min-width: 0;
        flex-basis: 100%;
        margin-bottom: 0.75rem;
    }

    .kb-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .kb-back-btn {
        align-self: flex-start;
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
}

@media screen and (max-width: 480px) {
    .kb-header-container {
        padding: 1rem 0.75rem;
        border-radius: 0 0 8px 8px;
    }

    .kb-title {
        font-size: 1.25rem;
        padding-left: 12px;
    }

    .kb-title::before {
        width: 4px;
    }

    .scrolled .kb-header-container {
        padding: 0.75rem 0.75rem;
    }
}



/* _____________________________________________________________________
    ##########  View-Profile Template Style ######## 
_______________________________________________________________________*/