/* Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Menlo */
@font-face {
    font-family: 'Menlo Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Menlo Regular'), url('../fonts/Menlo-Regular.woff') format('woff');
}

:root {

    /* Fonts */
    --ff-primary: 'Inter', sans-serif;

    /* Font weights */
    --fw-regular: 400;
    --fw-semi-bold: 500;
    --fw-bold: 700;
    --fw-black: 900;

    /* Font Sizes */
    --fs-xs: 0.7125rem;  /* Extra Small */
    --fs-sm: 0.75rem;    /* Small */
    --fs-md: 0.8125rem;   /* Medium */
    --fs-base: 0.875rem;  /* Base */
    --fs-lg: 1rem;       /* Large */
    --fs-xl: 1.5rem;     /* Extra Large */
    --fs-2xl: 2rem;      /* 2X Large */
    --fs-3xl: 3rem;      /* 3X Large */
    --fs-4xl: 4rem;      /* 4X Large */

    --fs-body: var(--fs-base);
    --fs-primary-heading: var(--fs-xl);
    --fs-secondary-heading: var(--fs-lg);
    --fs-button: var(--fs-md);

    /* Colors */
    --col-primary: #FF312E;

    --col-white: #FFF;
    --col-grey: #46505e;
    --col-lightgrey: #9CA1B8;

    --col-premium: #0075F2;
    --col-sponsor: #F49D37;

    --col-bg-darker: #090c10;
    --col-bg: #161B22;
    --col-bg-lighter: #313842;

    --col-steam: #4DAEF8;

    --col-discord: #536BF2;

    --col-reddit: #FF4500;

    --col-vote: #5BC236;

}

/* Reset begin */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin */
* {
    margin: 0;
    padding: 0;
    font: inherit;
}

/* Remove list styles on ul, ol elements */
ul[role='list'],
ol[role='list'],
ul {
    list-style: none;
}

ul {
    display: flex;
    gap: 0.5rem;
}


/* Set core root default */
html:focus-within {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

    font-family: 'Inter', sans-serif;
}

main {
    flex: 1;
    margin-block: 2rem;
}

/* Set core body defaults */
body {
    text-rendering: optimizeSpeed;

    display: flex;
    flex-direction: column;

    background:var(--col-bg-darker);
}

/* Make images easier to work with */
img,
picture,
svg {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    transition: 250ms ease-in-out;
}

/* Remove all animations, transitions and smoothing if the user prefers none */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

a {
    color: white;
    text-decoration: none;
    transition: 250ms ease-in-out;
}

a:hover {
    color: white;
}

/* Reset end */

.container {
    --max-width: 1200px;
    --padding: 2rem;

    width: min(var(--max-width), 100% - var(--padding) * 2);
    margin-inline: auto;

    position: relative;
}

.w-100 {
    width: 100%;
}

.fw-regular {
    font-weight: var(--fw-regular);
}

.fw-semi-bold {
    font-weight: var(--fw-semi-bold);
}

.fw-bold {
    font-weight: var(--fw-bold);
}

.fw-black {
    font-weight: var(--fw-black);
}

.fs-xs {
    font-size: var(--fs-xs);
}

.fs-sm {
    font-size: var(--fs-sm);
}

.fs-md {
    font-size: var(--fs-md);
}

.fs-base {
    font-size: var(--fs-base);
}

.fs-lg {
    font-size: var(--fs-lg);
}

.fs-xl {
    font-size: var(--fs-xl);
}

.fs-2xl {
    font-size: var(--fs-2xl);
}

.fs-3xl {
    font-size: var(--fs-3xl);
    line-height: 3rem;
}

.fs-4xl {
    font-size: var(--fs-4xl);
}

.ff-primary {
    font-family: var(--ff-primary), sans-serif;
}

.col-primary {
    color: var(--col-primary);
}

.col-white {
    color: var(--col-white);
}

.col-grey {
    color: var(--col-grey);
}

.col-lightgrey {
    color: var(--col-lightgrey);
}

.col-bg-darker {
    color: var(--col-bg-darker);
}

.col-bg {
    color: var(--col-bg);
}

.col-bg-lighter {
    color: var(--col-bg-lighter);
}

.col-premium {
    color: var(--col-premium) !important;
}

.col-sponsor {
    color: var(--col-sponsor) !important;
}

.col-steam {
    color: var(--col-steam);
}

@media (max-width: 50em) {
    .hide-on-sm {
        display: none !important;
    }

    .show-on-sm {
        display: block !important;
    }
}

@media (min-width: 50em) {
    .hide-on-lg {
        display: none !important;
    }

    .show-on-lg {
        display: block !important;
    }
}

input::placeholder {
    font-family: var(--ff-primary), sans-serif;
    color: var(--col-lightgrey);
}

textarea:focus, input:focus, select:focus {
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border: 1px solid var(--col-lightgrey) !important;
}

.form {
    display: flex;
    flex-direction: column;
    font-size: var(--fs-base);
}

.form-section {

    padding: 2rem;
    border: 1px solid var(--col-bg-lighter);
    border-radius: 0.25rem;

    display: flex;
    flex-direction: column;
}

input, textarea, select {
    line-height: 2.2rem !important;
}

.form > label {
    font-weight: var(--fw-bold);
}

.form .button {
    margin: 1rem 0;
}

input[type="text"], input[type="url"], input[type="file"], input[type="password"], textarea, select {
    background-color: var(--col-bg-darker);
    color: var(--col-white);
    border-radius: 0.25rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--col-bg-lighter);
    font-family: var(--ff-primary), sans-serif;
}

fieldset {
    border-radius: 0.25rem;
    color: var(--col-lightgrey);
    border-color: var(--col-bg);
    padding: 1rem;
}

fieldset input,
fieldset textarea {
    width: 100%;
    margin-block: 1rem;
}

.code-block {
    background: var(--col-bg-darker);
    color: var(--col-lightgrey);
    padding: 1rem;
    border-radius: 0.25rem;
    font-family: "Menlo Regular", sans-serif;
}

.flex {
    display: flex;
}

.flex-start {
    justify-content: flex-start;
}

.flex-row {
    flex-direction: row;
}

@media (min-width: 50em) {
    .flex-row-on-lg {
        flex-direction: row;
    }
}

.flex-column {
    flex-direction: column;
}

@media (max-width: 50em) {
    .flex-column-on-sm {
        flex-direction: column;
    }
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-center {
    justify-content: center;
}


.justify-content-space-between {
    justify-content: space-between;
}

.gap-025 {
    gap: 0.25rem;
}

.gap-05 {
    gap: 0.5rem;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.gap-3 {
    gap: 3rem;
}

.gap-4 {
    gap: 4rem;
}

.align-items-center {
    align-items: center;
}

.align-items-flex-end {
    align-items: flex-end;
}

.align-self-flex-end {
    align-self: flex-end;
}

.img-xs {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 0.25rem;
}

.img-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 0.25rem;
}

.img-md {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 0.25rem;
}

.text-center {
    text-align: center;
}

@media (max-width: 50em) {
    .text-center-on-sm {
        text-align: center;
    }
}

.line-height-1 {
    line-height: 1rem;
}

.line-height-2 {
    line-height: 2rem;
}

.tag {
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: var(--fs-xs);

    display: flex;
    align-self: flex-start;
    gap: 0.25rem;
    align-items: center;
}

.recommended {
    color: #2C5000;
    background: #C0DD78;
}

.notice {
    color: #A17300;
    background: #FBEEB2;
}

.premium {
    color: #001d3b;
    background: var(--col-premium);
}

.notice-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;

    color: #5e4100;
    background: #F1C666;
    border-radius: 0.25rem;
    padding: 1rem 1rem;
}

.discord-user-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--col-bg-lighter);
    border-radius: 0.25rem;
    padding: 1rem;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.button {

    /* Configuration */
    --button-padding: 1rem 1.5rem;
    --button-gap: 0.5em;
    --button-bg: transparent;
    --button-color: var(--col-lightgrey);
    --button-hover-bg: transparent;
    --button-hover-color: #ffffff;
    --button-hover-border: var(--col-bg-lighter);
    --button-border-width: 1px;
    --button-border-style: solid;
    --button-border-color: var(--col-bg-lighter);
    --button-radius: 0.25rem;

    --button-font-size: var(--fs-xs);

    /* Layout and spacing */
    display: inline-flex;
    align-items: center;
    gap: var(--button-gap);
    padding: var(--button-padding);

    /* Colours */
    background: var(--button-bg);
    color: var(--button-color);

    /* Stroke and radius */
    border-width: var(--button-border-width);
    border-style: var(--button-border-style);
    border-color: var(--button-border-color);
    border-radius: var(--button-radius);

    /* Typography */
    text-decoration: none;
    font-weight: var(--fw-semi-bold);
    font-size: var(--button-font-size);
    letter-spacing: 0.05ch;
    font-family: var(--ff-primary), sans-serif;
    line-height: 1.1;

    /* Interactive */
    cursor: pointer;

    transition: 250ms ease;
}

.button-disabled {
    cursor: not-allowed;
    --button-hover-color: var(--button-color);
}

.button-disabled:hover {
    box-shadow: none !important;
}

.button-steam {
    --button-bg: var(--col-steam);
    --button-color: var(--col-white);
    --button-border-color: var(--col-steam);
    --button-font-size: var(--fs-md);
}

.button-discord {
    --button-bg: var(--col-discord);
    --button-color: var(--col-white);
    --button-border-color: var(--col-discord);
    --button-font-size: var(--fs-sm);
}

.button-reddit {
    --button-bg: var(--col-reddit);
    --button-color: var(--col-white);
    --button-border-color: var(--col-reddit);
    --button-font-size: var(--fs-sm);
}

.button-vote {
    --button-bg: var(--col-vote);
    --button-color: var(--col-white);
    --button-border-color: var(--col-vote);
    --button-font-size: var(--fs-sm);
}

.button-premium {
    --button-bg: var(--col-premium);
    --button-color: var(--col-white);
    --button-border-color: var(--col-premium);
    --button-font-size: var(--fs-md);
}

.button-sponsor {
    --button-bg: var(--col-sponsor);
    --button-color: var(--col-bg);
    --button-border-color: var(--col-sponsor);
    --button-font-size: var(--fs-md);
}

.bottom-stick {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-top: 1px solid var(--col-bg-lighter);
    padding: 1rem;
    background: var(--col-bg);
}

.tooltip-wrapper {
    position: relative;
    overflow: visible !important;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-title); /* Use data-title attribute */
    position: absolute;
    bottom: 125%; /* Position above the element */
    left: 50%;
    transform: translateX(-50%); /* Center horizontally */
    background-color: var(--col-bg-darker);
    color: var(--col-lightgrey);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap; /* Prevent text wrapping */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000; /* Ensure tooltip is above other content */
    font-size: var(--fs-sm) !important;
    font-weight: var(--fw-regular) !important;
    font-family: var(--ff-primary), sans-serif;
}

/*
@media (min-width: 50em) {
    .tooltip::after {
        display: none;
    }
}
*/

.circle {
    background: var(--col-lightgrey);
    border-radius: 50%;
    height: 0.5rem;
    width: 0.5rem;
    transform: scale(1);
}

.circle-red {
    background: #FF3D69;
    border-radius: 50%;
    height: 0.5rem;
    width: 0.5rem;
    transform: scale(1);
}

.circle-green {
    background: #69C879;
    border-radius: 50%;
    height: 0.5rem;
    width: 0.5rem;

    box-shadow: 0 0 0 0 rgba(105, 200, 121, 1);
    transform: scale(1);
}

.pulse {
    background: #69C879;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(105, 200, 121, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(105, 200, 121, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(105, 200, 121, 0);
    }
}

textarea {
    resize: none;
}

/* Show the tooltip on hover */
.tooltip:hover::after {
    opacity: 1;
}

.button:hover {
    background: var(--button-hover-bg);
    color: var(--button-hover-color);
    box-shadow: rgba(37, 37, 59, 0.2) 0 0.5rem 2rem 0;
    border-color: var(--button-hover-border);
}

.category {
    background: var(--col-bg-darker);
    font-weight: var(--fw-bold);
    color: var(--col-lightgrey);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: box-shadow 250ms;
    font-size: var(--fs-xs)
}

.grid-1-2-columns {
    display: flex;
    gap: 2rem;
}

.grid-1-2-columns > div:first-child {
    flex: 1;
}

.grid-1-2-columns > div:last-child {
    flex: 2;
}

@media (max-width: 50em) {
    .grid-1-2-columns {
        flex-direction: column;
    }
}

.grid-2-1-columns {
    display: flex;
    gap: 2rem;
}

.grid-2-1-columns > div:first-child {
    flex: 2;
}

.grid-2-1-columns > div:last-child {
    flex: 1;
}

@media (max-width: 50em) {
    .grid-2-1-columns {
        flex-direction: column;
    }
}

.grid-3-columns {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr); /* 1 column by default */
}

@media (max-width: 50em) {
    .grid-3-columns {
        grid-template-columns: repeat(1, 1fr); /* 4 columns on the largest screens */
    }
}

.grid-4-columns {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(4, 1fr); /* 1 column by default */
}

@media (max-width: 50em) {
    .grid-4-columns {
        grid-template-columns: repeat(1, 1fr); /* 4 columns on the largest screens */
    }
}

.word-break-all {
    word-break: break-all;
}

.row {
    display: flex;
    flex-direction: column;
}

.row .title {
    margin-bottom: 1rem;
}

.row > * {
    padding-block: 0.25rem;
}

@media (max-width: 50em) {
    .row {
        width: 100%;
    }
}

.roleplaying {
    background: #313F72;
    color: #A3CAFF;
}

.col-roleplaying {
    color: #A3CAFF;
}

.roleplaying:hover {
    color: #bed8ff;
    box-shadow: rgba(163, 202, 255, 0.1) 0 0.5rem 2rem 0;
}

.pvp {
    background: #624141;
    color: #FF8E8E;
}

.col-pvp {
    color: #FF8E8E;
}

.pvp:hover {
    color: #ffb9b9;
    box-shadow: rgba(255, 142, 142, 0.1) 0 0.5rem 2rem 0;
}

.pve {
    background: #315F4B;
    color: #76ffa6;
}

.col-pve {
    color: #76ffa6;
}

.pve:hover {
    color: #ceffe1;
    box-shadow: rgba(36, 207, 95, 0.1) 0 0.5rem 2rem 0;
}

.hardcore {
    background: #5C4D42;
    color: #FDA948;
}

.col-hardcore {
    color: #FDA948;
}

.hardcore:hover {
    color: #ffc483;
    box-shadow: rgba(253, 169, 72, 0.1) 0 0.5rem 2rem 0;
}

.vanilla {
    background: #4F4162;
    color: #C4A3FF;
}

.col-vanilla {
    color: #C4A3FF;
}

.vanilla:hover {
    color: #dac4ff;
    box-shadow: rgba(196, 163, 255, 0.1) 0 0.5rem 2rem 0;
}

.icons {
    display: flex !important;
    flex-direction: row !important;
    color: var(--col-lightgrey);
    gap: 1rem;
}

.icons > div {
    display: flex;
}

.icons i {
    margin-right: .25rem;
}

.icons span {
    position: relative;
    display: inline-block;
}

.icons span:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--col-bg-darker);
    color: var(--col-lightgrey);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    font-size: var(--fs-sm);
}

.icons span:hover::after {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 50em) {
    .icons {
        font-size: var(--fs-base);
    }
}

.vanity-url {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.url-prefix {
    position: absolute;
    left: 1.5rem;
    color: var(--col-lightgrey);
    font-size: var(--fs-base);
    pointer-events: none; /* Keeps the prefix non-interactive */
}

.url-input {
    padding-left: calc(19ch) !important; /* Adjust padding based on prefix length */
    width: 100%;
}

@media (max-width: 50em) {
    .url-prefix {
        display: none;
    }

    .url-input {
        padding-left: 1.5rem !important;
    }
}

.server-card {
    display: flex;
    gap: 2rem;
    align-items: stretch; /* Ensures that children stretch to the height of the card */

    border-radius: 0.25rem;
    border: 1px solid var(--col-bg-lighter);
    background: var(--col-bg);
    padding: 1rem;
    margin-block: 1rem;
    height: auto;
}

.server-card > div,
.sponsor-card > div {
    /* Allow normal children to behave without auto margins */
    flex: 0 1 auto; /* This keeps their width flexible based on content */
}

.server-card > *:last-child,
.sponsor-card > *:last-child {
    margin-left: auto; /* Push the last child to the far right */
    display: flex;
    flex-direction: column; /* Stack the inner divs vertically */
    justify-content: space-between; /* Space the inner divs */
    flex: 1; /* Allow it to grow and fill available space */
    padding: 0;
}

.sponsor-card {
    display: flex;
    gap: 2rem;
    align-items: stretch; /* Ensures that children stretch to the height of the card */

    border-radius: 0.25rem;
    border: 1px solid var(--col-sponsor);
    background: var(--col-bg);
    padding: 1rem;
    margin-block: 1rem;
    height: auto;
}

.server-rank {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    justify-content: center;
}

.server-rank span {
    font-size: var(--fs-xs);
    color: var(--col-lightgrey);
}

.server-rank p {
    font-size: var(--fs-xl);
    color: var(--col-white);
    font-weight: var(--fw-bold);
}

.server-card > *,
.sponsor-card > *,
.server-status > * {
    padding-block: 0.25rem;
}

.server-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.5rem;
}

.server-name {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;

    color: var(--col-lightgrey);
    font-weight: var(--fw-bold);
}

.flag-icon {
    min-width: 1.33333333em;
}

@media (max-width: 50em) {
    .server-name {
        flex-direction: row;
    }

    .server-name a {
        max-width: 20ch;
        /* font-size: var(--fs-md); */
    }

    .server-name .categories {
        width: 100%;
    }
}

.categories {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.server-data {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.m-left-auto {
    margin-left: auto;
}

.m-top-auto {
    margin-top: auto;
}

.m-bottom-auto {
    margin-bottom: auto;
}

.even-columns {
    display: grid;
    gap: 2rem;
    overflow: hidden; /* Ensure no overflow */
}

@media (min-width: 50em) {
    .even-columns {
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
    }
}

@media (max-width: 50em) {
    .reverse-on-small > *:nth-child(1) {
        order: 2; /* Reverse the first child */
    }
}

.card {
    display: flex;
    flex-direction: column;
    border-radius: 0.25rem;
    border: 1px solid var(--col-bg-lighter);
    background: var(--col-bg);

    padding: 2rem;
    gap: 1rem;
    transition: box-shadow 250ms;
}

.card .card-header {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

/*
.card a:last-child {
    margin-top: auto;
}
*/

.cards {
    display: flex;
    gap: 2rem;
}

.cards > card {
    flex-grow: 1; /* Make all cards grow to fill space equally */
    flex-basis: calc(20% - 1rem); /* 5 cards per row with 1rem gap */
    min-width: 150px; /* Prevent cards from shrinking too much */
}

.heading-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.heading-container p {
    margin-top: 0.5rem;
}

.heading-container .category {
    font-size: inherit;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.section {
    margin-block: 4rem;
}

.arrow {
    transition: transform 0.3s ease; /* Set the transition on the .arrow element */
    display: inline-block; /* Ensures the icon behaves like an inline element that can be transformed */
}

a:hover .arrow {
    transform: translateX(3px); /* Moves the arrow 5px to the right */
}

.search {
    min-width: 512px;
    margin-inline: auto;
}

.dropdown {
    position: relative;
    display: none;
    z-index: 1000;

    min-width: 512px;
}

@media (max-width: 50em) {
    .search {
        min-width: 100%;
    }

    .dropdown {
        min-width: 100%;
    }
}

.description {
    color: var(--col-lightgrey);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 0.25rem;
    border: 1px solid var(--col-bg-lighter);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dropdown-content {
    position: absolute;
    background: var(--col-bg-darker);
    min-width: 100%;
    border: 1px solid var(--col-bg-lighter);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
}

.dropdown-content > .item {
    padding: 1rem 1.5rem;
    border-radius: 0.25rem;
}

.dropdown-content .item:hover {
    background: var(--col-bg);
}

.dropdown-content .item:hover span {
    color: white;
}

.dropdown-content .item .address {
    margin-top: 0.25rem;
    width: 100%;
}

.features {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    border-bottom: 1px solid #ddd;
    border-radius: 0.25rem;
    overflow: hidden; /* Ensure the rounded corners are applied */

    color: var(--col-lightgrey);
}

.features th,
.features td {
    padding: 1rem;
}

.features th {
    font-size: var(--fs-base);
}

.features tr td:first-child,
.features thead th:first-child {
    text-align: left;
}

@media (max-width: 50em) {
    .features tr td:first-child {
        font-size: var(--fs-md);
    }
}

.user-actions {
    border-radius: 0.25rem;
    height: 100%;
    padding-inline: 1rem;

    position: relative;

    max-width: 215px;
    width: 215px;

    border: 1px solid var(--col-bg-lighter);
}

@media (max-width: 50em) {
    .user-actions {
        max-width: 175px;
        width: 175px;
    }
}

.user-actions p {
    flex-grow: 1;
    text-overflow: ellipsis; /* Indicates that the text will be truncated */
    overflow: hidden; /* Hides the overflow content */
    white-space: nowrap; /* Prevents the text from wrapping */
}

.user-actions span {
    flex-shrink: 0; /* Prevent the span from shrinking */
}

.user-actions > * {
    transition: transform 250ms;
}

.user-actions:hover {
    border: 1px solid var(--col-bg-lighter);
    background: var(--col-bg-darker);
    cursor: pointer;
}

.user-actions.active {
    border-bottom: 1px solid transparent;
    background: var(--col-bg-darker);
}


.user-actions img {
    border: 1px solid var(--col-bg-lighter);
}

.user-actions span {
    transition: transform 250ms;
}

.user-actions.active span {
    transform: rotate(180deg);
}

.user-actions.active {
    border-radius: 0.25rem 0.25rem 0 0;
}

.user-nav {
    display: none;
    position: absolute;
    top: calc(4rem - 1px);  /* Aligns dropdown just below the user-actions */
    right: 0;
    width: 215px;
    background-color: var(--col-bg-darker);
    padding-inline: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    z-index: 100;

    border: 1px solid var(--col-bg-lighter);
    border-top: transparent;
}

@media (max-width: 50em) {
    .user-nav {
        max-width: 175px;
        width: 175px;
    }
}

.user-nav.active {
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 75em) {
    .user-nav {
        right: 4rem;
    }
}

.user-nav.active {
    display: block;  /* Show the dropdown when .active is added */
}

.user-nav ul {
    display: block;
    padding-block: 0.5rem;
}

.user-nav li {
    display: block;
    padding: 0.75rem 0;
}

.user-nav ul li a {
    display: block;
}

.user-nav ul li a:hover {
    color: var(--col-white);
}

header {
    background: var(--col-bg);
    border-bottom: 1px solid var(--col-bg-lighter);

    /* Sticky */
    position: sticky;
    top: 0;

    z-index: 999;
}

.pre-header {
    background: var(--col-bg-darker);
    border-bottom: 1px solid var(--col-bg-lighter);
}

.pre-header .container {
    padding: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.pre-header .container > div {
    display: flex;
    gap: 0.5rem;
}

.primary-header {
    padding: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 5rem;
}

.logo {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;

    align-items: center;
}


.logo img {
    height: 2.5rem;
}

.logo .text {
    line-height: 1rem;
}

.actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 48px;
    height: 48px;
    color: var(--col-lightgrey);
    border-radius: 0.25rem;

    border: 1px solid var(--col-bg-lighter);
    cursor: pointer;
}

.nav-toggle .open,
.nav-toggle .close {
    position: absolute;
    width: max-content;
    height: max-content;
    inset: 0;
    transition: opacity 100ms, transform 250ms;
    margin: auto;
}

.nav-toggle .close {
    opacity: 0;
}

.nav-toggle .open {
    opacity: 1;
}

.nav-toggle.active {
    background: var(--col-bg-darker);
}

.nav-toggle.active .open {
    opacity: 0;
    transform: rotate(90deg);
}

.nav-toggle.active .close {
    opacity: 1;
    transform: rotate(90deg);
    left: -2px;
    top: -1px;
}

@media (max-width: 75em) {
    .nav-toggle {
        display: block;
    }
}

.primary-nav {
    display: flex;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    position: relative;
    list-style: none;
    gap: 3rem;
    padding: 1rem 0;
}

.primary-nav ul li a:hover {
    color: var(--col-white);
}



@media (max-width: 75em) {

    .primary-nav {
        transition: all 250ms;
    }

    .primary-nav ul {
        display: none;
    }

    .primary-nav.active ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;

        width: 100%;

        border-bottom: 1px solid var(--col-bg-lighter);
    }

    .primary-nav.active ul li {
        display: block;
        width: 100%;
        height: 100%;
    }

    .primary-nav.active ul li a {
        display: block;
        width: 100%;
        height: 100%;
        padding: 1.5rem;
    }

    .primary-nav.active {
        position: absolute;
        top: calc(5rem + 1px); /* to go just below or border-bottom! */
        left: -2rem;
        right: -2rem;
        text-align: center;
        padding: 0;
        background-color: var(--col-bg-darker);
    }
}

.short-description {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* You can set a max-width if needed */
}

footer {
    padding: 2rem 0;
    background: var(--col-bg);
    border-top: 1px solid var(--col-bg-lighter);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--col-bg-lighter);
    margin-bottom: 1.5rem;
}

.footer-column {
    flex: 1;
    min-width: 150px; /* Minimum width for smaller screens */
}

.footer-column p {
    font-weight: bold;
    color: var(--col-white);
    margin-bottom: 0.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-list input[type="checkbox"] {
    display: none;
}

/* Basic styling for the label */
.category-list label {
    display: inline-block;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

/* When the checkbox inside the label is checked, apply styles to the label */
.category-list label:has(input[type="checkbox"]:checked) {
    border: 1px solid var(--col-white);
    /* color: white; */ /* Optional: change text color */
    font-weight: bold; /* Optional: make text bold */
}

.subscription-details {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    text-align: left;
}

.subscription-details th, .subscription-details td {
    padding: 1rem 1.5rem;
    border: 1px solid var(--col-bg-lighter);
    color: var(--col-lightgrey);
    font-size: var(--fs-base);
}

.subscription-details th {
    font-weight: bold;
    font-size: var(--fs-base);
    color: var(--col-lightgrey);
}

strong {
    font-weight: bold !important;
}

em {
    font-style: italic !important;
}




.recent-votes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-pictures {
    display: flex;
    position: relative;
    gap: 0.5rem;
}

.profile-pictures .tooltip .img-sm {
    object-fit: cover;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--col-bg-lighter);
    background: var(--col-bg-darker);
    margin-left: -15px; /* Overlap each image by a bit */
}

.profile-pictures .tooltip .img-sm:nth-child(1) { left: 0; z-index: 5; }
.profile-pictures .tooltip .img-sm:nth-child(2) { left: 20px; z-index: 4; }
.profile-pictures .tooltip .img-sm:nth-child(3) { left: 40px; z-index: 3; }
.profile-pictures .tooltip .img-sm:nth-child(4) { left: 60px; z-index: 2; }
.profile-pictures .tooltip .img-sm:nth-child(5) { left: 80px; z-index: 1; }

.profile-pictures .tooltip .img-sm:first-child {
    margin-left: 0 !important;
}

.voted-text {
    font-size: var(--fs-sm);
    color: var(--col-lightgrey);
}