/*
  File: project2.css
  Author: Justin Bowman
  Date: 2025-07-18
  Course: CPSC 3750 – Web Application Development
  Purpose: CSS file for Project 2 assignment
  Notes: None
*/

/* General styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body {
  background-color: #f4f4f4;
  color: #333333;
  font-family: 'Georgia', serif;
}

/* Search form styles */
#search-form {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  margin: 20px;
  background-color: #ffffff;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0.1);
  width: 80%;
  min-width: 600px;
  flex-wrap: wrap;
  justify-content: space-between;
}

#search-form input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #f4f4f4;
  border: 1px solid #8c8c8c;
  color: #333333;
  border-radius: 5px;
  font-family: inherit;
}

/* Main page styles */
#main-page {
  display: flex;
  align-items: center;
  padding: 20px;
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Book of the Month styles */
#book-of-the-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0.1);
  width: 80%;
  min-width: 600px;
  margin: 20px auto;
  text-align: center;
  margin-bottom: 20px;        
}

#book-cover:hover{
  transform: scale(1.1);
  transform-origin: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

#book-of-the-month-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#book-title,
#book-of-the-month h2 {
  font-size: 24px;
  color: #1c2b36;
  margin-bottom: 10px;
}

/* Stats Section styles */
#stats-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#stats-container,
#about-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #8c8c8c;
  color: #333333;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0.1);
  width: 80%;
  min-width: 600px;
  margin: 20px auto;
  text-align: center;
}

#stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#stats-list li {
  margin: 5px 0;;
}

#stats-title,
#search-results h2 {
  color: #1c2b36;
  margin-bottom: 10px;
  margin-top: 20px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

#search-results {
  margin: 16px auto;
}

/* Search input styles */
#search-input {
  width: 100%;
  padding: 7px;;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Search button styles */
#search-button,
#search-button-advanced,
.advanced-search-link {
  padding: 7px 15px;
  background-color: #4e878c;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

#search-button:hover,
#search-button-advanced:hover,
.advanced-search-link:hover {
  background-color: #3b6c70;
}

/* Search results styles */
.search-item {
  list-style: none;
  padding: 10px;
  margin: 10px 0;
  background-color: #f4f4f4;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0, 0.1);
  cursor: pointer;
  min-width: 700px;
  min-height: 150px;
}

.search-item:hover {
  background-color: #dce5e5;
}

.search-item img {
  max-width: 100px;
  max-height: 150px;
  margin-right: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0, 0.1);
  transition: transform 0.3s ease;
}

.search-item:hover > img {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0, 0.2);
}

.search-item img:hover {
  rotate: 45deg;
  transition: transform 0.5s ease;
}

.search-item p {
  margin: 0;
  flex-grow: 1;
  text-align: left;
  color: #333333;
  transition: color 0.3s ease;
  overflow: hidden;
  font-size: 16px;
  max-width: 20%;
}

#result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Advanced search link styles */
#advanced-search-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
  background-color: #ffffff;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0.1);
  width: 80%;
  max-width: 800px;
}

#advanced-search-title {
  color: #1c2b36;
  margin: 20px auto;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  min-width: 600px;
}

/* Form Styling */
#advanced-search-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#advanced-search-form input[type="text"],
#advanced-search-form input[type="date"],
#advanced-search-form input[type="number"],
#advanced-search-form select {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #f4f4f4;
  border: 1px solid #8c8c8c;
  color: #333333;
  border-radius: 5px;
  font-family: inherit; 
}

#advanced-search-form input[type="text"]:focus-within,
#advanced-search-form input[type="date"]:focus-within,
#advanced-search-form input[type="number"]:focus-within,
#advanced-search-form select:focus-within,
#search-input:focus-within {
  background-color: #ffffff;
  border-color: #1c2b36;
}

/* About section styles */
#about-title {
  color: #1c2b36;
  margin-top: 10px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.about-text {
  color: #1c2b36;
  margin-bottom: 10px;
  font-size: 15px;
  padding: 20px;
}