/* AppointMint Badge Widget Styles */

.appointmint-badge-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.appointmint-badge-widget.position-left {
  right: auto;
  left: 20px;
}

.appointmint-badge-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 10px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* When no photo, use original padding */
.appointmint-badge-button:not(:has(.appointmint-badge-photo)) {
  padding: 14px 24px;
}

.appointmint-badge-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.appointmint-badge-button:active {
  transform: translateY(0);
}

/* Profile Photo in Badge */
.appointmint-badge-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Calendar Icon */
.appointmint-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Legacy support for old svg selector */
.appointmint-badge-button svg:not(.appointmint-badge-icon) {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Modal Overlay */
.appointmint-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.appointmint-overlay.active {
  opacity: 1;
  visibility: visible;
}

.appointmint-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 90vh;
  max-height: 700px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.appointmint-overlay.active .appointmint-modal {
  transform: scale(1) translateY(0);
}

.appointmint-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
}

.appointmint-close-button:hover {
  background: rgba(0, 0, 0, 0.2);
}

.appointmint-close-button svg {
  width: 16px;
  height: 16px;
  color: #333;
}

.appointmint-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Loading State */
.appointmint-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #666;
  font-size: 14px;
}

.appointmint-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: appointmint-spin 0.8s linear infinite;
}

@keyframes appointmint-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Responsive */
@media (max-width: 520px) {
  .appointmint-badge-widget {
    bottom: 16px;
    right: 16px;
  }
  
  .appointmint-badge-widget.position-left {
    left: 16px;
  }
  
  .appointmint-badge-button {
    padding: 8px 16px 8px 8px;
    font-size: 13px;
  }
  
  .appointmint-badge-button:not(:has(.appointmint-badge-photo)) {
    padding: 12px 20px;
  }
  
  .appointmint-badge-photo {
    width: 32px;
    height: 32px;
  }
  
  .appointmint-modal {
    max-width: calc(100% - 24px);
    height: calc(100vh - 48px);
    max-height: none;
    border-radius: 8px;
  }
}
