/* ==========================================================================
   General Layout
   ========================================================================== */
#wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('/images/pokemon-go-wallpaper.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2000px rgba(255, 255, 255, 0.85);
}
main.container {
    padding-top: 80px;
    padding-bottom: 50px;
}
.navbar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1001; /* Verhoogd om boven accordion-header te blijven */
}

@media (max-width: 575.98px) {
    .container,
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 56px);
    }

    .navbar-collapse.collapse.show,
    .navbar-collapse.collapsing {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   Accordion Styling
   ========================================================================== */
.accordion-button {
    z-index: 1000; /* Lager dan navbar, maar hoog genoeg voor accordion-content */
}
.accordion-button:not(.collapsed) {
    z-index: 1000; /* Expliciet ingesteld voor actieve header */
}

/* ==========================================================================
   Typography and Colors
   ========================================================================== */
.error {
    color: red;
    display: block;
    margin-top: -10px;
}
.grey {
    color: rgb(148, 148, 148);
}
.white {
    color: white !important;
}
.black {
    color: black !important;
}
.auth-card {
    color: white;
}
.tile-link {
    color: white;
    text-decoration: none; /* Standaard geen onderstreping */
}
.tile-link:hover {
    text-decoration: underline; /* Onderstreping bij hover */
}

.energy-icon {
    display: inline-block;
    width: 24px;   /* grootte van het icoon */
    height: 24px;
    background-image: url('/images/energies.png'); /* pas pad aan */
    background-size: 400% 300%; /* 4 kolommen, 3 rijen */
}

/* Energies */
/* Rij 1 */
.energy-fire      { background-position:   0%   0%; }
.energy-colorless { background-position:  33%   0%; }
.energy-fairy     { background-position:  66%   0%; }
.energy-metal     { background-position: 100%   0%; }

/* Rij 2 */
.energy-dragon    { background-position:   0%  50%; }
.energy-electric  { background-position:  33%  50%; }
.energy-fighting  { background-position:  66%  50%; }
.energy-psychic   { background-position: 100%  50%; }

/* Rij 3 */
.energy-darkness  { background-position:   0% 100%; }
.energy-grass     { background-position:  33% 100%; }
.energy-electric2 { background-position:  66% 100%; } /* tweede variant */
.energy-water     { background-position: 100% 100%; }


/* ==========================================================================
   Spacing
   ========================================================================== */
.top-20 {
    margin-top: 20px;
}
.bottom-20, .page-title {
    margin-bottom: 20px;
}
.left-5 {
    margin-left: 5px;
}
.add_line {
    margin-top: 24px;
}
.remove_line, .remove_existing_line {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    margin-left: 10px;
    margin-top: 0;
}
@media screen and (min-width: 768px) {
    .remove_line, .remove_existing_line {
        margin-top: 32px;
    }
}
@media screen and (max-width: 575.98px) {
    .remove_line {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ==========================================================================
   Forms and Inputs
   ========================================================================== */
form {
    padding-bottom: 20px;
}
form.has-fixed-action-bar {
    padding-bottom: 140px;
}
.form-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding-top: 0.5rem;
}
.form-check-input {
    margin-top: 0;
    width: 1.25rem;
    height: 1.25rem;
}
.promo-checkbox {
    width: 38px;
}
.promo-checkbox-container {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}
.promo-remove-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.provenance_select,
.set_dropdown,
#provenance_to_add {
    width: 100%;
}
.remove_line {
    margin-top: 32px;
}
@media (max-width: 575.98px) {
    .promo-remove-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .promo-checkbox-container {
        width: 100%;
    }
}
.remember-checkbox {
    margin-right: 10px;
}
.select2-container--default .select2-selection--single {
    height: 38px !important;
    padding: 4px !important;
    border: 1px solid #ced4da !important;
}
.select2-selection__arrow {
    top: 6px !important;
}

.fixed-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
    z-index: 1050;
}

.fixed-action-bar .container,
.fixed-action-bar .container-fluid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 575.98px) {
    form.has-fixed-action-bar {
        padding-bottom: 180px;
    }

    .fixed-action-bar .container,
    .fixed-action-bar .container-fluid {
        justify-content: center;
    }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 0 !important;
    background-color: #212529 !important;
}
.card img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Set detail page
   ========================================================================== */
.set-details-card {
    background: #f1f3f5 !important;
    border-radius: 0.75rem !important;
    overflow: hidden;
    color: #212529;
}

.set-details-card .card-header {
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(33, 37, 41, 0.08);
    color: #212529;
}

.set-details-card .card-body {
    background: #ffffff;
    color: #212529;
    border-radius: 0 0 0.75rem 0.75rem;
}

.set-details-card .set-detail-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-left: 0;
    margin-right: 0;
}

.set-details-card .set-detail-row:last-child {
    border-bottom: none;
}

.set-detail-label {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.set-detail-value {
    font-weight: 500;
}

.set-detail-row-tags .badge {
    background-color: rgba(33, 37, 41, 0.08);
    color: #343a40;
    border-radius: 999px;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .set-details-card .card-body {
        padding: 1rem 1.25rem;
    }

    .set-detail-label {
        font-size: 0.75rem;
    }

    .set-detail-value {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .set-detail-row-tags .badge {
        padding: 0.5rem 0.75rem;
    }
}
.card-header {
    line-height: 30px;
}
.card-missing-overlay {
    position: absolute;
    bottom: 4px;
    width: 100%;
    background-color: rgba(100, 100, 100, 0.75);
    color: white;
    font-size: 0.75rem;
    padding: 2px 4px;
    text-align: center;
}
.set-card, .provenance-card, .series-card {
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.set-card-link, .provenance-card-link, .series-card-link {
    text-decoration: none;
    color: inherit;
}
.set-card .overlay, .provenance-card .overlay, .series-card .overlay {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    padding: 10px;
    color: white;
    position: relative;
}
.set-card:hover, .provenance-card:hover, .series-card:hover {
    transform: scale(1.01);
    transition: transform 0.2s;
}
.provenance-card {
    background-color: #f8f9fa; /* Fallback for provenances without images */
}
.percentage-complete {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-weight: bold;
    font-size: 0.9rem;
}
.percentage-complete-sets {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
}

/* ========================================================================== 
   Kaart Selectie en Weergave
   ========================================================================== */
.card-image-wrapper {
    position: relative;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border 0.3s, box-shadow 0.3s;
    opacity: 1;
}
.card-image-wrapper img {
    border-radius: 4px;
    padding: 5px;
    width: 100%;
}
.card-image-wrapper.selectable {
    opacity: 0.25;
}
.card-image-wrapper.selectable:hover {
    border: 2px dashed #ccc;
}
.card-image-wrapper.selected {
    border: 2px solid red;
    box-shadow: 0 0 10px red;
    opacity: 1 !important;
}
.card-image-wrapper.owned {
    cursor: pointer;
    opacity: 1;
    position: relative;
}
.owned-label {
    position: absolute;
    top: 4px;
    right: 6px;
    background: green;
    color: white;
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 4px;
}

/* ========================================================================== 
   Images
   ========================================================================== */
.set-logo, .set-symbol {
    max-height: 30px;
}
.set-logo {
    max-width: 200px;
}
.set-symbol-small {
    height: 24px !important;
    margin-top: -20px;
}

/* ========================================================================== 
   Tables
   ========================================================================== */
table {
    font-size: 0.75rem;
}
th.sortable {
    user-select: none;
    cursor: pointer;
}
span.sort-arrow {
    margin-left: 5px;
}

/* ========================================================================== 
   Page Tiles
   ========================================================================== */
.page-tile {
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4); /* Lichter standaard */
    transition: box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-tile:hover {
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.8); /* Donkerder bij hover */
}
.page-tile.active {
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
}
.page-tile i {
    margin-right: 8px; /* Ruimte tussen icoon en tekst */
    font-size: 1.2rem; /* Iets groter icoon */
}
.sets-tile {
    background-image: url('/images/sets.jpg');
}
.series-tile {
    background-image: url('/images/series.jpg');
}
.cards-tile {
    background-image: url('/images/cards.jpg');
}
.pokedex-tile {
    background-image: url('/images/pokedex.jpg');
}
.details-tile {
    background-image: url('/images/details.jpg');
}
.provenances-tile {
    background-image: url('/images/provenances.jpg');
}
.illustrators-tile {
    background-image: url('/images/illustrator-ken-sugimori.jpg');
}
.symbols-tile {
    background-image: url('/images/symbols.jpg');
}
.cardtypes-tile {
    background-image: url('/images/cardtypes.jpg');
}
.rarities-tile {
    background-image: url('/images/rarities.jpg');
}
.foiltypes-tile {
    background-image: url('/images/foiltypes.jpg');
}
.cardconditions-tile {
    background-image: url('/images/cardconditions.jpg');
}
.back-tile {
    background-image: url('/images/home.jpg');
    background-color: #9e9e9e; 
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.3); /* Lichter dan andere tiles */
}
.back-tile:hover {
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.8); /* Donkerder bij hover */
}

/* ========================================================================== 
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 575px) {
    .page-title {
        margin-top: 20px;
    }
    .page-tile {
        height: 100px;
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 10px;
        line-height: 100px;
        font-size: 15px;
    }
    .page-tile i {
        font-size: 1rem; /* Kleiner icoon op mobiel */
    }
}
@media screen and (max-width: 575px) {
    .set-card {
        background: #f8f9fa; /* lichte achtergrond */
        border: 1px solid #ddd;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: background-color 0.3s ease;
        text-decoration: none;
        color: inherit;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        padding: 10px !important;
    }
    .set-card:hover {
        background-color: #e9ecef;
        text-decoration: none;
        color: inherit;
    }
    .set-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }
    .set-icon-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 4px;
    }
    .no-icon {
        width: 40px;
        height: 40px;
        background: #ccc;
        color: #666;
        font-size: 10px;
        text-align: center;
        line-height: 1.1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-radius: 4px;
    }
    .set-info {
        min-width: 0; /* voorkom overflow */
        flex-grow: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .set-name-lang {
        font-weight: 600;
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 10px;
        flex-shrink: 1;
    }
    .set-release {
        white-space: nowrap;
        color: #6c757d;
        font-style: italic;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
}
@media screen and (min-width: 576px) and (max-width: 1500px) {
    .page-tile {
        height: 150px;
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 10px;
        line-height: 150px;
        font-size: 20px;
    }
}
@media screen and (min-width: 768px) and (max-width: 992px) {
    .page-tile-col {
        padding-left: 50px !important;
        padding-right: 50px !important;
    }
}
@media screen and (min-width: 1250px) {
    .page-tile-col {
        padding-left: 50px !important;
        padding-right: 50px !important;
    }
}
@media screen and (min-width: 1501px) {
    .page-tile {
        height: 250px;
        margin-top: 50px;
        margin-bottom: 20px;
        border-radius: 30px;
        line-height: 250px;
        font-size: 40px;
    }
}

/* ==========================================================================
   Navigation Enhancements
   ========================================================================== */
.navbar-nav .collapse .nav-link {
    font-size: 0.9rem; /* Kleiner lettertype voor submenu-items */
}
.navbar-nav .nav-link .fa-chevron-down {
    margin-left: 5px;
    transition: transform 0.3s;
}
.navbar-nav .nav-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg); /* Draai chevron bij openen */
}
.navbar-nav .collapse {
    transition: height 0.3s ease; /* Soepele animatie voor mobiel submenu */
}
.navbar-nav .nav-link.active, .navbar-nav .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25); /* Iets lichtere achtergrond voor betere zichtbaarheid */
    font-weight: bold; /* Vetgedrukte tekst voor actieve link */
    color: #ffffff !important; /* Expliciete witte tekst */
}
.dropdown-menu {
    background-color: #212529; /* Zelfde donkere achtergrond als navbar */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Subtiele rand */
}
.dropdown-item {
    color: #ffffff; /* Witte tekst voor submenu-items */
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1); /* Hover-effect consistent met actieve link */
    color: #ffffff;
}
.dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.25); /* Actieve submenu-item stijl */
    font-weight: bold;
    color: #ffffff !important; /* Expliciete witte tekst */
}

/* ==========================================================================
   Miscellaneous
   ========================================================================== */
.hidden-row {
    display: none !important;
}
.d-flex.gap-2 {
    gap: 10px;
}
.user-save-btn {
    margin-top: 21px;
}