:root {
    --primary: #1e313e;
    --secondary: #a6bebe;
    --accent: #c69b63;
    --off-white-100: #ffffff;
    --off-white-200: #f8f9fa;
    --off-white-300: #f1f3f5;
}

@media print {
    /* Hide everything except the content being printed */
    body * {
        visibility: hidden;
    }

    .content-to-print,
    .content-to-print * {
        visibility: visible;
    }

    .content-to-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%; /* Ensure it takes up the full height */
        margin: 0; /* Remove any margins */
        padding: 0; /* Remove any padding */
        box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    }
    /* Hide any elements you don't want to print */
    .actions,
    .no-print {
        display: none !important;
    }
}

.a-bar {
    display: flex;
    gap: 10px;
}

.a-bar .centered {
    margin: auto;
}

.a-bar .active {
    font-weight: bold;
}

.a-bar a:not(:last-child)::after {
    content: "|";
    margin-left: 10px;
    color: #ccc; /* or any color you prefer */
}

/* Miligram overrides */
button,
.button {
    background-color: var(--primary);
    border-color: var(--primary);
}

button:hover,
.button:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

button.outline,
.button.outline {
    color: var(--primary);
    border-color: var(--primary);
}

button.outline:hover,
.button.outline:hover {
    color: var(--accent);
    border-color: var(--accent);
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin-top: 60px;
    font-weight: 400;
    background: var(--off-white-300);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0; /* Reset margin */
    padding-top: 60px; /* Replace margin-top with padding-top */
}

main.main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0; /* Prevents the footer from shrinking */
    padding: 20px;
    margin-top: auto;
}

img.tdimage {
    width: 20px;
    vertical-align: text-bottom;
}

.top-nav-links,
.side-nav,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Raleway", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    color: var(--primary);
}

a {
    color: var(--primary);
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;
}

a:hover,
a:focus,
a:active {
    filter: brightness(110%);
    -webkit-transition: all 0.2s easeout;
    transition: all 0.2s ease-out;
    text-decoration: underline;
}

.side-nav a,
.top-nav-links a,
th a {
    color: var(--primary);
}

.side-nav a:hover,
.side-nav a:focus,
.actions a:hover,
.actions a:focus {
    color: var(--accent);
}

/* Utility */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Main */
.content {
    padding: 2rem;
    background: var(--off-white-100);
    border-radius: 0.4rem;
    /* position: relative; */
    box-shadow:
        0 7px 14px 0 rgba(30, 49, 62, 0.1),
        0 3px 6px 0 rgba(0, 0, 0, 0.07);
}

.actions a {
    font-weight: bold;
    padding: 0 0.4rem;
}

th {
    white-space: nowrap;
}

/* Nav bar */
.top-nav {
    margin: 0 auto;
    height: 130px;
    max-width: 112rem;
    padding: 2rem;
    margin: 0 auto;
}

.top-nav-title a {
    font-size: 2.4rem;
    color: var(--accent);
}

.top-nav-title span {
    color: var(--primary);
}

.top-nav-links a {
    margin: 0 0.5rem;
}

.top-nav-title a,
.top-nav-links a {
    font-weight: bold;
}

.side-nav-item {
    display: block;
    padding: 0.5rem 0;
}

/* View action */
.view.content .text {
    margin-top: 1.2rem;
}

.related {
    margin-top: 2rem;
}

/* Flash messages */
.message {
    padding: 1rem;
    background: var(--off-white-200);
    color: var(--primary);
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    margin-bottom: 2rem;

    /* New positioning styles */
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 300px;
    width: 80%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Animation properties */
    animation:
        slideIn 0.5s ease forwards,
        fadeOut 0.5s ease 10s forwards;
}

.message-sender {
    padding: 1rem;
    background: var(--off-white-200);
    color: var(--primary);
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    margin-bottom: 2rem;
}
.message-recipient {
    padding: 1rem;
    background: var(--off-white-200);
    color: var(--primary);
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    margin-bottom: 2rem;
}

@keyframes slideIn {
    0% {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
}

.message.hidden {
    display: none;
}

.message.success {
    background: var(--secondary);
    color: var(--primary);
}

.message.warning {
    background: #fffabc;
    color: var(--primary);
}

.message.error {
    background: #fcebea;
    color: var(--primary);
}

/* Forms */
.input.radio,
.input.checkbox {
    margin-bottom: 2rem;
}

.input.radio input,
.input.checkbox input {
    margin: 0;
}

.input.radio label,
.input.checkbox label {
    margin: 0;
    display: flex;
    align-items: center;
}

.input.radio label > input,
.input.checkbox label > input {
    margin-right: 1rem;
}

.input.radio label:first-of-type {
    margin-bottom: 2rem;
}

/* Form inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    background-color: var(--off-white-100);
    border: 1px solid var(--primary);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
}

/* Paginator */
.paginator {
    text-align: right;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.pagination li {
    margin: 0 0.5rem;
}

.prev.disabled a,
.next.disabled a {
    cursor: not-allowed;
    color: var(--secondary);
}

.asc:after {
    content: " \2193";
}

.desc:after {
    content: " \2191";
}

/* Error */
.error-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
}

/* Tables */
tr:nth-child(even) {
    background-color: var(--off-white-200);
}

/* Card or panel backgrounds */
.card,
.panel {
    background: var(--off-white-100);
}

@media screen and (max-width: 640px) {
    .top-nav {
        margin: 0 auto;
    }
    .side-nav {
        margin-bottom: 1rem;
    }
    .heading {
        margin-bottom: 1rem;
    }
    .side-nav-item {
        display: inline;
        margin: 0 1.5rem 0 0;
    }
    .asc:after {
        content: " \2192";
    }
    .desc:after {
        content: " \2190";
    }
}

.container {
    max-width: 100%;
    padding: 16px;
}
.actions:not(th) {
    position: relative;
}

.actions:not(th):before {
    content: "☰";
    cursor: pointer;
    padding: 5px 10px;
    background: #eee;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline-block;
}

.actions:not(th) .context-menu-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 120px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.actions:not(th).show .context-menu-content {
    display: block;
}

.actions:not(th) .context-menu-content > a,
.actions:not(th) .context-menu-content > form {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.actions:not(th) .context-menu-content > a:hover,
.actions:not(th) .context-menu-content > form:hover {
    background-color: #f1f1f1;
}

.actions:not(th) .context-menu-content > a[href*="reactivate"],
.actions:not(th) .context-menu-content > form[action*="reactivate"] {
    color: green;
}

.actions:not(th) .context-menu-content > a[href*="deactivate"],
.actions:not(th) .context-menu-content > form[action*="deactivate"] {
    color: red;
}

.hidden {
    display: none;
}

.lytics {
    background-color: #efd9bb;
    border: 1px solid #c69b63;
    border-radius: 4px;
    padding: 10px;
}

.table-export-container {
    margin-bottom: 1rem;
    text-align: right;
}

.export-btn {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}

/* Hide export button when printing */
@media print {
    .table-export-container {
        display: none !important;
    }
}

.collapsible-table tr.hidden-row {
    display: none;
}

.show-more-btn {
    background-color: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 5px 10px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.show-more-btn:hover {
    background-color: var(--accent);
    color: white;
}

.table-wrapper {
    position: relative;
}

.table-scroll-container {
    flex: 1;
    overflow-y: scroll;
    /* Add some space between header and table */
    margin-top: 10px;
    /* Optional: adds a subtle scrollbar track */
    /* Optional: rounds the corners of the scroll area */
    border-radius: 4px;
}

/* Optional: Customize the scrollbar */
.table-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure the table takes up the full width of the container */
.table-scroll-container table {
    width: 100%;
}

.lyticscard {
    margin-top: 16px;
}

.lytics-body {
    max-height: 400px;
    overflow-y: clip;
}
