:root {
  --accent-primary: #b53030;
  --accent-secondary: #D85050;
  --accent-ternary: #FFB2B2;
  --accent-light: #F3DDDD;
  --content-primary: #0D1B2A;
  --content-secondary: #465872;
  --background-0: #FFFFFF;
  --background-20: #F3F5F7;
  --background-40: #EBEDEF;
  --background-60: #C2C8CE;
  --background-80: #788492;
  --background-100: #383E45;
}

#wanda-header {
  width: calc(100% - 50px);
  margin: 0 -15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
}


#wanda-bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    margin: 0;
    background: var(--accent-primary);
    width: 92vw;
    height: 60px;
    padding: 0 4vw;
    display: flex;
    text-align: center;
    justify-content: space-evenly;     
}

@supports (-webkit-touch-callout: none) {
  #wanda-bottom-navigation {
    height: 80px; 
  }

  #wanda-notifications {
    bottom: 93px;
  }
}

#wanda-bottom-navigation > div{
    padding: 6px 3px;
    width: 56px;
  }

#wanda-bottom-navigation a {
    color: var(--background-0);
  }

.wanda-notifications-badge {
  border-radius: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  top: -49px;
  left: 21px;
  width: 20px;
  height: 10px;
  padding: 5px 0;
  background-color: var(--accent-ternary);
  color: var(--accent-primary);
}

.wanda-notifications-badge.messages {
  top: -40px;
  left: 15px;
}

.wanda-notifications-badge.hidden {
display: none;
}

#wanda-notifications {
  display: block;
  width: calc(100% - 11px);
  max-width: 400px;
  height: 60vh;
  position: fixed;
  bottom: 73px;
  left: 50%;
  transform: translate(-50%, 0);
  background: var(--background-0);
  border: solid 1.5px var(--accent-primary);
  border-radius: 20px;
  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.7);
}

  #wanda-notifications.hidden {
    display: none;
  }

  #wanda-notifications:after {
    content: '';
    position: absolute;
    top: calc(100% + 1px);
    left: calc(50% - 10px);
    background: var(--accent-primary);
    width: 18px;
    height: 12px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
  }

  #wanda-notifications .wanda-notifications-header {
    color: var(--accent-primary);
    text-transform: uppercase;
    text-align: left;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: bold;
    height: 25px;
    border-bottom: solid 1px #ddd;
    display: flex;
    justify-content: space-between;  
    align-items: center;
    width: calc(100% - 20px);
    background: var(--background-0);
    border-radius: 20px 20px 0 0; 
  }

  #wanda-notifications .wanda-notifications-header span{
    padding: 0px 10px;
    font-weight: bold;
  }

  #wanda-notifications .wanda-notifications-actions {
    color: var(--accent-primary);
    display: flex;
    font-size: 9px;
    justify-content: space-between;  
    height: 30px;
  }

  #wanda-notifications .wanda-notifications-actions a {
    padding: 5px 10px;
  }
  #wanda-notifications .wanda-notifications-actions span {
    padding-left: 5px;
    font-size: 10px;
  }

  #wanda-notifications .wanda-notifications-actions a {
    color: var(--accent-primary);
    font-weight: 700;
  }

  #wanda-notifications .wanda-notification-content {
    overflow: scroll;
    height: calc(100% - 88px);
  }

  #wanda-notifications ul {
    margin: 0px 10px;
    list-style-type: none;
    display: flex;
    gap: 4px;
    flex-direction: column;
    justify-content: flex-start;
  }

  #wanda-notifications li {
    min-height: 56px;
}

  #wanda-notifications ul li img {
    max-width: 48px !important;
  }

  #wanda-notifications ul,  #wanda-notifications ul a {
    color: var(--content-primary) !important;
  }

  #wanda-notifications .wanda-notification-text {
    text-align: left;
    padding: 3px;
    width: 90vw;
    max-width: 375px;
  }

  #wanda-notifications .wanda-notification-block {
    min-height: 60px;
  }

  #wanda-notifications .wanda-notifications-footer {
    position: absolute;
    background: var(--background-0);
    height: 22px;
    width: 100%;
    border-radius: 0 0 20px 20px;
  }

  #wanda-notifications .wanda-notifications-footer a {
    color: var(--accent-primary);
    font-size: 9px;
    padding: 3px 0;
  }

  .flex-center {
    display: flex;
    justify-content: space-between;  
    align-items: center;
  }

  .noselect {
    -webkit-touch-callout: none;
      -webkit-user-select: none;
       -khtml-user-select: none;
         -moz-user-select: none;
          -ms-user-select: none;
              user-select: none;
  }
  #wanda-bottom-navigation {
    display: none;
  }

  #wanda-header {
    display:none;
  }

  @media all and (display-mode: standalone) {
    #wanda-bottom-navigation {
      display: flex;
    }
    #page-header .ux-test {
      display: none;
    }
    #wanda-header {
      display:flex;
    }
    body {
      margin-bottom: 60px;
    }
  }

  @media (max-width: 700px) {
    #nav-main svg{
      width: 20px;
      height: 20px;
      stroke-width: 1.5px;
    }
  }


.forums .row .row-item {
  background-image: none !important;
}

.forums .row .row-item.forum_unread::after {
  background: var(--accent-secondary);
  content: '';
  display: inline-block;
  position: absolute;
  left: 33px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 100px;
}

.subforum.unread::before {
  background: var(--accent-secondary);
  content: '';
  display: inline-block;
  position: absolute;
  left: 33px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 100px;
}


.forums dl.row-item dt .list-inner {
  padding-left: 10px;
}

.forum-image {
  float: left;
  padding-top: 5px;
  margin-right: 10px;
}

.forum-image img{
width: 32px;
height: 32px;
}

.topic_unread_hot .row-item-link::after,.topic_unread_hot_mine .row-item-link::after,.topic_unread .row-item-link::after {
  background: var(--accent-secondary);
  content: '';
  display: inline-block;
  position: absolute;
  left: 22px;
  top: -1px;
  width: 12px;
  height: 12px;
  border-radius: 100px;
}

.unread .fa-file {
  display: none;
}

.wanda-link {
    color: var(--accent-primary);
    text-transform: uppercase;
    text-align: left;
    font-size: 11px;
    font-weight: bold;
}

.wanda-link:hover {
  text-decoration: none;
  color: var(--accent-primary);
}

.wanda-button {
  border-radius: 3px;
  border: 1px solid var(--background-60);
  padding: 6px 16px;
  background-color: var(--background-0);
}

.button-loader {
  padding-top: 0px;
  padding-bottom: 0px;
  height: 31px;
  min-width: 80px;
}

.post-buttons .button {
  display: flex;
  align-items: center;
  height: 20px;
  min-width: 20px;
  gap: 4px;
  justify-content: space-around;
  color: var(--accent-primary);
  border-color: var(--background-40);
}

.post-buttons .button .icon {
  color: var(--background-100);
}

@media (min-width: 700px) {
.author {
    min-height: 24px;
}
}

.post-buttons .button:focus, .post-buttons .button .icon:focus {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.left {
  text-align: left !important;
}

.center {
  text-align: center !important;
  align-items: center;
}

.right {
  text-align: right !important;
}

.flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
}

.hidden {
  display: none !important;
}

.gap6 {
  gap: 6px !important;
}

.gap10 {
  gap: 10px !important;
}

.gap16 {
  gap: 16px !important;
}

.gap20 {
  gap: 20px !important;
}

.vp6 {
  padding-top: 6px;
  padding-bottom: 6px;
}

.vp10 {
  padding-top: 10px;
  padding-bottom: 10px;
}

.vp16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

#scrollToTopButton {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: var(--accent-light);
  color: var(--accent-secondary);
  cursor: pointer;
  border-radius: 100px;
  width: 48px;
  height: 48px;
}

#scrollToTopButton:hover {
  color: var(--accent-primary);
}

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

.modal-content {
  background-color: var(--background-0);
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  width: 80%;
  height: 80%;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.modal-content div {
  display: flex;
  justify-content: space-around;
  flex-direction: row;
  width: 100%;
}

.modal-content>div:last-child {
  display: flex;
    justify-content: flex-end;
    flex-direction: row;
    width: 100%;
    gap: 8px;
}

.modal-content h2 {
  width: 100%;
  color: var(--accent-primary);
  text-align: center;
  padding-left: 19px;
}

.close-button {
  color: var(--content-primary);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: var(--accent-secondary);
  text-decoration: none;
}

.file-upload-area {
  flex-direction: column !important;
}

.file-upload-wrapper {
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--background-20);
  max-width: 100%;

}

/* File input field styles */
.file-upload-wrapper input[type="file"] {
  width: 0;
  height: 100%;
  opacity: 0; /* Hide the default input */
  cursor: pointer;
  padding: 0;
}

/* Change text when a file is selected */
.file-upload-wrapper input[type="file"]:valid + .file-upload-text {
  display: block;
}

.file-upload-wrapper input[type="file"]:valid::before {
  content: 'File selected';
}

/* Additional styles */
.file-upload-wrapper:hover {
  background-color: var(--background-40);
}

.file-upload-wrapper:active {
  background-color: var(--background-60);
}

/* File upload label styles */
.file-upload-label {
  width: 100%;
  padding: 10px;
  text-align: center;
  color: var(--content-primary);
  cursor: pointer;
}

/* Highlighting during drag over */
.file-upload-wrapper.dragover {
  background-color: var(--background-40);
}

#image_preview {
  display: none; /* Initially hidden */
  width: 100%; /* Full width of its container */
  height: 0; /* Initial height set to 0 */
  padding-top: calc(80vh - 160px); /* Top padding equal to width, creates square aspect ratio */
  position: relative; /* Required for the aspect ratio trick */
  margin-top: 20px; /* Spacing above the preview */
  background: var(--background-20); /* Background color */
  overflow: hidden; /* Ensures the content fits in the box */
}

/* Style for the actual image inside the preview */
#image_preview img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Image stretches to fill the container */
  height: 100%; /* Image stretches to fill the container */
  object-fit: contain; /* Ensures the image covers the area, might crop */
}
/* Additional styles when the image is displayed */
#image_preview.displayed {
  display: block; /* Show the image */
}

/* Spinning animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinning {
  animation: spin 2s linear infinite;
}

.content.image_preview {
  display: inline-block;
  padding: 10px;
  border-radius: 4px;
  box-shadow: #0000001a 2px 2px 4px 2px;
  margin: 10px;
  max-width: 500px;
  max-height: 80vh;
  overflow: overlay;
}

fieldset .content.image_preview {
  display: none;
}

.content.image_preview img {
  max-width: 100%;
}

.spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-ajax-restyle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--background-0);
  padding: 20px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  width: calc(100vw - 39px);
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  z-index: 99;
  animation: fadeIn 0.5s forwards;
  border-radius: 4px;
  max-width: 500px;
  margin: 0;
  border: none;
}


@media (max-width: 720px)  {
  .modal-ajax-restyle {
    border-radius: 0px;
    max-width: 720px;
  }
}

.modal-ajax-restyle .alert_close {
    float: right;
    margin-right: -4px;
    margin-top: -16px;
    font-size: 24px;
    color: var(--background-100)

}

.modal-ajax-restyle .alert_close:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

.modal-ajax-restyle h3 {
  color: var(--accent-primary);
  text-transform: none;
  font-size: 16px;
}

.modal-ajax-restyle fieldset {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 6px;
  padding-right: 24px;
}

.link-button {
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 10px;
  padding: 0px 16px;
  font-weight: bold;
  font-size: var(--font-s);
  text-transform: uppercase;
  line-height: 1;
  height: 30px;
  border-radius: 3px;
  white-space: nowrap;
  width: fit-content;
  text-decoration: none !important;
}

.button-ghost {
  background-color: transparent;
  color: var(--accent-secondary);
  border: none;
}

.button-ghost:hover {
  background-color: var(--accent-light);
}

.modal-button-container {
  width: 100%;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding-top: 16px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-50px);
  }
}