/* PLACERING: public_html/ver.2.0/css/localstyle_ver.2.0.css */

/* Skjul scrollbar og tillad scrolling */
body {
    height: 100vh;
    overflow-y: scroll; /* Tillader lodret scrolling */
}

/* Cover grid styling */
.cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Dynamisk antal kolonner */
    gap: 20px; /* Mellemrum mellem kolonner */
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    box-sizing: border-box; /* For korrekt padding og bredde */
}

.cover-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Tillader positionering af informationsboksen */
    cursor: pointer;
}

.cover-img {
    width: 150px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.cover-img:hover {
    transform: scale(1.05);
}

.cover-title {
    margin-top: 10px;
    font-size: 1em;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Informationsboks styling */
.info-box {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: none;
    text-align: left;
    font-size: 0.9em;
    color: #333;
}

.cover-item:hover .info-box,
.cover-item.active .info-box {
    display: block;
}

/* Søgefelt styling */
.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px auto;
    padding: 10px;
    max-width: 270px;
    box-sizing: border-box; /* For korrekt padding og bredde */
    position: relative; /* Tillader placering af dropdown under søgefeltet */
}

#titleSearch {
    padding: 5px;
    width: 200px;
    border: none;
    outline: none;
    box-shadow: none;
    background-color: #ADD8E6;
    border-radius: 3px;
}

button {
    padding: 5px 10px;
    border: none;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 3px;
}

button:hover {
    background-color: #0056b3;
}

/* Dropdown forslag styling */
#suggestions {
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-height: 100px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    width: 200px;
    position: absolute;
    z-index: 10;
    top: 40px; /* Placerer dropdown lige under søgefeltet */
    border-radius: 5px;
}

#suggestions li {
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#suggestions li:hover {
    background-color: #f0f0f0;
}

/* Miniaturebillede i søgeforslag */
.cover-thumbnail {
    width: 30px;
    height: auto;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 3px;
}

/* Specifik styling for mindre skærme */
@media (max-width: 600px) {
    .cover-grid {
        grid-template-columns: repeat(2, 1fr); /* Mindst 2 kolonner på mobil */
        gap: 10px; /* Reduceret mellemrum for små skærme */
    }

    .cover-img {
        width: 100px; /* Mindre billedstørrelse på mobilen */
        height: auto;
    }

    .info-box {
        width: 180px;
    }
}
