/* 🌿 Safe Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-family: sans-serif;
}

/*img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}*/

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

#root, #__next {
  isolation: isolate;
}
/*----------------------------------------------*/

body {
    margin: 0;
    font-family: sans-serif;
    background: #bbb;
    background-image: url(/archive/assets/redox-02.png);
}

header {
    background: #172d26;
    color: white;
    padding: 1rem;
    text-align: center;
    height: 10rem;
}

header img {
    max-height: 100%;
    vertical-align: middle;
}

.layout {
    display: flex;
    flex-direction: column;
    margin: auto;
    gap: 1rem;
    padding: 1rem;
}

nav, main, aside {
    padding: 1rem;
    background: #fff;
    background-image: url(/archive/assets/egg-shell.png);
    border: 1px solid #ccc;
    border-radius: 8px;
}

a:link {
  color: #118f67;
  text-decoration: none;
}

a:visited {
  color: #468571;
}

a:hover {
  color: #118f67;
  text-decoration: underline;
}

a:active {
  color: #0dcc8f;
  text-decoration: none;
}

.user-menu a {
    display: block;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.user-menu a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #3c5f54;
}

header h1 {
    font-family: 'title';
    font-size: 4rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: #000;
}

h2 {
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.25rem;
}

h4 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: bold;
}

h5, h6 {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: bold;
}

ul {
    margin-top: 1rem;
    padding-left: 1rem;
}

.small {
    font-size: 0.9rem;
    color: #666;
}

@media (min-width: 768px) {
    .layout {
        flex-direction: row;
    }

    nav {
        width: 20%;
    }

    main {
        width: 60%;
    }

    aside {
        width: 20%;
    }
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
}

input, textarea, select, button {
    padding: 0.5rem;
    font-size: 1rem;
}

label {
    font-weight: bold;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.download-list {
    max-width: 100%;
    margin: 0 auto;
}

.download-item {
    border-bottom: 1px solid #ccc;
    padding: 1rem 0;
}

.download-item:last-child {
    border-bottom: none;
}

.meta {
    font-size: 0.85rem;
    color: #666;
}

.actions {
    margin-top: 0.5rem;
}

.actions a {
    margin-right: 1rem;
    color: #118f67;
    text-decoration: none;
}

.actions a:hover {
    text-decoration: underline;
}

.meta {
    font-size: 0.9rem;
    color: #666;
}

.attachments {
    margin-top: 1rem;
}

.attachments ul {
    padding-left: 1.2rem;
}

.attachments li {
    margin-bottom: 0.5rem;
}

button {
    margin-top: 0.5rem; 
    padding: 0.5rem; 
    width: 100%;
    border-radius: 5px;
    border: 1px solid #555;
    background: #699184;
    color: white;
}

button:hover {
    text-decoration: none;
    background: #80ac9e;
}

.button {
    display: inline-block;
    padding: 0.5rem .5rem;
    background: #699184;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: .75rem;
    border: 1px solid #555;
}

a.button {
    color: white;
}

a.button:hover {
    text-decoration: none;
    background: #80ac9e;
}

.button:hover {
    background: #80ac9e;
}

.button.danger {
    background-color: #a33;
    color: white;
}

.button.danger:hover {
    background-color: #c44;
}

.button.reply {
    background-color: #fdfdfd;
    color: #000;
    width: 5rem;
    border-width: 1px;
    border-color:#bbbbbb;
}

.button.reply:hover {
    background-color: #f5f5f5;
}

button.button {
    all: unset;
    display: inline-block;
    padding: 0.5rem 0.5rem;
    margin: .5rem;
    background: #699184;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.75rem;
    border: 1px solid #555;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}

button.button.danger {
    background-color: #a33;
    border: 1px solid #555;
}

button.button.danger:hover {
    background-color: #c44;
}

.button.download {
    background-color: rgb(43, 151, 88);
    border: 1px solid #555;
}

.button.download:hover {
    background-color: rgb(60, 175, 108);
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.message.success {
    background-color: #d1f7d6;
    color: #265e29;
    border: 1px solid #6ac66a;
}

.message.error {
    background-color: #fddede;
    color: #8a1f1f;
    border: 1px solid #f88;
}
.comments {
    margin-top: 2rem;
}

.comment {
    border: 1px solid #ddd;
    background-color: #fdfdfd;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

.comment strong {
    color: #444;
}

.comment time {
    font-size: 0.8rem;
    color: #888;
    margin-left: 0.25rem;
}

.comment p {
    margin: 0.5rem 0 0;
}

.comment-delete-button {
    background: none;
    border: none;
    color: #a33;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 1rem;
}

.comment-delete-button:hover {
    color: #d33;
    text-decoration: underline;
}

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.markdown-toolbar button {
  width: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.markdown-toolbar button:hover {
  background: #e0e0e0;
}

#color-popup {
  display: none;
  position: absolute;
  z-index: 10;
  background: white;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  text-align: center;
  font-family: sans-serif;
}

#color-popup label {
  font-size: 1rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

#color-popup input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 60px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  margin-bottom: 1rem;
  display: inline-block;
}

#color-popup input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#color-popup input[type="color"]::-webkit-color-swatch {
  border: none;
}

.popup-button {
  display: inline-block;
  width: 90px;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  background-color: #f4f4f4;
  transition: background 0.2s;
  text-align: center;
}

.popup-button:hover {
  background-color: #e4e4e4;
}

.popup-button.cancel {
  background-color: #f8f8f8;
  color: #888;
}

.popup-button.cancel:hover {
  background-color: #f0f0f0;
}

.popup-button-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9rem;
}

code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: Consolas, Monaco, monospace;
}

/* Inline code only */
:not(pre) > code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

/* Code blocks inside <pre> */
pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

dl {
  margin: 1em 0;
}

dt {
  font-weight: bold;
  margin-top: 0.5em;
}

dd {
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}

.video-embed {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 1rem 0;
}
.centered-block {
    text-align: center;
}

.centered-block img {
    display: inline-block;
    max-width: 100%;
    margin: 1rem 0;
}

.subtle-button {
    background: none;
    border: none;
    margin-top: 0.25rem;
    padding-left: 0;
    text-align: left;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.subtle-button:hover {
    color: #000;
}

/* Wrap for heading + hamburger */
#mobile-nav .nav-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Hamburger only */
#mobile-nav .hamburger {
    font-weight: bold;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: #699184;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

#mobile-nav .nav-content {
    display: block;
}

/* On small screens */
@media (max-width: 768px) {
    #mobile-nav .nav-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    #mobile-nav .nav-content {
        display: none;
    }

    #mobile-nav .nav-content.open {
        display: block;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 1rem;
    }

    nav {
      background: #FFFFFF00;
      border: none;
    }
}

/* Always show full nav on desktop */
@media (min-width: 768px) {
    #mobile-nav .nav-content {
        display: block !important;
    }

    #mobile-nav .nav-header {
        display: none;
    }
}

.left-column,
.right-column {
    width: 18%;
}

main {
    flex: 1;
}

header.site-header {
    background: #699184;
    color: white;
    padding: 1rem;
    text-align: center;
}

.site-header nav a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
}

footer.site-footer {
    text-align: center;
    padding: 1rem;
    background: #172d26;
    color: #ccc;
    margin-top: 2rem;
}

.tip-box {
    margin-top: 2rem;
    font-size: .8rem;
    padding: 1rem;
    background: #eee;
    border-radius: 8px;
}

.collection-grid {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.collection-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    width: 200px;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 8px;
    margin-bottom: .5rem;
    overflow: hidden;
}

.collection-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.collection-card img {
    max-height: 175px;
    object-fit: contain;
    display: block;
}

.no-cover {
    width: 250px;
    height: 175px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-cover span {
    color: #888;
}

.message.success {
    margin: 1rem 0;
}

.collection-description {
    margin-top: 1rem;
    white-space: pre-wrap;
}

.favorite-form {
    margin-top: 1rem;
}

.collection-downloads-header {
    margin-top: 2rem;
}

.collection-grid.compact {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    align-content: space-between;
}

.collection-view-grid {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    align-content: space-between;
}

.collection-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 100%;
    max-width: 250px;
    background: none;
    border-radius: 8px;
    overflow: hidden;
}

.collection-item-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.cover-view {
    max-width: 100%;
}

.preview-card {
    position: relative;
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    justify-content: flex-start;
    border: 1px dashed #aaa;
    border-radius: 6px;
    background: #ddd;
    padding: 0.5rem;
    text-align: center;
    box-sizing: border-box;
    height: 300px;
    width: 225px;
}

.preview-card:hover {
    background: #e0e0e0;
}

.preview-card-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 200px;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 8px;
    margin-bottom: .5rem;
    overflow: hidden;
}

.preview-card-img-wrap img {
    /*height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    max-height: 100%;
    width: auto;
    border: 1px solid black;*/
}

.preview-card .title {
    font-weight: 600;
    font-size: .85em;
    letter-spacing: 1px;
    word-wrap: break-word;
    line-height: 1.2;
    margin-top: .25rem;
}

.no-image {
    width: 100%;
    height: 100px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
}

.collection-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.collection-info {
    padding: 0.5rem;
}

.floating-actions {
    display: none;
}

.preview-card:hover .floating-actions {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    align-content: flex-end;
    gap: 5px;
}

.floating-actions a {
    background: none;
    color: white;
    font-size: 1rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    text-decoration: none;
}

.floating-actions a:hover {
    text-decoration: none;
    background: #99e0ca;
}

.community-photo {
    position: relative;
}

.delete-photo-form {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
}

.community-photo:hover .delete-photo-form {
    display: block;
}

.delete-photo-form button {
    background: #ff8f9ee1;
    border: none;
    font-size: 1.2rem;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    text-decoration: none;
}

.inline-form {
    display: inline;
}

.remove-favorite-btn {
    position: absolute;
    top: 65%;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    padding: 0;
    color: #b00;
}

.remove-favorite-btn:hover {
    background: none;
}

.collection-card:hover .remove-favorite-btn {
    opacity: 1;
}

.collection-card .floating-actions {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none; /* keep this ONLY here */
  z-index: 2;

  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.collection-card:hover .floating-actions {
    display: flex;
}

.collection-search-form {
    margin-bottom: 1rem;
}

.card-has-remove {
    position: relative;
}

.favorites-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    width: 200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.favorites-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.collection-dropdown {
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.favorite-dropdown-wrap {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.preview-card:hover .remove-favorite-btn {
    opacity: 1;
}

.collection-item-wrap:hover .delete-photo-form {
    display: block;
}

.icon-button {
    all: unset;
    color: #118f67;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
}

.icon-button:hover {
    background: #99e0ca;
}

