/* =========================
   RESET & BASE STYLES
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #121212;
    color: #f1f1f1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 20px 20px 0px 20px;
}

h1, h2 {
    color: #dc3545;
    margin-bottom: 12px;
}

a {
    color: #3ea6ff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* =========================
   LAYOUT STRUCTURE
========================= */
header, footer {
    text-align: center;
}

header {
    margin-bottom: 30px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    padding: 10px 20px;
    color: #eee;
    flex-wrap: wrap;
}


/* =========================
   BUTTONS
========================= */
button {
    background-color: #970500;
    color: #000;
    padding: 8px 12px;
    margin-top: 6px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #970500;
}

button.add {
    background: #008cff;
    color: white;
    width: 100%;
}

button.owned {
    background: #ff4d4d;
    color: white;
    width: 100%;
}

.logout-button {
    background-color: #d9534f;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
}
.logout-button:hover {
    background-color: #c9302c;
}

/* =========================
   FORMS
========================= */

input,
select {
    padding: 8px;
    border: none;
    border-radius: 6px;
    background-color: #2c2c2c;
    color: #f1f1f1;
    width: 100%;
}

input:focus,
select:focus {
    outline: 2px solid #970500;
}

/* =========================
   PROGRESS BAR
========================= */
.progress-container {
    margin: 10px 0 20px;
    color: #ccc;
}

.progress-bar {
    width: 100%;
    background: #444;
    border-radius: 10px;
    height: 12px;
    margin-top: 4px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(to right, #00bfff, #00ffaa);
    height: 100%;
}

/* MOBILE-FIRST IMPROVEMENTS */
@media (max-width: 768px) {

    /* 1. Stack the top bar vertically */
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        font-size: 16px;
        padding: 10px;
    }

    /* 3. Filters are full-width stacked */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
        display: flex;
        flex: 1;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .filter-group > label {
        width: 50px;
        font-size: medium;
    }

    .filter-checkbox {
        width: 250px !important;
    }


    /* 4. Make grid 1 or 2 cards per row */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 5. Shrink card padding + image size */
    .card {
        padding: 8px;
        font-size: 12px;
    }

    .card_image {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .symbol {
        max-width: 25px;
        height: auto;
    }

    /* 6. Button size adjusted for tap */
    button {
        font-size: 16px;
        padding: 10px;
        width: 100%;
        text-align: center;
    }

    /* Optional: Reduce text label spacing */
    .card-info .row {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-group label {
        flex: 0 0 60px;
        font-size: 16px;
    }

    .filter-group .filter-checkbox {
        flex: 0 0 160px !important;
        font-size: 16px;
    }



    .filter-group select,
    .filter-group input[type="text"],
    .filter-group input[type="checkbox"] {
        flex: 1;
        min-width: 0;
    }

    .filter-checkbox-group {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .filter-checkbox-group label {
        font-size: 16px;
    }
}
.login_form {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.card-info + form {
    display: flex;
    gap: 0rem;
    align-items: stretch;
    margin-top: 0.5rem;
    font-size: 16px;
}

.toggle-form label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    cursor: help;
}

.toggle-form label input[type="number"] {
    width: 40px;
    padding: 2px 4px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Tooltip styling */
.toggle-form label::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
    z-index: 10;
}

.toggle-form label:hover::after {
    display: block;
}

/* Green flash after save */
.toggle-form button.saved {
    background-color: #28a745 !important;
    color: white !important;
    transition: background-color 0.3s;
}

.toggle-form {
    display: flex;
    flex-direction: column;
}

/* Row for N / R / H inputs */
.toggle-form .input-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Label + tooltip style */
.toggle-form label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    cursor: help;
    font-size: 16px;
    flex: 1;
    justify-content: center;
}

/* Tooltip */
.toggle-form label::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #222;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
    z-index: 10;
}

.toggle-form label:hover::after {
    display: block;
}

/* Input fields */
.toggle-form input[type="number"] {
    width: 100%;
    padding: 4px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Full-width button */
.toggle-form button {
    width: 100%;
    padding: 6px 10px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}




@media (max-width: 768px) {
    .filter-bar-row {
        display: flex;
        align-items: center;
        width: 100%;
    }
    .filter-bar-row .form-label {
        width: 6rem;
    }
}

  /* Ensure dropdown overlays like a native select */
  .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    position: absolute !important;
    z-index: 1050; /* higher than most content */
  }

  /* Optional: make dropdown match widest item */
  #custom-select-wrapper {
    display: inline-block;
  }

  .dropdown-menu.show {
    display: block;
  }

  /* Button stretches to full dropdown width
  .dropdown-toggle {
    min-width: 250px;
  }*/
#searchInput,
#search {
    margin: auto;
}
.dropdown-img {
    width: 48px;
    height: auto;
    max-height: 24px;
    object-fit: contain;
}
.row {
    justify-content: center;
}
#buyableOverlay img {
    transition: transform 0.3s;
}
#buyableOverlay img:hover {
    transform: scale(1.05);
}

#buyableContent {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#card_container {
    height: fit-content;
}

footer {
    color: antiquewhite !important;
    position: sticky;
    bottom: 0;
    z-index: 1000;

    position: fixed;
    top: 100;
    left: 0;
    width: 100%;
}
#card-container,
#results {
    height: 100%;
}
input, textarea, select {
    font-size: 16px;
}

.german {
    color: green !important;
}

@media (max-width: 768px) {
    .filter-bar-checkbox {
        width: 100%;
        text-align: center;
    }
}
#modeToggle {
    width: fit-content;
}

.form-floating>label {
    top: -21px;
}
.form-floating-name>label {
    top: -27px;
}
.form-floating-name2>label {
    top: -32px;
}






#userSettingsModal > .modal-dialog {
    width: fit-content;
}


.modal-content.bg-dark {
    background-color: #1e1e2f;
    color: #f8f9fa;
}

.modal-header, .modal-footer {
    border-color: #444;
}

.form-control.bg-dark {
    background-color: #2c2c3c;
    color: #fff;
    border: 1px solid #555;
}

.form-control.bg-dark:focus {
    background-color: #2c2c3c;
    color: #fff;
    border-color: #66afe9;
    box-shadow: 0 0 0 0.2rem rgba(102, 175, 233, 0.25);
}

#toast-container{
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    padding: 12px 20px;
    margin-top: 10px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease;
    opacity: 1;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #F44336;
}

.remove_satturation {
    filter: saturate(0);
}

#index_main {
    display: flex;
    align-items: center;
    justify-content: center;
}
