body {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

main {
    padding: 2em;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-bar {
    display: flex;
    justify-content: left;
    margin-top: 2%;
    margin-bottom: 2%;
    width: 60vw;
}

#search-input {
    width: 60%;
    border-color: #f3d189;
    background-color: #fff6e3;
    border-style: solid;
    border-width: 0.3ch;
    border-radius: 1em;
    padding: 1em 1.2em;
    font-size: 1rem;
}

#search-input:focus {
    border-color: #f3d189;
    background-color: #fff6e3;
    outline: none;
}

.calendar {
    background-color: #fff6e3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60vw;
    height: auto;
    flex-direction: column;
    padding: 1em; 
    border-radius: 1em;
    border-color:#f3d189;
    border-style: solid;
    border-width: 0.3ch;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    height: 4vh;
    margin: 1vh;
}

.month-year {
    text-align: center;
    font-weight: 600;
    font-size: 2vw;
    width: 100%;
}

header button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: solid;
    border-width: 0.2ch;
    border-radius: 10%;
    border-color: #f3d189;
    background-color: #fff6e3;
    cursor: pointer;
    width: 10vw;
    height: 100%;
    font-size: 1vw;
    padding: 0.5em;
    border-radius: 0.5em;
    color: #666;
}

.cal-body {
    width: 90%;
    margin-bottom: 2vh;
}

.days {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    margin: 1vh;
}

.day {
    text-align: center;
    color: black;
    font-weight: 550;
}

.dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    margin: 1vh;
    padding: 0.5vh;
    gap: 0.2vh;
    box-sizing: border-box;
    border: 0.2vh solid black;
}

.date {
    width: 100%;
    height: 6vw;
    max-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    overflow: hidden;
    margin: 0;
    padding: 4px;
    cursor: pointer;
    font-weight: 600;
    border: 0.1ch solid #f3d189;
    border-radius: 0.2em;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    overflow-wrap: break-word;
    font-size: 2vw;
}

.date.filled {
  background-color: #76BA99;
}

.date.favorite::before {
  content: "★";
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.6em;
  color: #FFD700;
}

.date.filled {
  background-color: #abebcc;
}

.date.favorite::before {
  content: "★";
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: 0.6em;
  color: #FFD700;
}

.date::after {
    content: attr(data-day);
    position: absolute;
    bottom: 0.3ch;
    right: 0.5ch;
    font-size: 0.5em;
    color: black;
    background: #fff6e3;
    padding: 0 0.2em;
    border-radius: 0.2em;
    max-width: 80%;
    white-space: nowrap;
}

.date.active {
    background-color: #faefb3;
}

.date.inactive::after {
    color: #bcbcbc;
}

#button-container {
    margin: 3vh;
    display: flex;
    justify-content:space-around;
    width: 60vh;
    height: 10vh;
}

.card-buttons {
    min-width: 10ch;
    width: 30%;
    height: 90%;
    background-image: url('../images/button-backgrounds.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

#displayed-card-container {
    aspect-ratio: 4/3;
    width: 100%;            /* Start by filling container width */
    max-width: 40rem;       /* Don't go above this */
    max-height: 15rem;
    display: flex;
    align-items: start;
    justify-content: center;
    font-style: italic;

}

.placeholder {
    margin: 2%;

}

.placeholder p {
    font-size: 0.3em;
}

 /* placeholder for calendar entries when favorited */
.card.favorite::before {
  content: "★";
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.6em;
  color: #FFD700;
}


/* Search Results Styling */
.search-results {
  background-color: #fff6e3;
  border: 0.3ch solid #f3d189;
  border-radius: 1em;
  width: 60vw;
  margin-bottom: 2%;
  padding: 1em;
}

.search-results-header {
  margin-bottom: 2%;
  text-align: center;
}

.search-results-header h3 {
  margin: 0 0 1em 0;
  color: #333;
  font-size: 1.5rem;
}

.search-results-header p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.search-result-item {
  background-color: white;
  border: 0.3vh solid #f3d189;
  border-radius: 0.5em;
  padding: 1em;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  border-color: #e6c373;
  box-shadow: 0 0.4ch 0.8ch rgba(0, 0, 0, 0.1);
}

.search-result-content {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.search-result-date {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
}

.search-result-prompt,
.search-result-response {
  font-size: 0.9rem;
  line-height: 1.4;
}

.search-result-prompt strong,
.search-result-response strong {
  color: #333;
}

.search-highlight {
  background-color: #ffee8c;
  padding: 0.1ch 0.2ch;
  border-radius: 0.2em;
  font-weight: bold;
}

.no-results {
  text-align: center;
  padding: 2em;
  color: #666;
}

.no-results h3 {
  margin: 0 0 0.2ch 0;
  color: #333;
  font-size: 1.3rem;
}

.no-results p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
  .search-results,
  .search-bar {
    width: 90vw;
  }
  
  .search-result-item {
    padding: 0.8em;
  }
  
  .search-result-prompt,
  .search-result-response {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .search-results-header h3 {
    font-size: 1.2rem;
  }
  
  .search-results-header p {
    font-size: 0.8rem;
  }
  
  .search-result-content {
    gap: 0.1em;
  }
}