/* Basic set ups */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: lightgray;
    background-image: url("https://img.elo7.com.br/product/zoom/236CD3B/papel-de-parede-modelo-cimento-queimado-rustico-papel-de-parede.jpg");
    font-size: 1.1rem;
    font-family: Calibri, sans-serif;
    line-height: 1.5;
}

/* Search Container Styles*/
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    border-radius: 30px;
    margin: 30px auto 0 auto;
    padding: 20px;
    background-color: #13263a;
    width: 80%;
}

.search-container h1 {
    background-color: white;
    color: #13263a;
    padding: 15px;
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;

}
.search-container p{
   margin-bottom: 20px;
    background-color: white;
    color: #13263a;
    padding: 10px;
    border-radius: 30px;
    font-weight: bold;
    text-align: justify;
}
.search-container li {
    background-color: white;
    color: #13263a;
    padding: 5px 10px;
    border-radius: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    list-style: none;
}
.search-container li a:hover{
    color: rgba(5, 53, 209, 0.75);
}
.search-container li a:visited{
    color: #3636a3;
}

/* Search Box & Button Styles*/
.search-box {
    display: flex;
    align-items: center;
    background-color: #13263a;
    border: 2px solid #ccc;
    border-radius: 20px;
    padding: 5px 10px;
    margin-top: 25px;
    position: relative;
}

.search-box input {
    border: none;
    padding: 10px;
    width: 90%;
    border-radius: 10px;
    background-color: #13263a;
    color: white;
    font-size: 1.5rem;
    outline: none;
    margin-left: 5px;
}
input::placeholder {
    color: #ccc;
    text-transform: uppercase;
}

.search-button {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 5px;
    font-size: 1em;
}

.search-button:hover {
    background-color: #0056b3;
}

/* Filter Container */
.filter-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 15px 0;
    background-color: rgba(250, 250, 250, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.filter-container label {
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-align: left;
}

/* Dropdown (Select) Styles */
.filter-container select {
    padding: 10px;
    font-size: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-color: rgb(255, 255, 255);
    color: black;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease; /* Smooth hover Effect */
}

.filter-container select:hover,
.filter-container select:focus {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.4);
    color: black;
}

.filter-container select:focus {
    outline: 3px solid rgba(255, 255, 255, 0.8);
}

/* Dropdown (Options) Styles */
.filter-container select option {
    background-color: rgba(4, 28, 53, 0.47);
    color: black;
    padding: 10px;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
}

/* Books Results Styles */
.books-results {
    display: none;
    max-width: 80%;
    margin: 5px auto;
    padding: 0 20px;
    background-color: #13263a;
    border-radius: 30px;
    color: white;
    font-size: 1.2rem;
    line-height: 1.5;
}

.books-list {
    list-style: none;
    padding: 0;
}

.book {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
}

.book img.book-cover {
    max-width: 100px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.book-info {
    flex: 1;
}

.book-title {
    background-color: white;
    color: #13263a;
    padding: 5px 10px;
    border-radius: 20px;
    margin: 0;
    font-size: 20px;
}

.book-author {
    color: white;
    margin: 5px 0;
}

.book-description {
    margin-top: 10px;
    overflow: hidden;
    font-size: 0.9em;
}

.book-description summary {
    cursor: pointer;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: bold;
    transition: margin 180ms ease-out; /* manipulating margin to make an animation effect*/
    position: relative;
    padding-inline: 1.3rem;
}

details[open] summary {
    margin-bottom: 10px;
}

.book-description summary:hover {
    text-shadow: 0 0 10px white;
}

/* Summary Marker Styles */
.book-description summary::marker {
    content: none;
}

.book-description summary::before {
    content: "-->";
    font-size: 0.9em;
    position: absolute;
    inset-inline-start: 0;
    transition: rotate 0.2s;
}
details[open] summary::before {
    rotate: 90deg;

}

/* Error Message Styles */
.error-message {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(205, 205, 205, 0.95);
    color: #13263a;
    padding: 5px;
    border-radius: 10px;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1rem;
    display: none;
    z-index: 1; /* Ensure it appears above everything */
}

/* Show Error message when not empty */
#genreInputError:not(:empty) {
    display: block;
}