/* Heading Styles */
h1, h2, h3 {
    font-family: 'Inter', sans-serif; /* Keep font consistent */
    font-weight: 500; /* Slightly lighter than bold (default is 700) */
    -webkit-font-smoothing: antialiased; /* Smooth rendering in Safari */
    -moz-osx-font-smoothing: grayscale; /* Better rendering on macOS */
}

/* Specific size and style adjustments */
h1 {
    font-size: 28px;
    font-weight: 500;
    margin-top: 0px;
}

h2 {
    font-size: 24px;
    font-weight: 500;
    margin-top: 0px;
}

h3 {
    font-size: 20px;
    font-weight: 500;
    margin-top: 0px;
}

.title-link {
    font-size: 20px;
    font-weight: 500;
    margin-top: 0px;
    text-decoration: none;
    color: #1e88e5 !important;
}

.title-link a:hover {
    text-decoration: underline;
    color: #42a5f5 !important;

}

/* DataTables Header Text */
table.dataTable thead th {
    font-family: 'Inter', sans-serif; /* Ensure consistency */
    font-weight: 500; /* Slightly lighter than bold */
    -webkit-font-smoothing: antialiased; /* Smooth rendering in Safari */
    -moz-osx-font-smoothing: grayscale; /* Better rendering on macOS */
    font-size: 15px; /* Adjust size if needed */
    color: #1e88e5; /* Keep your existing color */
}

/* Custom Field Title */
.field-title {
    font-family: 'Inter', sans-serif; /* Keep consistent with rest of text */
    font-weight: 500; /* Slightly lighter than bold */
    -webkit-font-smoothing: antialiased; /* Smooth rendering for Safari */
    -moz-osx-font-smoothing: grayscale; /* Better rendering on macOS */
    font-size: 15px; /* Slightly larger than table headers */
    /*color: #1e88e5;*/ /* Maintain existing color */
    font-weight: bolder;
    text-align: left;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* General Settings */
body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #121212;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
}

a {
    color: #42a5f5;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    text-decoration: underline;
    color: #1e88e5;
    outline: none;
}

h1, h2 {
    /*color: #1e88e5;*/
    color: black;
}

h3 {
    color: #000000;
}

/* Layout */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    position: fixed;
    width: 200px;
    height: 100%;
    color: #ffffff;
    background-color: black;
    padding: 0px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.7);
    transform: translateX(-220px); /* Hidden by default */
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.active {
    transform: translateX(0); /* Slide in when active */
}

.toggle-btn {
    position: fixed;
    top: 0px;
    left: 0px;
    color: white;
    background-color: black;
    font-size: 24px;
    padding: 5px;
    border-radius: 0px;
    cursor: pointer;
    z-index: 1100;
}

.toggle-btn:hover {
    color: black;
    background-color: white;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: #fff;
    background-color: black;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 15px;
    display: block;
    border-radius: 0px;
    transition: background-color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: #1e88e5 !important;
    color: white !important; /* White text on hover */
}

.sidebar-footer {
    font-size: 13px;
    text-align: center;
    margin-bottom: 20px !important;
}

.main-content {
    flex-grow: 1;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
    margin-left: 10px;
    overflow-y: auto;
    margin-bottom: 40px;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
    background-color: #ffffff;
    color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    text-align: left;
    margin-top: 2px;
}

/* Forms */
.form-container-top-blocks {
    max-width: 100% !important;
}

/*
.form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
*/

.form-container h1 {
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 24px;
}

.form-container label {
    margin-bottom: 0px;
}

/* Input Fields */
.form-container input,
.form-container textarea,
.form-container select {
    padding: 10px;
    border-width: 0px;
    box-shadow: 0 0 5px lightgray;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2c2c2c;
    width: calc(100% - 0px); /* Adjust width to account for padding */
    margin: 0 auto; /* Center horizontally */
    display: block; /* Ensure it respects margin:auto */
    box-sizing: border-box; /* Include padding and border in width */
    font-size: 15px;
    font-weight: normal;
}

.form-container input:focus,
.form-container textarea:focus,
.form-container select:focus {
    outline: none;
    border-color: #42a5f5;
    box-shadow: 0 0 5px #42a5f5;
}

/* Button Styles */
.form-container button {
    padding: 12px;
    background-color: #42a5f5;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%; /* Make buttons full width */
    box-sizing: border-box; /* Consistency with input fields */
}

.form-container button:hover {
    background-color: #1e88e5; /* Darker shade on hover */
}

.form-container button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.files-page button {
    padding: 12px;
    background-color: #42a5f5;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-sizing: border-box; /* Consistency with input fields */
    height: 40px;
}

.files-page button:hover {
    background-color: #1e88e5; /* Darker shade on hover */
}

.files-page input,
.files-page textarea,
.files-page select {
    padding: 10px;
    border-width: 0px;
    box-shadow: 0 0 5px lightgray;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2c2c2c;
    box-sizing: border-box; /* Include padding and border in width */
    font-size: 15px;
    font-weight: normal;
}

/* Adjust width for buttons in table cells */
#ticketsTable button {
    width: auto; /* Override full width for table buttons */
    padding: 6px 12px; /* Slightly smaller padding for table buttons */
}

/* Flash Messages */
.flash {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    animation: fadeIn 0.5s ease;
}

.flash.success {
    background-color: #0CAA0A;
    color: #ffffff;
}

.flash.danger {
    background-color: #CE1F12;
    color: #ffffff;
}

.flash.warning {
    background-color: #0B55F0;
    color: #ffffff;
}

/* Ticket Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th, table td {
    padding: 10px;
    text-align: left;
    /*border-bottom: 1px solid #444;*/
}

table th {
    background-color: #ffffff;
    /*color: #1e88e5;*/
    color: #000000;
}

table input, table select {
    padding: 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #fff;
    color: #2c2c2c;
}

table button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

table button:hover {
    background-color: #1e88e5;
}

/* Buttons and Inputs Enhancements */
.btn-primary {
    padding: 10px 20px;
    background-color: #42a5f5;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #1e88e5;
}

.input-field {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2c2c2c;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 5px #42a5f5;
    outline: none;
}

/* Avatar Styles */
.site-avatar {
    margin: 20px;
    max-width: 100px;          /* Sets a maximum width */
    height: auto;              /* Maintains aspect ratio */
    border-radius: 50%;        /* Makes the avatar circular */
    text-align: left;
}

/* Ticketing DataTables Styles */
.dt-buttons button.dt-button {
    background-color: transparent !important;
    color: black !important;
    border: 1px solid black !important;
    padding: 10px 10px !important;
    margin-right: 5px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
    font-weight: 500 !important;
}

.dt-buttons button.dt-button:hover {
    border: 1px solid #42a5f5 !important;
}

div.dataTables_filter input {
    background-color: #ffffff !important;
    color: #2c2c2c !important;
    border: 1px solid #444 !important;
    border-radius: 4px !important;
    padding: 5px 10px !important;
}

div.dataTables_filter label::before {
    content: '\1F50D'; /* Unicode for search icon */
    font-size: 15px;
    margin-right: 5px;
}

div.dataTables_filter label {
    display: flex !important;
    align-items: center !important;;
}

.tickets-banner {
    color: white;
    background-color: green;
    padding-left: 5px;
}

/* Table Row Hover */
table.dataTable tbody tr:hover {
    /*background-color: #333333 !important;*/
    /*background-color: #121212 !important;*/
    background-color: #1e88e5 !important;
    color: white !important;
}

/* Flexbox container for alignment */
div.top {
    display: flex;
    align-items: center; /* Vertically center all elements */
    gap: 10px;           /* Adds spacing between elements */
}

/* Target the dropdown itself, not the label text */
div.dataTables_length select {
    padding-left: 15px;  /* Add padding before dropdown */
    padding-right: 15px; /* Add padding after dropdown */
    margin-left: 5px;    /* Small gap from the "Show" text */
    margin-right: 5px;   /* Small gap before the "entries" text */
    color: inherit;      /* Inherit the body font color */
    background-color: transparent; /* Optional: Transparent background */
    border: 1px solid #ccc; /* Optional: Subtle border for clarity */
}

/* Buttons alignment */
div.dt-buttons {
    display: flex;
    align-items: center;
    padding: 0; /* Remove padding offsets */
}

/* Search box alignment */
div.dataTables_filter {
    display: flex;
    align-items: center;
    margin-bottom: 0; /* Remove bottom margin */
}

/* Push search box to the right */
.search-box {
    margin-left: auto;
}

/* Dropdown focus and hover states (optional) */
div.dataTables_length select:focus,
div.dataTables_length select:hover {
    outline: none;
    border-color: #007bff; /* Highlight border on focus */
}

/* Height of "Actions taken" */
textarea {
    font-family: 'Inter', sans-serif; /* Match other text elements */
    height: 120px;
    width: 100%;
    resize: vertical; /* Allows vertical resizing only */
}

.top-container {
    /* Moved on top of each other */
    /***display: flex;***/ /* Use flexbox for horizontal layout */
    gap: 20px; /* Spacing between elements */
    margin-top: 0px; /* Top margin */
}

.new-ticket {
    width: 100%;
}

/* Right side is now below the left side */
.right-side {
    width: 100%;
}

.right-side form {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Stretch form to fill parent */
    min-height: 100%; /* Ensure form takes full height */
    width: 100%;
}

.right-side textarea {
    flex-grow: 1; /* Allow textarea to expand and take remaining space */
    margin-bottom: 0px; /* Ensure spacing before the button */
    width: 100%;
}

.right-side button {
    margin-top: auto; /* Push button to the bottom */
    width: 100%;
}

.edit-page-readonly-subtitle {
    /*color: #ffc107;*/
    /*color: #2c2c2c;*/
    color: #1e88e5;
    font-weight: 500;
}

/* Override the selected row style */
table.dataTable tbody tr.selected {
    /*background-color: #121212 !important;*/ /* Match hover color */
    background-color: #1e88e5 !important;
    color: white !important; /* Match hover text color */
}

/* Optional: Add a border instead of background change */
table.dataTable tbody tr.selected {
    border: 1px solid #42a5f5 !important; /* Subtle border instead */
    background-color: inherit !important; /* No background change */
}

/* Remove borders between rows */
table.dataTable tbody tr {
    border-bottom: none !important; /* Removes the bottom border between rows */
}

/* Optional: Remove borders from table cells if needed */
table.dataTable tbody td,
table.dataTable thead th {
    border: none !important; /* Removes borders around cells */
}

/* Optional: Remove the top border for the table header */
table.dataTable thead th {
    border-top: none !important;
}

/* Set odd rows to light gray */
table.dataTable tbody tr:nth-child(odd) {
    background-color: #f2f2f2 !important; /* Light gray */
}

/* Make even rows inherit the page background */
table.dataTable tbody tr:nth-child(even) {
    background-color: inherit !important; /* Match the page background */
}

/* Optional: Add hover effect */
table.dataTable tbody tr:hover {
    /*background-color: #121212 !important;*/ /* Black on hover */
    background-color: #fef9e7 !important;
    color: black !important; /* White text on hover */
}

.status-link {
    color: #1e88e5;
    text-decoration: none;
}

.status-link:hover {
    text-decoration: underline;
    color: #42a5f5;
}

p {
    margin-top: 0px;
    margin-bottom: 0px;
}

/* Truncate content in column 8 */
table.dataTable td:nth-child(9) { /* Column index is 9 (1-based indexing in CSS) */
    overflow: hidden;          /* Hide overflow */
    text-overflow: ellipsis;   /* Show '...' for overflowed text */
    white-space: nowrap;       /* Keep text in a single line */
    max-width: 100px;           /* Match the specified column width */
}

/* Color tag background styles */
.colortag-0 { background-color: transparent; color: black;}
.colortag-1 { background-color: black; color: white; }
.colortag-2 { background-color: #6A381B; color: white; }
.colortag-3 { background-color: #CE1F12; color: white; }
.colortag-4 { background-color: #FF7F06; color: black; }
.colortag-5 { background-color: #F6BC09; color: black; }
.colortag-6 { background-color: #0CAA0A; color: black; }
.colortag-7 { background-color: #0B55F0; color: white; }
.colortag-8 { background-color: #B02CFF; color: black; }
.colortag-9 { background-color: #D4D4D4; color: black; }

.colortag a {
    color: inherit; /* Inherit the parent color */
    text-decoration: none; /* Remove underline */
}

td.colortag { text-align: center; padding: 5px; border-radius: 5px; }

.status-open {
    background-color: #FF7F06;
    color: black;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}
.status-escalated {
    background-color: #CE1F12;
    color: white;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}
.status-ongoing {
    background-color: #0CAA0A;
    color: white;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}
.status-on-hold {
    background-color: #F6BC09;
    color: black;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}
.status-closed {
    background-color: #D4D4D4;
    color: black;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}
.status-archived {
    background-color: black;
    color: white;
    border-radius: 5px;
    padding: 2px 5px 2px 5px;
    font-weight: 600;
}

.status-open:hover {
    color: black;
}
.status-escalated:hover {
    color: white;
}
.status-ongoing:hover {
    color: white;
}
.status-on-hold:hover {
    color: black;
}
.status-closed:hover {
    color: white;
}
.status-archived:hover {
    color: white;
}

.truncate-email-addr-cell {
    white-space: nowrap;       /* Prevent text from wrapping */
    overflow: hidden;          /* Hide overflowed text */
    text-overflow: ellipsis;   /* Display ellipsis for overflowed text */
    max-width: 120px;          /* Set a maximum width for the cell */
}

.dt-body-right {
    text-align: right;
}

.dt-button {
    margin-top: 5px;
    height: 40px;
}

button.dt-button {
    border: 1px solid black !important;
    color: black !important;
}

button.dt-button:hover {
    color: black !important;
    /*border: 1px solid #1e88e5 !important;*/
    border: 1px solid #42a5f5 !important;
}

button.dt-button.active {
    background: green !important;
    color: white !important;
}

/* Default state: black background while loading */
body {
    visibility: hidden;
    opacity: 0;
}

/* When the theme is ready, make the body visible */
body.theme-ready {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.05s;
}

.filter-color-tag {
    background-color: white;
    color: black;
}

.theme-button-light {
    background-color: white !important;
    color: lightgray !important;
    border: none;
}

.theme-button-light:hover {
    color: darkorange !important;
}

.theme-button-dark {
    background-color: white !important;
    color: lightgray !important;
    border: none;
}

.theme-button-dark:hover {
    color: #1e88e5 !important;
}

.delete-button {
    background-color: red !important;
    color: white !important;
}

.delete-button:hover {
    background-color: pink !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logged_in_as_label {
    margin-bottom: 10px !important;
    text-decoration: none;
}

.logged_in_as_email {
    color: #1e88e5;
    text-decoration: none;
}

.status-selection-dropdown {
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
}

button.dt-button.active {
    background: green !important;
    color: white !important;
}
