html, body {
  height: 100%;
  margin: 0;
  color: var(--text-color);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    /*padding: 1rem;*/
}

a {
  color: var(--text-color);           /* Textfarbe */
  text-decoration: none;    /* Unterstreichung entfernen */
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Hover-Zustand */
a:hover {
  color: var(--navigation-links-hover);           /* Farbe beim Hover */
  text-decoration: none; /* z. B. beim Hover unterstreichen */
}

/* Aktiver Link (z. B. beim Klicken) */
a:active {
  color: #a8752f;
}

/* Besuchter Link */
a:visited {
  /*color: #ffffff;*/
}

.form-wrapper {
    background: var(--content-background);
    /*border-radius: 8px;*/
    border-radius: 0px 0px 8px 8px;
    padding: 1.2rem;
    max-width: 1000px;
    margin: auto;
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.05);*/
}

.body-container {
    padding: 0px 10px 0px 10px;
    flex: 1;
  display: flex;
  flex-direction: column;
}

.content-container {
    background: var(--content-background);
    border-radius: 8px;
    max-width: 1000px;
    margin: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-grow: 1;
}

.headline {
    background: var(--headline-background);
    /*background: #1c406cc7;*/
    border-radius: 8px;
    color: var(--headline-text);
    font-size: 16px;
    font-weight: normal;
    max-width: 1000px;
    margin: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1em;
    /*font: normal normal normal 14px/1.4em helvetica-w01-roman,helvetica-w02-roman,helvetica-lt-w10-roman,sans-serif;*/
    text-align: center;
    /*margin-bottom: 0.5rem;*/
    padding: 5px;
}

.headline-2 {
    border-radius: 8px 8px 0px 0px;
}

h2 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.4rem;
    position: relative; /*KOMISCHER FIX, OHNE DEN DAS WORT EDITION AUF DER HAUPTSEITE IM QUERFORMAT AUF IPHONES ZU GROSS ANGEZEIGT WIRD */
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.6rem;
    font-size: 1rem;
    box-sizing: border-box;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--input-background);
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    padding: 0.6rem;
    font-size: 1rem;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    color: var(--input-text);
}

input[type="text"],
input[type="number"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--input-background);
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    padding: 0.6rem;
    font-size: 1rem;
    color: var(--input-text);
}

.form-row-inline {
    display: flex;
    flex-wrap: wrap;
    /*gap: 1rem;*/
    gap: 0 1rem;
}

.form-row-inline > .form-group {
    flex: 1 1 48%;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.singleBuyPrice {
    font-size: 50%;
}

.loadingStatus {
    text-align: center;
}

.loadingStatus img {
    display: block;
    margin: 0.5rem auto;
}

.card-preview {
    text-align: center;
    /*margin: 1rem 0;*/
}

.card-preview img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ccc;
}

.price-show {
    background: var(--price-show-background);
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 30px;
}

.input-clear-wrapper {
    position: relative;
}

.input-clear-wrapper input {
    width: 100%;
    padding-right: 2rem; /* Platz für das X */
    box-sizing: border-box;
}

.clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
    user-select: none;
}

.clear-btn:hover {
    color: #c00;
}

#imgBoxDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: visible;
    max-width: 100%;
    margin: 0 auto;
}

#imgBoxDiv img {
    max-width: 100%;
    height: auto;
    display: block;
}

.navigationImage {
    width: 24px;
    height: auto;
    margin: 0 10px;
    opacity: 0.5;
    cursor: pointer;
}

.image-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex-wrap: nowrap;
}

.nav-arrow {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--preview-arrow-color);
    cursor: pointer;
    line-height: 1;
    /*padding: 0.2rem 0.5rem;*/
    transition: color 0.2s ease;
}

.nav-arrow-disabled {
    opacity: 0.1;
    cursor: not-allowed;
    pointer-events: none;
}

.price-show-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-arrow:hover {
    color: #c58e41;
}

.card-img {
    width: 210px;
    max-width: 100%;
    height: auto;
    border: 1px solid #000;
    border-radius: 4px;
}

/* MEINS */
.overlay_results_container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 95%;
    background: var(--content-background);
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    margin-top: 0.2rem;
    padding: 0.75rem;
    font-size: 14px;
    color: var(--overlay-results-text);
    display: none;
}

.results-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1C406C;
    margin-bottom: 0.5rem;
    display: block;
}

.search-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: 3px 5px;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-suggestions li:hover {
    background-color: var(--overlay-results-suggestions-background);
}

.btn {
    display: block;
    width: 100%;
    font-weight: bold;
    padding: 0.8rem;
    text-align: center;
    border: 1px solid #535453;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 1rem;
    height: auto;
    color: var(--button-text-color);
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19);
    transition-duration: 0.1s;
    background-color: var(--button-primary-color);
}

.btn:active {
    background-color: var(--button-active-color);
    transform: translateY(1px);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background-color: var(--button-hover-color);
    transition: background-color 0.1s, transform 0.05s;
  }
}


button, input[type="button"], input[type="submit"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  /*background-color: inherit;*/
}

.button_colored_small {
    padding: 5px;
    color: var(--button-text-color);
    background-color: var(--button-primary-color);
    border: 1px solid #535453;
    text-shadow: 0.1em 0.1em 0.2em #535453;
    border-radius: 5px;
    -webkit-transition-duration: 0.1s; /* Safari */
    transition-duration: 0.1s;
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19);
    cursor: pointer;
}

.button_colored_small:hover {
    background-color: var(--button-hover-color); /* Green */
    color: white;
}

.button_colored_small:active {
    background-color: var(--button-active-color);
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19);
    transform: translateY(1px);
}

.button_disabled_small {
    padding: 5px;
    border: 1px solid #535453;
    text-shadow: 0.1em 0.1em 0.2em #535453;
    border-radius: 5px;
    -webkit-transition-duration: 0.1s; /* Safari */
    transition-duration: 0.1s;
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19);
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;

}

.button_disabled {
    font-weight: bold;
    border: 1px solid #535453;
    border-radius: 5px;
    -webkit-transition-duration: 0.1s; /* Safari */
    transition-duration: 0.1s;
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19);
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.warningText {
    border: 1px solid var(--input-border-color);
    border-radius: 5px;
    background-color: var(--infobox-background);
    padding: 10px;
    font-weight: bold;
    color: var(--warning-text);
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
}

.successText {
    border: 1px solid var(--input-border-color);
    border-radius: 5px;
    background-color: var(--infobox-background);
    padding: 10px;
    font-weight: bold;
    color: var(--success-text);
    font-style: italic;
    font-size: 0.9rem;
    /*font-size: 12px;*/
    text-align: center;
}

.editionCommentHint {
    border: 1px solid #cecece;
    border-radius: 5px;
    background-color: var(--infobox-background);
    padding: 10px;
    font-weight: bold;
    color: var(--warning-text);
    font-style: italic;
}

input.disabled {
    background-color: #ececec;
    cursor: not-allowed;
}

.center {
    text-align: center;
    margin: 0 auto;
}

.blank {
    margin-bottom: 1rem;
}

.bold {
    font-weight: bold;
}

.icon-serial-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Abstand zwischen Icon und Text */
    /*padding: 5px;*/
    margin-bottom: 5px;
    
}

.edition-icon {
    display: inline-block;
    min-width: 20px;
    min-height: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 2px;
}

.serial-number-details {
    font-size: 0.9rem;
    color: var(--text-color);
}

.label-with-tooltip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  position: relative;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  outline: none; /* entfernt Fokusrahmen bei Klick auf Mobile */
}

.info-icon {
  margin-left: 5px;
  font-size: 10px;
  vertical-align: middle;
  color: #1C406C;
  opacity: 30%;
}

.info-icon:hover {
  /*background-color: #c48f43;*/
  color: white;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 999;
  width: 260px;
  max-width: 90vw;
  background-color: var(--infobox-background);
  color: var(--input-text);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-size: 13px;
  line-height: 1.4;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  white-space: normal;
}

.tooltip-text-sell-list {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 999;
  width: 260px;
  max-width: 90vw;
  background-color: var(--infobox-background);
  color: var(--input-text);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  font-size: 13px;
  line-height: 1.4;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  white-space: normal;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:focus .tooltip-text,
.tooltip-container:hover .tooltip-text-sell-list,
.tooltip-container:focus .tooltip-text-sell-list {
  visibility: visible;
  opacity: 1;
}

.checkbox-label {
    font-weight: normal;
}

/* Spinner */
/*.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid #ccc;
  border-top: 3px solid #1C406C;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  z-index: 10;
  background-color: white;
  border-radius: 50%;
}*/

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -12px 0 0 -12px;
    border: 8px solid transparent;
    border-top: 8px solid var(--navigation-main-background);
    border-right: 8px solid var(--button-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
    background-color: white;
}

.loader-gradient {
    border: 8px solid transparent;
    border-top: 8px solid var(--navigation-main-background);
    border-right: 8px solid var(--button-primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
    margin-right: auto;
    margin-left: auto;
  }

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

.hidden {
  display: none;
}

.card-item.loading {
  opacity: 0.6;
  pointer-events: none;
}


@media (max-width: 500px) {
    .form-row-inline {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
  .card-img {
    width: 170px;
  }
  
  .tooltip-text {
    /*width: 90vw;*/
    font-size: 14px;
    top: 140%;
    left: 220%;
    transform: translateX(-50%);
    text-align: left;
  }
  
  .tooltip-text-sell-list {
    /*width: 90vw;*/
    font-size: 14px;
    top: 100%;
    left: -400%;
    transform: translateX(-50%);
    text-align: left;
  }
  
  .form-group label,
  .form-wrapper label,
  .form-wrapper h3,
  .form-wrapper h2 {
    font-size: 14px !important;
  }

  .form-wrapper .headline {
    font-size: 16px !important;
  }
}

/* Verkleinert Headlines auf iPhones im Querformat */
@media screen and (max-width: 812px) and (orientation: landscape) {
  .headline,
  h1, h2, h3 {
    font-size: 1.0rem !important;  /* Oder z. B. 18px */
  }
}