body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: Inter, sans-serif;
  overflow: hidden;
}

* {
  margin: 0;
}

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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #e8e8f0;
}

.app-container {
  display: flex;
  flex-direction: column;
  width: 402px;
  height: 874px;
  max-height: 874px;
  background-color: #6349eb;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border-radius: 30px;
  position: relative;
}

.header {
  background-color: #6349eb;
  padding: 20px 19px;
  margin-top: 40px;
  color: #f6f5ff;
  flex-shrink: 0;
  
}

.date-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
}

.calendar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

.calendar-highlight {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -10px;
  width: 77px;
  height: 115px;
  background: #cfcdff;
  border-radius: 38.5px;
  z-index: 0;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  z-index: 1;
}

.date-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: #f6f5ff;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.date-number {
  color: #6349eb;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

.weekday {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.96px;
  color: #f6f5ff;
  text-align: center;
}

.calendar-day--current .date-circle {
  background-color: #4026c9;
}

.calendar-day--current .date-number {
  color: #f2f2f4;
}

.calendar-day--current .weekday {
  color: #4026c9;
  font-weight: 800;
}

.medication-alarm-content {
  background-color: #f6f5ff;
  border-top-left-radius: 35px;
  border-top-right-radius: 35px;
  padding: 10px 19px;
  flex-grow: 1;
  overflow-y: auto;
  position: absolute;
  top: 240px;
  z-index: 1000; 
  width: 100%;
  bottom: 0; 
  max-height: calc(100% - 180px); 
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
  -webkit-transition: opacity 0.3s ease-in-out;
  -moz-transition: opacity 0.3s ease-in-out;
  -o-transition: opacity 0.3s ease-in-out;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-title {
  color: black;
  font-size: 45px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 2.56px;
  word-wrap: break-word;
}

.add-button-container {
  position: relative;
  width: 42px;
  height: 42px;
}

.add-button {
  width: 42px;
  height: 42px;
  background-color: #6349eb;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.medication-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.swipe-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 17px;
  touch-action: pan-y;
  display: flex;
  height: 124px;
}

.swipe-action {
  width: 80px;
  background-color: #4cd964;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0 17px 17px 0;
  position: relative;
  z-index: 1;
  height: 100%;
  flex-shrink: 0;
}

.medication-card-checkmark {
  color: rgb(255, 255, 255);
  font-size: 28px;
  font-weight: bold;
}

.medication-card {
  background-color: white;
  padding: 15px 0 15px 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  width: 100%;
  flex-shrink: 0;
  z-index: 2;
  border-radius: 17px 0 0 17px;
}

.card-icon-area {
  width: 84px;
  height: 84px;
  background: #f6f5ff;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 40px;
  color: #6349eb;
  position: relative;
}

.card-pill-icon {
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: url('../assets/capsule-pill.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 2;
}

.card-pill-shadow {
  position: absolute;
  top: 15px;
  left: 3px;
  width: 80px;
  height: 80px;
  background-image: url('../assets/capsule-pill-shadow.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.card-tablet-icon {
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: url('../assets/tablet.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 2;
}

.card-tablet-shadow {
  position: absolute;
  top: 15px;
  left: 3px;
  width: 80px;
  height: 80px;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.card-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.drug-name {
  color: black;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.44px;
  word-wrap: break-word;
}

.dosage-info {
  color: #7a7595;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.04px;
  word-wrap: break-word;
}

.time-display {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-icon {
  width: 25px;
  height: 25px;
  background-image: url("../assets/time-icon.svg");
  background-repeat: no-repeat;
  display: inline-block;
  background-position: center;
  flex-shrink: 0;
  background-size: contain;
}



.time-text {
  color: #6349eb;
  font-size: 26px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  word-wrap: break-word;
  letter-spacing: 1px;
}

.time-text .am-pm {
  font-size: 22px;
  letter-spacing: 2px;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.card-removing {
  animation: slideOut 0.3s forwards;
}

.footer {
  background-color: white;
  padding: 10px 19px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  z-index: 20;
}

.footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 64px;
}



.nav-item--active {
  background-color: #4026c9;
  color: white;
}

#alarm-overlay {
  width: 402px;
  height: 874px;
  margin: 20px auto;
  overflow: hidden;
  position: absolute; 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 30px;
  z-index: 1000;
  display: none; 
  flex-direction: column;
  opacity: 0; 
  transition: opacity 0.3s ease-in-out; 
  
  -webkit-transition: opacity 0.3s ease-in-out;
  -moz-transition: opacity 0.3s ease-in-out;
  -o-transition: opacity 0.3s ease-in-out;
}

#alarm-content {
}

#alarm-confirm-button,
#alarm-back-button {
  cursor: pointer;
}

#alarm-back-button svg {
  stroke: white;
}

.drug-description {
  display: none;
}

#alarm-overlay {
  transition: opacity 0.3s ease;
  opacity: 0;
}

#alarm-overlay.visible {
  display: block;
  opacity: 1;
}

#alarm-content {
  max-width: 402px;
  height: 874px;
  background: #6349eb;
  overflow: hidden;

  margin: auto;

  position: relative;

  color: white;
}

#alarm-back-button {
  position: absolute;
  top: 55px;
  left: 15px;
  z-index: 10;
  padding: 10px;
  cursor: pointer;
}

#alarm-back-button svg {
  display: block;
  stroke: white;
  width: 24px;
  height: 24px;
}

#alarm-drug-name {
  width: 100%;
  position: absolute;
  left: 0px;
  top: 175px;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 2.56px;
  word-wrap: break-word;
}

#alarm-dosage-info {
  width: 100%;
  position: absolute;
  left: 1px;
  top: 225px;
  text-align: center;
  color: rgba(246, 245, 255, 0.8);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.6px;
  word-wrap: break-word;
}

#alarm-time {
  width: 100%;

  position: absolute;
  left: 1px;
  top: 523px;
  text-align: center;
  font-size: 48px;
  font-weight: 600;
  word-wrap: break-word;
}

.description-area {
  width: 100%;
  position: absolute;
  left: 0;
  top: 611px;
  display: flex;
  justify-content: center;
  padding: 0 15px;
}

.description-content-wrapper {
  width: 270px;
  max-width: 100%;
}

.description-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.6px;
  word-wrap: break-word;
  margin-bottom: 12px;
}

#alarm-description {
  width: 100%;
  height: 78px;

  color: white;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.88px;
  word-wrap: break-word;
  overflow-y: auto;

  padding-right: 5px;
}

.button-area {
  width: 100%;
  position: absolute;
  left: 0;
  top: 740px;
  display: flex;
  justify-content: center;
}

.action-button-background {
  width: 270px;
  height: 60px;
  background: #f19292;
  border-radius: 39px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.action-button-text {
  text-align: center;
  color: #4026c9;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 2.56px;
  word-wrap: break-word;
}

.medication-reminder_icon {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  color: #6349eb;
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.medication-reminder_icon .card-pill-icon,
.medication-reminder_icon .card-pill-shadow {
  transform: scale(2);
}

.medication-reminder_icon .card-tablet-icon,
.medication-reminder_icon .card-tablet-shadow {
  transform: scale(2);
}

.exclamation-icon {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 3px;
  left: 40px;
  background-image: url('../assets/exclamation-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.medication-info-popup {
  background-color: #f8f2ff;
  border-radius: 16px;
  width: 280px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.popup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-container {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.popup-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: bold;
  color: #000;
}

.medication-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  text-align: justify;
}
