html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/*.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}*/

.flag-icon {
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
    position: relative;
    display: inline-block;
    width: 24px; /* Adjust the width as needed */
    height: 24px; /* Adjust the height as needed */
    line-height: 1em;
}

.flag-icon-tr {
    background-image: url(../assets/img/flags/turkey.svg);
}

.flag-icon-en {
    background-image: url(../assets/img/flags/us.svg);
}

.dropdown-item .flag-icon {
    margin-right: 5px;
}

.dropdown-item.disabled {
    color: #6c757d; /* Gray color */
    pointer-events: none; /* Disable interaction */
    cursor: not-allowed; /* Change cursor to indicate non-interactivity */
    opacity: 0.6; /* Slightly fade the item */
}

.modal-dialog {
    display: table;
    width: auto;
    min-width: 500px;
}

.modal-body {
    max-width: 92vw;
}

@media (max-width: 576px) {
    .modal-dialog {
        min-width: 300px;
    }
}

td.details-control {
    background: url("../assets/img/details_open.png") no-repeat center center;
    cursor: pointer;
}

tr.shown td.details-control {
    background: url("../assets/img/details_close.png") no-repeat center center;
}

.progress-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-indicator i {
    font-size: 20px;
    color: #ddd;
}

.progress-indicator i.active {
    color: #4CAF50;
}

.progress-indicator span {
    display: flex; /* Make the span a flex container */
    align-items: center; /* Vertically center elements within the span */
    padding-right: 5px; /* Add spacing to the right side */
}

.step-title {
    margin-left: 5px; /* Adjust the value for desired spacing */
    font-size: 0.8rem; /* Adjust font size for better fit */
    color: #333; /* Set text color */
}

.wizard-step--active {
    /*background-color: #f5f5f5;*/
    border: 1px solid #ddd;
}

.footer-labels {
    margin-bottom: 16px;
    margin-right: 5px;
    line-height: 46.4px; /* Adjust as needed for expected max content height */
}

#tab-controls {
    align-items: center;
}

.filter-tab {
    padding: 2px 7px;
    border: 1px solid #ddd; /* Light grey border */
    border-radius: 4px;
    cursor: pointer;
    margin: 2px;
    font-size: 14px; /* Adjust font size for smaller screens */
    background-color: #f8f9fa; /* Light grey background */
    color: #333; /* Dark grey text color */
    text-align: center; /* Center text within tabs */
}

.filter-tab.active {
    background-color: #0d6aad; /* Bootstrap's active tab blue */
    color: #fff; /* White text color for better contrast */
    border-color: #0d6aad; /* Blue border for active state */
}

#predictionTable input[type="checkbox"] {
    border-color: red; /* Change this to your desired border color */
}

#filterTable input[type="checkbox"] {
    border-color: red; /* Change this to your desired border color */
}

#filterTable input[type="checkbox"][disabled] {
    opacity: 0.4; /* Adjust opacity for desired visibility */
}

.nested-table.table-bordered {
    border-style: hidden;
}

.nested-table.table-bordered td:nth-child(1) {
    vertical-align: top; /* Align top of cell with label */
}

.modal .btn-link i.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#captchaImage {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#captchaImage.fade {
    opacity: 0;
}

.modal .btn-link,
.modal .btn-link:hover,
.modal .btn-link:focus {
    text-decoration: none !important;
}

.dataTable td.custom-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #bce8f1;
}

.dataTable td.custom-fail {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #f8d7da;
}

#matches-container {
    background-color: inherit;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid #ddd; /* Light gray border */
    overflow: auto;
}

:root {
    --header-height: 56.8px;
}

/* Main container should take at least the height of the viewport minus the header */
#main-container {
    min-height: calc(100vh - var(--header-height));
    overflow: auto;
}

#chat-container {
    flex: 0 0 300px; /* Set minimum width with flex-basis */
}

#message-history {
    overflow-y: auto;
}

#message-list {
    list-style-type: none;
    padding: 0;
}

.message-container {
    display: flex;
    align-items: flex-start; /* Align child elements to the top */
    padding: 10px;
    border-radius: 5px;
    position: relative; /* Establish relative positioning context */
    word-wrap: break-word; /* Ensure long text wraps properly */
}

.message-container:hover {
    background-color: #f5f5f5;
}

.message-parts-wrapper {
    display: inline-block;
    align-content: center;
    flex: 1; /* Ensure the content takes the available space */
    word-wrap: break-word; /* Prevent overflow for long text */
    white-space: normal;
    overflow-x: hidden; /* Hides overflowing content horizontally */
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 5px;
}

.avatar-initials {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.message-username {
    font-weight: bold;
    color: blue;
    margin-right: 5px;
}

.message-timestamp {
    font-size: 0.8em;
    color: gray;
    margin-right: 5px;
}

.message-text {
    white-space: pre-wrap; /* Ensures proper display of multiline text */
}

.message-container .dropdown {
    display: none;
    top: 5px; /* Adjust as needed */
    right: 5px; /* Adjust as needed */
    position: absolute;
}

.message-container:hover .dropdown { /* Target dropdown within hovered container */
    display: block; /* Show dropdown on hover */
}

.message-container .dropdown-toggle::after {
    display: none; /* Hide the dropdown arrow for elements within .message-container */
}

#contextMenuButton {
    background: transparent;
    border: none;
    color: inherit;
}

.message-container:hover .dropdown-toggle {
    opacity: 0.8; /* Slightly increase opacity on hover */
    color: inherit;
}

.card-footer.chat-input-container {
    display: flex; /* Ensure parent has flexbox enabled */
    align-items: center;
}

.card-footer.chat-input-container input {
    flex: 1; /* Allow input field to grow */
}

.card-footer.chat-input-container button {
    flex: 0 0 auto; /* Buttons share remaining space horizontally */
    margin-left: 5px; /* Optional: Add spacing between buttons */
}

.emoji-picker-categories {
    margin: 0;
    padding: 0;
}

.emoji-picker-category {
    display: inline-flex; /* Display category images inline */
    margin: 5px; /* Add spacing between categories */
    cursor: pointer;
}

.emoji-picker-category > i.selected {
    color: #0d6aad; /* Bootstrap blue color */
}

.emoji-picker-content {
    display: flex;
    flex-wrap: wrap; /* Wrap emojis to next line when full */
    width: fit-content; /* Prevent horizontal overflow (optional) */
    max-width: 200px; /* Adjust as needed */
    max-height: 200px; /* Introduce vertical scrollbar if content overflows */
    overflow-y: auto; /* Display scrollbar when content overflows */
}

.emoji-picker-content .emoji-button {
    padding: 0.25rem 0.25rem; /* Same values as existing padding */
}

.contacts-list-img {
    height: 40px;
    margin-right: 5px;
}

.contact-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.custom-contacts-list-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.contacts-list-name {
    font-weight: bold;
}

.contacts-list-status {
    margin-left: 10px;
    font-weight: bold;
}

/* CSS for the chat-tabs-row and chat-tabs */
.chat-tabs-row {
    margin-top: 5px;
}

.chat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
}

/* CSS for the tab buttons */
.tab-button {
    display: flex;
    align-items: center;
    position: relative;
    padding: 5px 10px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tab-button:hover {
    background-color: #0056b3;
}

.tab-button.active {
    background-color: #0056b3;
    font-weight: bold;
}

.tab-label {
    flex-grow: 1;
}

/* CSS for the badge within the tab buttons */
.tab-button .badge {
    margin-left: 5px;
    margin-top: -25px; /* Adjusting for better positioning */
    font-size: 0.75em;
}

/* CSS for the close button */
.close-tab {
    margin-left: 5px;
    padding: 0 5px;
    border: none;
    border-radius: 50%;
    background-color: red;
    color: white;
    cursor: pointer;
}

.close-tab:hover {
    background-color: darkred;
}

/* CSS for the chat containers */
.chat-wrapper {
    display: none;
}

.chat-wrapper.active {
    display: block;
}

/* Ensure contact links have the correct cursor */
.contact-link {
    cursor: pointer;
}

.context-menu {
    position: absolute;
    z-index: 1000; /* Ensure it's above other elements */
    background: white; /* Background color */
    border: 1px solid #ccc; /* Border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Shadow for depth */
    border-radius: 4px; /* Rounded corners */
    padding: 0; /* Remove padding */
}

.context-menu ul {
    list-style: none; /* Remove bullet points */
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margin */
}

.context-menu .menu-item {
    padding: 8px 12px; /* Add padding for menu items */
    cursor: pointer; /* Pointer cursor */
}

.context-menu .menu-item:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

.context-menu .menu-item.disabled {
    color: #6c757d; /* Gray color */
    pointer-events: none; /* Prevent interaction */
    cursor: not-allowed; /* Change cursor to indicate non-interactivity */
    opacity: 0.65; /* Slightly fade the item */
}

/* Flex container for the checkboxes and labels */
.form-check-inline-container {
    display: flex;
    justify-content: flex-start; /* Left-align the entire group */
    gap: 10px; /* Space between each checkbox-container */
}

/* Stack label above checkbox and center them */
.checkbox-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Adjust the label positioning */
.checkbox-container .form-check-label {
    margin-bottom: 4px; /* Space between the label and checkbox */
    display: block;
    text-align: center;
}

.file-preview-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #d1f4cc;
    border-radius: 8px;
    max-width: 330px;
}

.file-preview-message .file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    font-size: 1.8em;
    line-height: 30px;
    display: inline-block;
    vertical-align: middle;
}

.file-preview-message .file-info .filename {
    margin-left: 10px;
    word-break: break-all;
}

.file-preview-message .download-link i {
    color: black;
    cursor: pointer;
    font-size: 2em;
    margin-left: 10px;
}

.file-preview-message .download-link:hover {
    color: #0056b3;
}

.image-preview {
    display: flex;
    border-radius: 8px;
    max-height: 150px;
    max-width: 150px;
    max-width: 100%; /* Ensure the image doesn't overflow the container */
    margin-top: 5px; /* Add some spacing between username and image */
    transition: transform 0.2s ease-in-out;
}

.drag-over {
    border: 2px dashed #007bff; /* Highlight drop target */
}

/* File preview box in message input */
.file-preview-input {
    width: 52px;
    height: 52px;
    border: 1px solid gray;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
    position: relative;
    padding: 5px;
    box-sizing: border-box;
    vertical-align: middle;
}

.file-preview-input.active {
    border: 2px solid green;
}

.file-preview-input img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.bs-card-header {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 1px solid #dee2e6; /* Add a subtle border like Bootstrap */
    padding: 0.75rem 1.25rem; /* Bootstrap's default padding */
}

.bs-card-title {
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
}

@media (max-width: 576px) {
    .navbar-badge {
        top: 35%;
        right: auto;
        left: 12px;
        transform: translateY(-50%);
    }
}

@media (max-width: 576px) {
    h1, h3 {
        font-size: 1.2rem; /* Adjust for better readability on small screens */
    }

    .small-box {
        padding: 0.5rem; /* Reduce padding in small boxes */
    }

    .card {
        margin-bottom: 1rem; /* Add some breathing space between cards */
    }

    #card-body {
        max-height: 300px; /* Ensure chat section doesn't take up too much space */
    }
}