/* =========================
   Global Reset & Variables
   ========================= */

@view-transition {
    navigation: auto;
}

/* Prevent line breaks globally (overridden where needed) */
* {
    white-space: nowrap;
}

html {
    scrollbar-gutter: stable; /* Keeps space for scrollbar, no layout shift */
}

.title {
    margin: 74px 0px 8px 0px;
    font-size: 40;
}

a {
    all: unset; /* Completely removes all default styles */
    text-decoration: none; /* Removes underline */
    color: inherit; /* Inherits color from parent */
    cursor: pointer; /* Adds pointer cursor */
}

:root {
    --primary-color: #0088ff;
    --background-color: #fff;
    --center-line-background: #a0a0a0;
    --text-color: #111;
    --model: #f2f2f7;
}

.dark-mode {
    --background-color: #000;
    --text-color: #f5f5f5;
    --model: #404040;
}

/* =========================
   Typography Enhancements
   ========================= */

.first::first-letter {
    font-size: 64px; /* Same size as heading */
    float: left;
    line-height: 1;
    padding-right: 10px;
    padding-bottom: 0px;
}

.text-content {
    white-space: normal;
    margin-top: 26px;

    font-family: "AppleGaramond";
    font-style: normal;
    font-weight: 400;
    font-size: 24px;

    color: var(--text-color);
}

.text-heading {
    white-space: normal;
    margin-top: 26px;

    font-family: "AppleGaramond";
    font-style: normal;
    font-weight: 400;
    font-size: 60px;

    color: var(--text-color);
}

.heading {
    font-size: 64px;
    margin: 8px 0px 8px 0px;
    view-transition-name: post-title;
}

/* =========================
   Selection & Buttons
   ========================= */

::selection {
    background: var(--primary-color);
    color: #fff;
}

button {
    all: unset;
    cursor: pointer;
    color: inherit;
    font: inherit;
    -webkit-appearance: none;
}

/* =========================
   Base Layout
   ========================= */

@font-face {
    font-family: "AppleGaramond";
    src: url("/static/fonts/AppleGaramond.ttf") format("truetype");
}

body {
    font-family: "AppleGaramond", serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.content-wrapper {
    width: 70%;
    margin: 0 auto;
    transition: width 0.4s ease;
}

/* Mobile */
@media (max-width: 1000px) {
    .content-wrapper {
        width: 90%;
    }
}

/* Large screens */
@media (min-width: 1500px) {
    .content-wrapper {
        width: 50%;
    }
}

/* =========================
   Header & Structural Layout
   ========================= */

.header-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.body-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.heading-tag {
    margin: 0px 0px 20px 0px;
}

.content-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 111px;
}

.center-line {
    height: 2px;
    background: var(--center-line-background);
    flex: 1;
}

.filler {
    flex-grow: 1;
}

/* =========================
   Header Buttons
   ========================= */

.header-btn-sub {
    padding: 6px 12px;
    margin: 74px 0px 16px 0px;

    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;

    width: auto;
    height: 20px;
}

.header-btn-sub:hover {
    background: color-mix(in srgb, var(--primary-color) 80%, black);
}

.header-btn-ld {
    margin: 74px 10px 16px 0px;
    border: none;
    background-color: var(--background-color);
    color: var(--primary-color);
    width: 20px;
    height: 20px;
    view-transition-name: ldbuttton;
}

.header-btn-ld:hover {
    color: color-mix(in srgb, var(--primary-color) 80%, black);
}

/* =========================
   Overlay / High-Z Element
   ========================= */

.high-z {
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

/* =========================
   Images (Both Systems Kept)
   ========================= */

.main-img {
    border-radius: 5px;
    border: 1px solid var(--text-color);
    margin: 0px 10px 0px 0px;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1.88 / 1;
}

.body-img {
    height: 87px;
    width: 164px;
    border-radius: 5px;
    border: 1px solid var(--text-color);
    margin: 0px 10px 0px 0px;
    flex-shrink: 0;
}

/* =========================
   Flex Content Blocks
   ========================= */

.flex-content {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    height: 87px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flex-btn {
    flex-direction: column;
    height: 87px;
    justify-content: flex-start;
}

.read-more-btn {
    margin: 0px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.read-more-btn:hover {
    color: color-mix(in srgb, var(--primary-color) 80%, black);
}

.del-btn {
    margin: 0px;
    color: #ff383c;
    flex-shrink: 0;
}

.del-btn:hover {
    color: color-mix(in srgb, #ff383c 80%, black);
}

.edit-btn {
    margin: 0px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.filter-holder {
    margin: 0px 0px 0px 0px;
    display: flex;
}

.filter-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 111px;
}

/* =========================
   Tags & Text Resets
   ========================= */

.tag-holder {
    margin: 12px 0px 0px 0px;
    display: flex;
}

.tag {
    margin: 0px 2px 0px 0px;
}

h2,
p {
    margin: 0px;
}

.filtering-for {
    margin: 0px 5px 0px 0px;
}

.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
}

.modal {
    padding: 1em;
    width: 447px;
    border-radius: 5px;
    filter: drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.25));
    border-style: none;
    background: var(--model);
    color: var(--text-color);
}

.modal h1 {
    font-family: "Apple Garamond";
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 18px;
}

.modal p {
    margin: 0px 0px 10px 0px;
    white-space: normal !important;
}

.del-article-btn {
    padding: 6px 12px;
    margin: 0px 0px 10px 0px;

    border: none;
    border-radius: 5px;
    background-color: #ff383c;
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;

    width: calc(100% - 1em);
    height: 20px;
}

.del-article-btn:hover {
    background: color-mix(in srgb, #ff383c 80%, black);
}

.cancel-del-article-btn {
    padding: 6px 12px;
    margin: 0px 0px 5px 0px;

    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;

    width: calc(100% - 1em);
    height: 20px;
}

.cancel-del-article-btn:hover {
    background: color-mix(in srgb, var(--primary-color) 80%, black);
}

.seqtalogin {
    padding: 6px 12px;
    margin: 0px 0px 0px 0px;

    border: none;
    border-radius: 5px;
    background-color: #34c759;
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    width: auto;
    height: 20px;
}

.seqtalogin:hover {
    background: color-mix(in srgb, #34c759 80%, black);
}

.login-form-input {
    box-sizing: border-box;

    font-size: 17px;

    background: var(--background-color);
    border: 2px solid var(--text-color);
    border-radius: 5px;
}

.login-form {
    margin: 20px 0px 0px 0px;
}

.login-form-text {
    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;
}

.refresh-btn {
    padding: 6px 12px;
    margin: 0px 0px 16px 0px;

    border: none;
    border-radius: 5px;
    background-color: #ff383c;
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;

    width: auto;
    height: 20px;
}

.refresh-btn:hover {
    background: color-mix(in srgb, #ff383c 80%, black);
}

.new-btn {
    padding: 6px 12px;
    margin: 0px 0px 74px 0px;

    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #ffffff;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: "AppleGaramond", serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 28px;

    width: auto;
    height: 20px;
}

.new-btn:hover {
    background: color-mix(in srgb, var(--primary-color) 80%, black);
}

.seqta-stat-container {
    margin: 16px 0px 0px 0px;
    display: flex;
    align-items: center;
    width: 100%;
}

#header {
    view-transition-name: header;
}

.subscription-modal {
    width: 447px;
    border-radius: 5px;

    border: none;

    background: var(--model);
    color: var(--text-color);

    filter: drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.25));

    zoom: 1.2;

    padding: 0px;
}

.subscription-modal-content {
    margin: 61px 42px 61px 42px;
    display: flex;
    flex-direction: column;
}

.subscription-modal-btn {
    background: #34c759;
    border-radius: 5px;

    height: 31px;

    width: 100%;

    font-family: "Apple Garamond";
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 23px;

    color: #ffffff;

    text-align: center;
}

.subscription-modal-btn:hover {
    background: color-mix(in srgb, #34c759 80%, black);
}

.subscription-modal-input {
    margin: 0px 0px 10px 0px;
    padding: 1px 2px 1px 5px;
    height: 31px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 5px;

    width: 100%;

    font-size: 15px;
    line-height: 17px;

    margin: 0px 0px 10px 0px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-modal-input::placeholder {
    color: #8e8e93;

    font-family: "Apple Garamond";
    font-style: normal;
    font-weight: 400;
    font-size: 15px;
    line-height: 17px;
}

.subscription-modal h1 {
    margin: 0px 0px 10px 0px;
    font-family: "Apple Garamond";
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 18px;
}

.subscription-modal p {
    margin: 0px 0px 10px 0px;
    font-family: "Apple Garamond";
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    white-space: normal !important;
}

.subscription-modal-x {
    position: fixed;
    top: 20px;
    right: 20px;
    color: var(--primary-color);
}

.subscription-modal-x:hover {
    color: color-mix(in srgb, var(--primary-color) 80%, black);
}

#userlist-input {
    anchor-name: --userlist-input;
}

#userlist-popover {
    margin: 0px auto auto auto;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    height: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    position-anchor: --userlist-input;
    top: calc(anchor(bottom) + 0px);
    padding: 0;
}

.userlist-layout {
    display: flex;
    flex-direction: column;
}

.userlist-btn {
    color: var(--text-color);
    font-size: 18px;
    line-height: 17px;
    font-family: revert;
    font-size: revert;
    font-weight: revert;
    font-style: revert;
    padding: 10px 8px 10px 8px;
    border-bottom: 1px solid #ddd;
}

.userlist-btn:hover {
    background-color: #ddd;
}

.userlist-btn-text-layout {
    display: flex;
    align-items: center;
    width: 100%;
}

.userlist-btn-text-name .userlist-btn-text-year {
    color: var(--center-line-background);
}

#sub-modal {
    view-transition-name: sub-modal;
}

#userlist-input {
    view-transition-name: sub-modal-input;
}

#subscription-modal-description {
    view-transition-name: sub-modal-description;
}

#subscription-modal-title {
    view-transition-name: sub-modal-title;
}

#subscription-modal-submit {
    view-transition-name: sub-modal-submit;
}
