/* ---------- ADD TO CALENDAR POPUP ---------- */

/* Trigger link */
.app-date-cal a {
  display: inline-block;
  color: #046e7c;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #87a5a9;
  border-radius: 6px;
  padding: 5px 14px;
  margin-left: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.app-date-cal a:hover {
  background: #046e7c;
  border-color: #046e7c;
  color: #fff;
}

/* Overlay */
.cal-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cal-popup-overlay.active {
  display: flex;
  animation: calFadeIn 0.2s ease both;
}
@keyframes calFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal box */
.cal-popup {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  animation: calSlideUp 0.25s ease both;
  font-family: 'Poppins', arial, verdana;
}
@keyframes calSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.cal-popup-header {
  background: linear-gradient(135deg, #046e7c 0%, #1aacbe 100%);
  padding: 24px 28px 20px;
  position: relative;
}
.cal-popup-header h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.cal-popup-header p {
  margin: 0;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
}
.cal-popup-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cal-popup-close:hover { background: rgba(255,255,255,0.35); }
.cal-popup-close svg { height: 14px; fill: #fff; }

/* Appointment summary strip */
.cal-popup-summary {
  background: #eef9fa;
  padding: 14px 28px;
  border-bottom: 1px solid #d8eff2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-popup-summary svg {
  height: 16px;
  fill: #046e7c;
  flex-shrink: 0;
}
.cal-popup-summary span {
  font-size: 13px;
  color: #046e7c;
  font-weight: 600;
}

/* Options list */
.cal-popup-options {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid #e8f4f6;
  border-radius: 12px;
  text-decoration: none;
  color: #2c3e50;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.cal-option:hover {
  border-color: #046e7c;
  background: #f0fafc;
  color: #046e7c;
  transform: translateX(3px);
}
.cal-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cal-option-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.cal-option-icon svg {
  width: 22px;
  height: 22px;
}
.cal-option-label {
  flex: 1;
}
.cal-option-label small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: #888;
  margin-top: 1px;
}
.cal-option-arrow {
  height: 14px;
  fill: #bbb;
  transition: fill 0.2s ease;
}
.cal-option:hover .cal-option-arrow { fill: #046e7c; }

/* Icon backgrounds */
.cal-icon-google { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.cal-icon-apple  { background: #1c1c1e; }
.cal-icon-outlook { background: #0078d4; }
.cal-icon-yahoo  { background: #6001d2; }

@media (max-width: 767px) {
  .cal-popup { border-radius: 20px 20px 0 0; max-width: 100%; }
  .cal-popup-overlay { align-items: flex-end; padding: 0; }
  .cal-popup-overlay.active { animation: none; }
  .cal-popup { animation: calSlideUpMobile 0.28s ease both; }
  @keyframes calSlideUpMobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}
