@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat";
  background-color: #f0f0f0;
}

svg {
  height:  50px;
  width: 50px;
}

h1 {
  font-size: 2.5rem;
}

p{
  word-wrap: break-word;
}

.header {
  position: sticky;
  top: 0%;
  height: 100px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: coral;
  color: white;
  box-shadow: 0px -2px 10px black;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 40px;
  text-align: center;
}

.modal-button {
  background-color: rgb(255, 127, 80);
  color: white;
  border: none;
  border-radius: 15px;
  padding: 10px 15px;
  cursor: pointer;
  height: 50px;
  width: 150px;
  font-size: 1.25rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.modal-button:hover {
  background-color: rgb(182, 90, 56);
}

.main-content {
  padding: 10px 15px;
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 15px;
  
}

.main-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  background-color: white;
  border-radius: 10px;
  padding: 15px;
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-buttons button {
  padding: 10px;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 1.25rem;
  border-radius: 10px;
  color: white;
  transition: 200ms ease;
}

.readBtn.isRead {
  background-color: rgb(134, 219, 134);
}

.readBtn.isRead:hover {
  background-color: rgb(107, 175, 107);
}

.readBtn.notRead {
  background-color: rgb(255, 0, 0);
}

.readBtn.notRead:hover {
  background-color: rgb(194, 0, 0);
}

.removeBtn {
  background-color: coral;
}

.removeBtn:hover {
  background-color: rgb(199, 99, 62);
}


/* Modal Styles */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: 200ms ease-in-out;
  border: none;
  border-radius: 10px;
  z-index: 10;
  background-color: #f0f0f0;
  padding: 10px 15px;
  /* width: min(300px, 80%); */
}

.modal.active {
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid black;
}

.modal-header-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-header .close-button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-body {
  padding: 20px 15px;
}

.modal-body form {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  gap: 20px;
}

form input[type=text], form input[type=number]{
  padding: 10px;
  border: 1px solid rgb(0, 0, 0, 0.2);
  border-radius: 5px;
  outline: none;
  width: 100%;
  font-size: 1rem;
}

.errorMsg {
  display: none;
  color: red;
}

.errorMsg.active{
  display: inline;
}

.isRead label {
  font-weight: 600;
}

form button {
  background-color: black;
  color: white;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 40px;
  font-weight: 600;
  transition: 200ms ease;
}

form button:hover {
  background-color: #7a7a7a;
}

#overlay {
  position: fixed;
  opacity: 0;
  transition: 200ms ease-in-out;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, .5);
  pointer-events: none;
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}