/* Calendar Popup Styles */
.calendar-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(0.625rem);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.calendar-popup-overlay.active {
  display: flex;
}

.calendar-popup {
  background: #ffffff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 68.75rem;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 1.5rem 3rem -0.75rem rgba(0, 0, 0, 0.25);
}

.calendar-popup .popup-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f5f5f5;
  border: none;
  color: #666;
  font-size: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-popup .popup-close:hover {
  background: #000;
  color: #fff;
  transform: rotate(90deg);
}

.calendar-popup .popup-content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 40rem;
  height: 40rem;
  position: relative;
  overflow: hidden;
}

/* Calendar Left Side */
.calendar-left {
  padding: 2.5rem 2.2rem;
  background: #f9f9f9;
  border-right: 0.0625rem solid #e0e0e0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.calendar-left h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.calendar-subtitle {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

/* Calendar View Container */
.calendar-view-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Calendar Container */
.calendar-container {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.calendar-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
}

.calendar-nav {
  background: none;
  border: 0.0625rem solid #e0e0e0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #666;
  font-size: 1rem;
}

.calendar-nav:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  margin-bottom: 0.625rem;
}

.calendar-weekdays div {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  padding: 0.5rem 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  flex: 1;
  align-content: start;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.0625rem solid transparent;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: #fff;
  min-height: 2.375rem;
}

.calendar-day:hover:not(.disabled) {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
}

.calendar-day.selected {
  background: #000;
  color: #fff;
  border-color: #000;
}

.calendar-day.today {
  border-color: #000;
  font-weight: 600;
}

/* Time Slots Container */
.time-slots-container {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.selected-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 0.0625rem solid #e0e0e0;
}

.back-to-calendar {
  background: none;
  border: 0.0625rem solid #e0e0e0;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.back-to-calendar:hover {
  background: #f5f5f5;
  border-color: #000;
  color: #000;
}

.selected-date-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin: 0;
}

/* Time Slots */
.time-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.time-slots h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.9rem;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.5rem;
  flex: 1;
  align-content: start;
  overflow-y: auto;
  max-height: 25rem;
  padding-right: 0.3rem;
}

.time-slot {
  padding: 0.75rem 0.5rem;
  background: #fff;
  border: 0.0625rem solid #e0e0e0;
  border-radius: 0.375rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  height: fit-content;
}

.time-slot:hover:not(.disabled) {
  background: #f5f5f5;
  border-color: #000;
}

.time-slot.selected {
  background: #000;
  color: #fff;
  border-color: #000;
}

.time-slot.selected:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.time-slot.disabled {
  color: #ccc;
  cursor: not-allowed;
  background: #f9f9f9;
}

.no-slots-message {
  padding: 2rem;
  text-align: center;
  color: #666;
  font-style: italic;
  background: #f5f5f5;
  border-radius: 0.5rem;
  margin: 1rem;
}

/* Thank You Page Fullscreen Styles */
.thank-you-fullscreen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 40rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 2rem;
}

.thank-you-center {
  text-align: center;
  max-width: 32rem;
}

.success-icon-large {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  animation: checkmark 0.5s ease-out;
}

.success-icon-large svg {
  width: 5rem;
  height: 5rem;
}

.success-icon-large circle {
  stroke-dasharray: 238;
  stroke-dashoffset: 238;
  animation: circle-draw 0.5s ease-out forwards;
}

.success-icon-large path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: check-draw 0.4s ease-out 0.5s forwards;
}

.confirmation-title {
  font-size: 2rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 0.75rem 0;
}

.confirmation-subtitle {
  font-size: 1.125rem;
  color: #666;
  margin: 0 0 3rem 0;
}

.appointment-datetime {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.appointment-date {
  font-size: 1.5rem;
  font-weight: 500;
  color: #000;
  margin: 0;
  text-transform: capitalize;
}

.appointment-time {
  font-size: 2.5rem;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.confirmation-footer {
  font-size: 1rem;
  color: #666;
  margin: 2.5rem 0 0 0;
  line-height: 1.5;
}

/* Thank You Page Styles (keeping old styles for backwards compatibility) */
.thank-you-page {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
}

.thank-you-content {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.success-animation {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: checkmark 0.5s ease-out;
}

.success-animation svg {
  width: 4rem;
  height: 4rem;
}

.success-animation circle {
  stroke-dasharray: 188;
  stroke-dashoffset: 188;
  animation: circle-draw 0.4s ease-out forwards;
}

.success-animation path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: check-draw 0.3s ease-out 0.4s forwards;
}

@keyframes circle-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.thank-you-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.thank-you-subtitle {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 2rem 0;
  text-align: center;
}

.appointment-summary-card {
  background: #fff;
  border: 0.0625rem solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-datetime {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 0.0625rem solid #f0f0f0;
}

.summary-date,
.summary-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.summary-date svg,
.summary-time svg {
  color: #666;
  flex-shrink: 0;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-group label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.detail-group p {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}

.detail-secondary {
  font-size: 0.875rem !important;
  color: #666 !important;
}

.thank-you-info {
  text-align: center;
  margin-bottom: 2rem;
}

.thank-you-info p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: #666;
}

.thank-you-info a {
  color: #000;
  text-decoration: none;
  border-bottom: 0.0625rem solid #000;
  transition: opacity 0.2s;
}

.thank-you-info a:hover {
  opacity: 0.7;
}

.thank-you-actions {
  display: flex;
  justify-content: center;
}

.thank-you-actions .btn-primary {
  background: #000;
  color: #fff;
  border: 0.125rem solid #000;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.thank-you-actions .btn-primary:hover {
  background: transparent;
  color: #000;
}

/* Calendar Right Side */
.calendar-right {
  padding: 2rem 2.2rem;
  background: #fff;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.appointment-summary {
  background: #f0fff4;
  border: 0.0625rem solid #22c55e;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.appointment-summary h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 0.5rem;
}

.appointment-summary p {
  font-size: 0.875rem;
  color: #166534;
  margin: 0;
}

/* Form Elements - Reuse from contact-popup */
.calendar-popup .contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
  padding-top: 6.5rem; /* Reduced to fit better */
}

.calendar-popup .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.calendar-popup .form-row.full-width {
  grid-template-columns: 1fr;
}

.calendar-popup input,
.calendar-popup select,
.calendar-popup textarea {
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid #e0e0e0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: "Inter", sans-serif;
  transition: all 0.2s ease;
  background: #fff;
  width: 100%;
}

.calendar-popup input:focus,
.calendar-popup select:focus,
.calendar-popup textarea:focus {
  outline: none;
  border-color: #000;
  background: #fff;
  box-shadow: 0 0 0 0.1875rem rgba(0, 0, 0, 0.05);
}

.calendar-popup textarea {
  resize: vertical;
  min-height: 4rem;
}

.calendar-popup select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23000' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Style for the default option to match placeholder color */
.calendar-popup select option[value=""] {
  color: #757575;
}

.calendar-popup select:invalid {
  color: #757575;
}

.calendar-popup select:valid {
  color: inherit;
}

.calendar-popup .checkbox-row {
  grid-template-columns: 1fr;
}

.calendar-popup .checkbox-row label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #333;
  font-weight: 400;
}

.calendar-popup .checkbox-row input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.calendar-popup .submit-btn {
  background: #000;
  color: #fff;
  border: 0.125rem solid #000;
  padding: 0.875rem 2rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-family: "Inter", sans-serif;
  margin-top: 0.25rem;
}

.calendar-popup .submit-btn:hover:not(:disabled) {
  background: transparent;
  color: #000;
}

.calendar-popup .submit-btn:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 48rem) {
  .calendar-popup {
    max-width: 95%;
    max-height: 90vh;
  }

  .calendar-popup .popup-content {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }

  .calendar-left {
    padding: 1.875rem 1.25rem;
    border-right: none;
    border-bottom: 0.0625rem solid #e0e0e0;
    min-height: 28rem;
  }

  .calendar-right {
    padding: 1.875rem 1.25rem;
    justify-content: flex-start;
  }

  .calendar-popup .contact-form {
    max-width: 100%;
    padding-top: 0;
  }

  .calendar-view-container {
    min-height: 24rem;
  }

  .time-grid {
    grid-template-columns: repeat(3, 1fr);
    max-height: 22rem;
  }

  .calendar-popup .form-row {
    grid-template-columns: 1fr;
  }

  .thank-you-content {
    padding: 1rem;
  }

  .appointment-summary-card {
    padding: 1rem;
  }

  .summary-datetime {
    flex-direction: column;
    gap: 0.75rem;
  }

  .confirmation-title {
    font-size: 1.5rem;
  }

  .confirmation-subtitle {
    font-size: 1rem;
  }

  .appointment-date {
    font-size: 1.25rem;
  }

  .appointment-time {
    font-size: 2rem;
  }
}

/* Small screens */
@media (max-width: 30rem) {
  .calendar-left h2 {
    font-size: 1.5rem;
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-popup {
    max-width: 100%;
    border-radius: 0;
  }
}
