/* Autors: Laura Kokina; Galvenās lapas noformējuma CSS datne; 
Veidots: 2024. gadā, Jaunākā versija */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
}
  
header {
  background-color: #4a90e2;
  color: white;
  padding: 20px;
  text-align: center;
}

#login{
    display: inline-block;
    width: 50px;
    height: 50px;
    background: url("../img/profile.png") center/cover no-repeat;
    margin-left: 10px;
    cursor: pointer;
    mix-blend-mode: color-burn;
    position: absolute;
    right: 10px;
    top: 10px;
  }
  
#login:hover {
    opacity: 0.8;
  }
  
h1, h2 {
  color: #333;
}
  
nav {
  background-color: #333;
  padding: 15px;
}
  
nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-around;
}
  
nav ul li {
  display: inline;
}
  
nav ul li a {
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  display: block;
  transition: background-color 0.3s;
}
  
nav ul li a:hover,
.active-nav {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.container {
  width: 80%;
  margin: 20px auto;
  padding: 20px;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.btn {
  background-color: #4a90e2;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 20px;
}

.btn:hover {
  background-color: #357abd;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.recommendation {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #4a90e2;
  transition: background-color 0.3s;
}

.recommendation:hover {
  background-color: #e0f0ff;
}

.to-read-list {
  list-style: none;
  padding: 0;
}

.to-read li {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #4a90e2;
  transition: background-color 0.3s;
  list-style-type: none;
}

.to-read li:hover {
  background-color: #e0f0ff;
}

.read li {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #4a90e2;
  transition: background-color 0.3s;
  list-style-type: none;
}

.read li:hover {
  background-color: #e0f0ff;
}

.book-cover {
  width: 80px;
  height: auto;
  margin-right: 20px;
  border-radius: 4px;
}

.book-info {
  flex-grow: 1;
}

.book-details {
  margin-top: 10px;
  margin-left: 10px;
}

.book-details.hidden {
  display: none;
}

footer {
  background-color: #4a90e2;
  color: white;
  text-align: center;
  padding: 10px 0;
  position: relative;
  width: 100%;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #888;
  margin: 5% auto;
  width: 90%;
  max-width: 500px;
  position: relative;
  border-radius: 8px;
}

/* Style the form inputs */
input[type="text"], input[type="number"], input[type="date"], textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  box-sizing: border-box;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Search bar */
.right-aligned {
  text-align: right;
  margin-bottom: 20px;
}

.search-bar {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  width: 300px;
  font-size: 16px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-bar:focus {
  border-color: #4a90e2;
  outline: none;
}






/* Styling the photo label and frames */
.custom-photo-label {
    display: inline-block;
    position: relative;
    width: 150px;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.custom-photo-label:hover {
    border-color: #4caf50; /* Green border on hover */
}

.photo-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

/* Icon inside the photo frame (the "+" icon) */
.photo-icon {
    font-size: 24px;
    color: #777;
    transition: all 0.3s ease;
}

/* Change the icon when an image is selected */
.photo-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

/* Show the preview container */
#imagePreviewContainer {
    display: none;
}

/* Style for the image preview */
#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Optional: styling the form around the image upload */
#bookForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}