/* Embed Widget Styles
   Overrides for iframe context — no background image, compact layout, inline auth */

/* ==================== BASE EMBED STYLES ==================== */

.booky-embed-body {
  background-image: none !important;
  background-color: var(--embed-bg-color, #ffffff) !important;
  color: var(--embed-text-color, #111827);
  min-height: 100vh;
  overflow-x: hidden;
}

.booky-embed-body .embed-container {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 16px;
  margin: 0 auto;
  min-height: 100vh;
}

.booky-embed-body .main-content-customer-portal {
  margin: 0 !important;
  padding: 0;
}

/* Hide elements not needed in embed */
.booky-embed-body #navbar,
.booky-embed-body .overlay-blur {
  display: none !important;
}

/* Buttons - use embed theme colors */
.booky-embed-body .custom-btn {
  background-color: var(--color-primary) !important;
  color: var(--embed-button-text-color, #ffffff) !important;
  border-color: var(--color-primary) !important;
}

.booky-embed-body .custom-btn:hover {
  background-color: var(--color-primary-hover) !important;
  border-color: var(--color-primary-hover) !important;
  color: var(--embed-button-text-color, #ffffff) !important;
}

.booky-embed-body .custom-btn:active {
  background-color: var(--color-primary-active) !important;
  border-color: var(--color-primary-active) !important;
  color: var(--embed-button-text-color, #ffffff) !important;
}

/* Text colors */
.booky-embed-body h1,
.booky-embed-body h2,
.booky-embed-body h3,
.booky-embed-body h4,
.booky-embed-body h5,
.booky-embed-body h6,
.booky-embed-body p,
.booky-embed-body .service-name,
.booky-embed-body .service-duration {
  color: var(--embed-text-color, inherit);
}

/* ==================== EMBED HEADER ==================== */

.embed-header {
  padding: 8px 0;
}

.embed-sign-in-btn {
  font-size: 14px;
  padding: 6px 16px;
}

/* ==================== INLINE AUTH CONTAINER ==================== */

.embed-auth-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.embed-auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 12px);
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.embed-auth-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-gray-500);
  line-height: 1;
  padding: 4px;
}

.embed-auth-close:hover {
  color: var(--color-gray-900);
}

.embed-auth-title {
  text-align: center;
  margin-bottom: 20px;
  font-family: var(--font-title, "Archivo", sans-serif);
  color: var(--embed-text-color, #111827);
}

.embed-auth-btn {
  width: 100%;
  margin-top: 12px;
}

.embed-auth-divider {
  height: 1px;
  background: var(--color-gray-200, #e5e7eb);
  margin: 20px 0;
}

.embed-auth-toggle-btn {
  display: block;
  margin: 0 auto;
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 24px;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
}

.embed-auth-toggle-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.embed-pin-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.embed-pin-input {
  width: 48px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  border: 2px solid var(--color-gray-300, #d1d5db);
  border-radius: var(--radius-md, 6px);
  outline: none;
  transition: border-color var(--transition-fast);
}

.embed-pin-input:focus {
  border-color: var(--color-primary);
}

.embed-resend-wrap {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--color-gray-500);
  margin-top: 12px;
}

/* ==================== SUCCESS VIEW ==================== */

.embed-success-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--embed-bg-color, #ffffff);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.embed-success-card {
  text-align: center;
  max-width: 400px;
}

.embed-success-icon {
  width: 80px;
  height: auto;
  margin-bottom: 16px;
}

.embed-success-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-title, "Archivo", sans-serif);
}

.embed-success-card p {
  color: var(--color-gray-600);
  margin-bottom: 24px;
}

/* ==================== LEGACY LAYOUT COMPAT ==================== */
/* Kept for backward compatibility with old ?layout=compact/minimal URLs */

.embed-compact .embed-container {
  padding: 12px;
}

.embed-minimal .embed-container {
  padding: 16px;
  padding-top: 20px;
}

/* ==================== RESPONSIVE (within iframe) ==================== */

@media (max-width: 500px) {
  .embed-auth-card {
    padding: 24px 16px;
  }

  .embed-pin-input {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .booky-embed-body .embed-container {
    padding: 8px;
  }

  .embed-minimal .embed-container {
    padding: 12px;
    padding-top: 20px;
  }
}
