/******************************************************
 * OLD-STYLE CARDS (Cancelled, Past)
 ******************************************************/
.appointment-card-historical {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  background-color: #fff;
  margin: 1rem auto;
  overflow: hidden;
  border: 1px solid #ddd;
  /* No forced width here; it will size naturally */
}
/* Vertical border on the left (default neutral) */
.appointment-border {
  width: 4px;
  background-color: #ccc;
}
/* CANCELLED => Red border */
.appointment-card-historical.appointment-cancelled .appointment-border {
  background-color: #f47356;
}
/* PAST => keep neutral or set custom color if desired */
.appointment-card-historical.appointment-past .appointment-border {
  background-color: #ccc;
}
/* Content area: text, icons, spacing */
.appointment-content {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}
.appointment-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.content-container .appointment-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0.25rem 0 0;
}
.appointment-sub-label {
  font-size: 0.875rem;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.appointment-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
.appointment-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #666;
}
.appointment-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.appointment-status-cancelled {
  color: #f47356;
}
.appointment-status-past {
  color: #888;
}
.appointment-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/******************************************************
 * NEW-STYLE CARD (Planned / Upcoming)
 ******************************************************/
.appointment-card-upcoming {
  border-radius: 16px;
  overflow: hidden;
  margin: 1rem auto;
  background-color: #fff;
  border: 1px solid var(--card-border-color);
}
.appointment-card-upcoming-header {
  background-color: #00a78e;
  padding: 1rem 1rem;
  position: relative;
  display: flex;
  align-items: flex-start;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.appointment-date-badge {
  width: 50px;
  height: 60px;
  background: #fff;
  border-radius: 4px;
  text-align: center;
  padding: 0.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}
.appointment-date-day {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
  line-height: 1;
}
.appointment-date-month {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #666;
  line-height: 1.2;
}
.appointment-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: #fff; /* white text on teal */
}
#appointment-doctor-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.15rem 0;
  color: #fff;
}
.appointment-video-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
}
.appointment-time-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  max-width: 132px;
}
.appointment-call-icon-circle {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.appointment-call-icon-circle svg {
  width: 22px;
  height: 22px;
  color: #00a78e;
}
.appointment-card-upcoming-body {
  padding: 1.25rem 1.5rem;
  background: #fff;
}

/* Maintain side-by-side structure for the appointment body */
.appointment-body-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap; /* Force same row layout */
}

.appointment-illustration {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
}
/* Responsive adjustments for smaller screens while keeping the structure unchanged */
@media (max-width: 768px) {
  .appointment-illustration {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
  }
  .appointment-info-column {
    flex: 1;
    min-width: 0;
  }
  .appointment-body-content {
    gap: 0rem;
    flex-direction: column;
    align-items: center;
  }
  .appointment-card-upcoming-body {
    padding: 0rem 1rem 1rem;
  }
  .appointment-upload-button {
    width: 100%;
  }
}


.appointment-info-column {
  flex: 1;
  min-width: 0;
}

.appointment-info-text {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.4;
}

.appointment-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.appointment-upload-button svg {
  width: 1em;
  height: 1em;
}

/* Time row holds date pill and link pill side by side */
.appointment-time-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Link pill states match the pill style */
.appointment-time-link {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding-right: 0.4rem;
}
.appointment-time-link span {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appointment-time-link-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Ensure icons inside pills are sized consistently */
.appointment-time-label svg,
.appointment-time-label .appointment-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Ensure no underline on the appointment link pill, even with theme overrides */
.appointment-time-link,
.appointment-time-link:link,
.appointment-time-link:visited,
.appointment-time-link:hover,
.appointment-time-link:focus,
.appointment-time-link:active,
.appointment-time-label .appointment-time-link:hover {
  text-decoration: none !important;
}

/* Force white text color for the appointment link pill across states */
.appointment-time-link,
.appointment-time-link:link,
.appointment-time-link:visited,
.appointment-time-link:hover,
.appointment-time-link:focus,
.appointment-time-link:active,
.appointment-time-label .appointment-time-link:hover {
  color: #fff !important;
}

/* Stronger specificity to beat theme a:not(.btn):hover underline */
.appointment-card-upcoming .appointment-time-row .appointment-time-label a.appointment-time-link:hover,
.appointment-card-upcoming .appointment-time-row .appointment-time-label a.appointment-time-link:focus,
.appointment-card-upcoming .appointment-time-row .appointment-time-label a.appointment-time-link:active,
.appointment-card-upcoming .appointment-time-row .appointment-time-label a.appointment-time-link:hover:not(.btn) {
  text-decoration: none !important;
  color: #fff !important;
}

/* Highest priority override for underline on hover in the appointment pill */
:where(.appointment-card-upcoming) :where(.appointment-time-row) :where(.appointment-time-label) a.appointment-time-link:hover {
  text-decoration: none !important;
  color: #fff !important;
}

/* Also neutralize generic anchor hover inside the pill explicitly */
:where(.appointment-card-upcoming) :where(.appointment-time-row) :where(.appointment-time-label) a:not(.btn):hover {
  text-decoration: none !important;
  color: #fff !important;
}
