#login_wrapper{
    position: absolute;
    left: 50%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
}

#login_button{
    float: right;
}

/*#new_post_button{
    position: absolute;
    top: 20px;
    right: 20px;
}*/

#form_wrapper{
    margin-top: 10px;
    width: 90vw;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#form_heading{
    background-color: var(--color-primary);
    color: white;
    padding: 5px 20px;
    font-size: 1.6em;
    letter-spacing: .2em;
    text-transform: uppercase;
}

#blog_form_content{
    display: grid;
    gap: 10px;
    margin-top: 10px;
    grid-template-columns: 1fr;
}

#primary_content_wrapper{
    padding: 0 20px;
}

#image_upload_wrapper{
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-evenly;
    background-color: #eee;
    padding: 20px;
}

#post_form{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#post_form input, #post_form textarea {
    width: 100%;
    padding: 10px;
    border:none;
    border-bottom: 1px solid #ccc;
    font-family: 'Hubballi', sans-serif;
    font-size: 1.2em;
}

#post_form textarea {
    height: 250px;
    resize: vertical;
}

#form_scroll_wrapper{
    overflow-y: auto;
    max-height: 77vh;
}

#form_info{
    padding: 0 20px;
}
/*#post_form button {
    padding: 10px;
    background-color: #004c6d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#post_form button:hover {
    background-color: #003f5a;
}*/

/*(#blog_button_wrapper{
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 5px;
    padding: 20px 20px;
}*/

label.primary-button{
    text-align: center;
}

input[type="file"] {
  display: none; /* hide the native input */
}

.custom-file-upload {
  display: inline-block;
  padding: 0.5rem 1rem;
}

.custom-file-upload:hover {
  background-color: var(--color-primary);
  color: white;
}

.upload-drop-area {
  border: 2px dashed var(--color-accent);
  padding: 1.5rem;
  text-align: center;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  background-color: white;
}

.upload-drop-area.dragover {
  background-color: rgba(0, 76, 109, 0.1);
  border-color: var(--color-primary);
}

.upload-drop-area p{
    margin: 0;
}

.image-preview {
  margin-top: 1rem;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

#clear_filter{
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 10px;
    z-index: 2000;
    text-transform: uppercase;
    padding-right: 2.4em;
    opacity: 0.9;
    display: none;
}

#clear_filter::after {
    content: "Ⓧ";                  /* U+00D7 multiplication sign */
    position: absolute;
    right: 0.6em;                  /* tweak to taste */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;              /* icon size */
    color: inherit;                /* match the button text color */
    pointer-events: none;          /* clicks go through to the button */
}

.even{
    background-color: #f9f9f9;
}

.odd{
    background-color: #000;
}

#previous_posts{
    display: flex;
    flex-direction: column;
    /*padding: 20px 40px;
    border-radius: 15px;
    border: 1px solid #ccc;*/
}

.blog_post_wrapper{
    border-radius: 8px;
    background-color:white;
}

.blog_header{
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    border-radius: 8px;
    width: 100%;
}

.blog_date_wrapper{
    /*font-family: "Philosopher", sans-serif;*/
    font-family: "Josefin Sans", sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    background-color: var(--color-primary);
    color: white;
    padding: 10px;
    width: 90px;
    border-radius: 8px;;
}

.blog_date_wrapper .blog_month, .blog_date_wrapper .blog_year{
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.blog_date_wrapper .blog_year{
    margin-top: -10px;
}

.blog_date_wrapper .blog_day{
    font-size: 60px;
    line-height: 1;
}

.blog_tags{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    padding: 0 20px;
}

.blog_content{
    padding: 0 20px;
    font-size: clamp(1rem, calc(.8rem + 0.15vw), 1.15rem);
    font-family: "Varela Round", sans-serif;
    margin: 1em 0;
}

strong{
    font-weight: 900;
    font-family: "Josefin Sans", sans-serif;
    font-size: 1.15em;
}

.blog_content > div[style] {
  width: auto !important;
}

.blog_post_wrapper h2{
    margin-bottom: 0.2em;
    font-family: "Josefin Sans", sans-serif;
    text-align: center;
    color: var(--color-primary);
}

.blog_post_wrapper hr{
    width: 50px;
    display: block;
    margin: auto;
    margin: 20px auto;
    border-top: 2px solid var(--color-accent);
}

.blog_tag_button{
    padding: 2px 8px;
    text-transform: uppercase;
}

.blog_heart_button{
    width: 32px;
    height: 32px;
    background-image: url("../images/blogHeart.svg");
    transition: transform 0.2s ease-in-out;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

.blog_heart_button:hover{
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
    background-image: url("../images/blogHeartFilled.svg");
    cursor: pointer;
}

.blog_heart_num{
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    
    
    font-family: "Hubballi", sans-serif;
    font-family: "Courier Prime", monospace;
    background-color: var(--color-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.blog_cover_image_wrapper {
    background-color: black;
}

.blog_cover_image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    margin: 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 1b) Make all figures in your rendered post respect the container width */
.blog_content figure {
  max-width: 100%;
  margin: 1em auto;   
}

/* 1c) And ensure the img itself never overflows its figure */
.blog_content figure img {
  display: block;
  margin: 0 auto;
}

.button_wrapper{
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 10px;
    margin: 20px;
}

.small_gap{
    gap: 2px;
}

#image_drop_area{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#image_drop_area img{
    max-height: 50vh;
}

/* ------------ */
/* Trix Overrides */
/* ------------ */

trix-editor {
  max-width: 100% !important;
}

/* Restore default list indentation inside the editor */
trix-editor ul, trix-editor ol, .blog_content ul, .blog_content ol {
  margin: 0.7em 0;      /* add vertical space */
  padding-left: 1.5em;  /* indent the list */
  list-style-position: outside;
}

/* Restore spacing for list items */
trix-editor ul li, trix-editor ol li, .blog_content ul li, .blog_content ol li {
  margin: 0.3em 0;      /* a little vertical gap between items */
  margin-left: 0.3em;
}

ol ol {
  list-style-type: lower-roman;
  margin-left: 1.5em;
}

/* Third‐level ordered list (nested inside a second‐level <ol>) → lower‐alpha */
ol ol ol {
  list-style-type: lower-alpha;
  margin-left: 1.5em;
  padding-left: 0;
}

/* Restore blockquote styling inside the editor */
blockquote {
  margin: 1em 0;                 /* space above & below */
  padding-left: 1em;             /* indent the quoted text */
  border-left: 3px solid #ccc;   /* a visual bar on the left */
  color: #555;                   /* slightly lighter text */
  font-style: italic;
}

/* Restore default paragraph spacing (if you want) */
trix-editor p {
  margin: 0.7em 0;
  line-height: 1.6;
}

/* Optional: restore default code‐block padding */
trix-editor pre,
trix-editor code {
  background-color: #f6f8fa;
  padding: 0.3em 0.5em;
  border-radius: 4px;
  font-family: Menlo, monospace;
  margin: 0.5em 0;
  display: block;
}

trix-toolbar .trix-button-row {
    flex-wrap: wrap !important;
}

.modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}



.hidden{
    display: none;
}

.modal strong{
    color: var(--color-primary);
    font-family: "Josefin Sans", sans-serif;
    font-size: .8em;
}

.modal .message_wrapper{
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    overflow: hidden;
    font-size: 1.6em;
}

.message_wrapper .messages_heading{
    background-color: var(--color-primary);
    color: white;
    padding: 5px 20px;
    font-size: 1em;
    letter-spacing: .2em;
    text-transform: uppercase;
}

@media (max-width: 850px) {
    #clear_filter{
        top: calc(var(--header-height-m) + 10px);
    }
}

@media (max-width: 500px) {
    #previous_posts .row{
        width: 90%;
    }
}