* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.icon-svg {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: middle;
}

body {
  background-color: #f5f5f5;
  font-family: "Plus Jakarta Sans", sans-serif;
}

header {
  text-align: center;
  padding-top: 3rem;
  margin-bottom: 1rem;
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.logo {
  background-color: #e1f5f9;
  padding: 0.5rem;
  border-radius: 10px;
}

header p {
  margin-top: 0.5rem;
  color: #4e8b97;
  font-size: 1.1rem;
  text-align: center;
}

aside {
  max-width: 390px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.create-book {
  background-color: #fff;
  padding: 2rem 1rem 2rem 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.create-book h2 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.create-book h2 svg {
  color: #19c3e6;
  width: 1.8rem;
  height: 1.8rem;
}

.create-book form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.create-book input {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  width: 100%;
}

.create-book input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

.create-book button {
  padding: 0.6rem;
  background-color: #19c3e6;
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
}

.create-book input:focus {
  outline: none;
  border-color: #666;
}

.create-book button:hover {
  background-color: #17accf;
}

main {
  max-width: 390px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  margin-bottom: -0.5rem;
}

.main-header h2 {
  font-size: 1.5rem;
  color: #333;
}

.search-inline {
  display: flex;
  align-items: center;
  position: relative;
  background-color: #fff;
  border-radius: 20px;
  padding: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-inline input {
  width: 0;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  transition: all 0.3s ease;
  opacity: 0;
  font-size: 0.9rem;
}

.search-inline.active {
  padding: 2px 10px;
}

.search-inline.active input {
  width: 150px;
  padding: 5px 10px;
  opacity: 1;
}

.search-inline button {
  background: none;
  border: none;
  cursor: pointer;
  color: #19c3e6;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}

.search-inline button:hover {
  background-color: #f0f0f0;
}

.incomplete-book,
.complete-book {
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.incomplete-book h2,
.complete-book h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #eee;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.incomplete-book h2 svg {
  color: #ff9800;
}

.complete-book h2 svg {
  color: #4caf50;
}

.book-item {
  border: 1px solid #f0f0f0;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background-color: #fff;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.book-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.book-info {
  flex: 1;
}

.book-item h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

.book-item p {
  margin: 0.2rem 0;
  color: #666;
  font-size: 0.9rem;
}

.action {
  display: flex;
  gap: 0.3rem;
  flex-direction: row;
}

.action button {
  padding: 6px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background-color: transparent;
}

.action button svg {
  display: block;
}

.action button:hover {
  transform: scale(1.1);
  background-color: #f5f5f5;
}

[data-testid="bookItemIsCompleteButton"] {
  color: #4caf50;
}

[data-testid="bookItemDeleteButton"] {
  color: #f44336;
}

[data-testid="bookItemEditButton"] {
  color: #ff9800;
}

.empty-state {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 1rem;
}

#cancelEditBtn {
  background-color: #9e9e9e;
  color: white;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#cancelEditBtn:hover {
  background-color: #757575;
}
