/* ================= GENERAL STYLES ================= */
body {
    font-family: var(--bs-body-font-family), "Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f4f4f9;
}

/* ================= BUTTONS ================= */
.btn {
    padding: 8px 12px;
    text-decoration: none;
    color: #fff;
    background-color: #007bff;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease-in-out, transform 0.2s;
}

.btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* ================= CARDS ================= */
.card {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out, transform 0.2s;
}

.card h3 {
    margin-top: 0;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
/*    transform: scale(1.02); */
}

/* ================= FORM ELEMENTS ================= */
form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

label:not(.form-check-label) {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea, 
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Prevents checkboxes/radio buttons from inheriting 100% width or collapsing */
input[type="checkbox"]:not(.form-check-input), 
input[type="radio"]:not(.form-check-input) {
    width: auto;
    vertical-align: middle;
    margin-right: 5px;
}

/* ================= FIELDSETS ================= */
fieldset {
	margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 10px;
}

/* ================= BUTTON CONTAINERS ================= */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.button-container a {
    flex-grow: 1;
    max-width: 200px;
    text-align: center;
}

.button-container button {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out;
}

.button-container button:hover {
    background-color: #0056b3;
}
/* ================= TOP NAVIGATION BAR ================= */
.top-bar {
    display: flex;
    justify-content: space-between; /* Ensures left and right elements */
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 20px;
}

.top-bar-links {
    margin-left: auto; /* Pushes the buttons to the right */
    display: flex;
    gap: 10px;
}

.top-link {
    text-decoration: none;
    color: #fff !important; /* Ensures white text */
    font-weight: bold;
    padding: 8px 12px;
    background-color: #007bff;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s ease-in-out, transform 0.2s;
}

.top-link:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* ================= LOGIN FORM ================= */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.login-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
}

.form-group input[type="email"], 
.form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.error {
    color: red;
    margin-bottom: 15px;
    text-align: center;
}

/* ================= DROPDOWN STYLES ================= */
.dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}

/* ================= RESPONSIVE DESIGN ================= */

/* Tablet Styles (up to 768px) */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    h1 {
        font-size: 20px;
    }

    input[type="text"], select, textarea {
        font-size: 14px;
    }

    /* Stack buttons on smaller screens */
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .button-group a {
        flex: 1 1 100%;
    }
}

/* Mobile Styles (up to 600px) */
@media screen and (max-width: 600px) {
    input[type="text"], select, textarea {
        width: 100%;
        font-size: 14px;
        padding: 8px;
    }

    /* Adjust fieldset padding */
    fieldset {
        padding: 8px;
    }

    /* Stack Chat Distribution Fields */
    .chat-distribution {
        display: flex;
        flex-direction: column;
    }

    .chat-distribution select,
    .chat-distribution input {
        width: 100%;
    }

    /* Ensure buttons stack properly */
    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .button-group a {
        flex: 1 1 100%;
    }
}

/* CSS */
.button-2 {
  background-color: rgba(51, 51, 51, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2); /* Light black border */
  color: #333333;
  cursor: pointer;
  display: inline-block;
  font-family: "Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  text-align: center;
  transition: all 200ms;
  vertical-align: baseline;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-2:hover {
  background-color: rgba(51, 51, 51, 0.15); /* Slightly darker background */
  border-color: rgba(0, 0, 0, 0.4); /* Darker border */
  transform: scale(1.05); /* Subtle scaling effect */
  cursor: pointer;

}

.inline-label {
    display: flex;
    align-items: center;
    gap: 5px; /* Adjust spacing as needed */
}

.inline-label label {
    margin: 0; /* Remove any margin that might be pushing the checkbox */
    display: inline-block; /* Ensure label behaves properly */
    line-height: 1.2; /* Adjusts alignment consistency */
}

.inline-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1); /* Ensures proper alignment */
}

.styled-table {
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9em;
    font-family: sans-serif;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}


.styled-table thead tr {
    background-color: #007bff;
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 10px 10px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 1px solid #007bff;
}

.styled-table tbody tr.active-row {
    font-weight: bold;
    color: #007bff;
}

.styled-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.2); /* Light blue background */
    transition: background-color 0.3s ease-in-out;
}


/* ================= LOGIN FORM CHECKBOX ALIGNMENT ================= */
.show-password-container, 
.remember-me-container { 
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 5px !important;
}

.show-password-container input[type="checkbox"], 
.remember-me-container input[type="checkbox"] { 
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Ensuring perfect alignment for inline checkboxes */
.inline-label {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.inline-label label {
    margin: 0 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
}

.inline-label input[type="checkbox"] {
    margin: 0 !important;
    transform: scale(1) !important;
    vertical-align: middle !important;
}

/* ================= LOGIN FORM STYLING ================= */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.login-container h1 {
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

/* ================= ENSURE .submissionsTable_length WIDTH ================= */
.submissionsTable_length {
    width: 55px !important;
}

.error {
    background-color: #ffdddd;
    color: #d8000c;
    border: 1px solid #d8000c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}