/**
 * @file
 * Styles for Unee Language Selection and Sequential Popups.
 */

/* Overlay Container (Single modal wrapper) */
.lang-overlay,
.unee-popup-container,
#uneeLangModal {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background-color: rgba(15, 23, 42, 0.58) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box !important;
}

.lang-overlay[hidden],
.unee-popup-container[hidden],
#uneeLangModal[hidden] {
  display: none !important;
}

.lang-overlay.is-active,
.lang-overlay.show,
.unee-popup-container.is-active,
.unee-popup-container.show,
#uneeLangModal.is-active,
#uneeLangModal.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Modal Dialog Box */
.lang-dialog {
  position: relative !important;
  width: 100% !important;
  max-width: 560px;
  max-height: 85vh;
  background-color: #ffffff !important;
  border-radius: 18px !important;
  padding: 36px 36px 28px 36px !important;
  text-align: center !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.3),
              0 0 0 1px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box !important;
  font-family: inherit;
  overflow-y: auto !important;
}

.lang-overlay.is-active .lang-dialog,
.lang-overlay.show .lang-dialog,
.unee-popup-container.is-active .lang-dialog,
.unee-popup-container.show .lang-dialog,
#uneeLangModal.is-active .lang-dialog,
#uneeLangModal.show .lang-dialog {
  transform: translateY(0) scale(1) !important;
}

/* Step Container Animations */
.unee-popups-steps-wrapper {
  position: relative;
  width: 100%;
}

.unee-popup-step {
  animation: uneeStepFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes uneeStepFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Admin Quick Edit Pen Button */
.lang-admin-edit-pen {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 10;
}

.lang-admin-edit-pen:hover,
.lang-admin-edit-pen:focus-visible {
  background-color: #e2e8f0;
  color: #1b365d;
  border-color: #94a3b8;
  transform: scale(1.08);
  outline: none;
}

/* Close Button */
.lang-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.lang-close:hover,
.lang-close:focus-visible {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.lang-close-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

/* Emblem Image */
.lang-emblem {
  display: block;
  margin: 0 auto 12px auto;
  height: 80px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Organization Header */
.lang-org {
  margin-bottom: 16px;
}

.lang-org-1 {
  margin: 0 0 4px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #52525b;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-org-2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Title */
.lang-title {
  margin: 0 0 10px 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
  color: #1b365d;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lang-title span[lang="hi"] {
  font-size: 22px;
  font-weight: 700;
}

/* Description */
.lang-description {
  margin: 0 0 24px 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Action Buttons */
.lang-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
  margin: 0 0 20px 0;
}

.lang-option {
  flex: 1 1 150px;
  max-width: 230px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-family: inherit;
}

/* English Button: White Background with Blue Border */
.lang-option-en {
  background-color: #ffffff;
  color: #1b365d;
  border: 2px solid #1b365d;
}

.lang-option-en:hover,
.lang-option-en:focus-visible {
  background-color: #f0f4f9;
  border-color: #152b4a;
  color: #152b4a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.12);
  outline: none;
}

/* Hindi Button: Solid Navy/Blue Background */
.lang-option-hi {
  background-color: #1b365d;
  color: #ffffff;
  border: 2px solid #1b365d;
}

.lang-option-hi:hover,
.lang-option-hi:focus-visible {
  background-color: #152b4a;
  border-color: #152b4a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.25);
  outline: none;
}

.lang-option:active {
  transform: translateY(0);
}

/* Footer Note */
.lang-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Language-based content toggling inside popups (English vs Hindi) */
.unee-popup-container[data-active-lang="en"] .unee-lang-content-hi,
.unee-popup-container:not([data-active-lang="hi"]) .unee-lang-content-hi {
  display: none !important;
}

.unee-popup-container[data-active-lang="en"] .unee-lang-content-en,
.unee-popup-container:not([data-active-lang="hi"]) .unee-lang-content-en {
  display: block !important;
}

.unee-popup-container[data-active-lang="hi"] .unee-lang-content-en {
  display: none !important;
}

.unee-popup-container[data-active-lang="hi"] .unee-lang-content-hi {
  display: block !important;
}

/* Custom Banner & Body */
.unee-modal-banner-wrapper {
  margin: -16px -16px 16px -16px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.unee-modal-banner {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.unee-custom-body {
  text-align: left;
  line-height: 1.6;
  color: #334155;
  margin: 16px 0;
}

.unee-rendered-block-wrapper {
  text-align: left;
  margin-top: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

/* Step Indicator Dots */
.unee-steps-indicator {
  margin-top: 16px;
  padding-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.unee-step-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.unee-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  cursor: pointer;
}

.unee-step-dot.is-active {
  width: 22px;
  border-radius: 5px;
  background-color: #1b365d;
}

/* Prevent body scroll when popup is open */
body.lang-modal-open {
  overflow: hidden !important;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .lang-dialog {
    max-width: 95vw !important;
    max-height: 92vh !important;
    padding: 30px 18px 22px 18px !important;
  }
}

@media (max-width: 480px) {
  .lang-dialog {
    padding: 26px 16px 20px 16px !important;
    border-radius: 14px;
  }

  .lang-emblem {
    height: 70px;
  }

  .lang-org-2 {
    font-size: 15px;
  }

  .lang-title {
    font-size: 21px;
  }

  .lang-title span[lang="hi"] {
    font-size: 19px;
  }

  .lang-actions {
    flex-direction: column;
    gap: 12px;
  }

  .lang-option {
    max-width: 100%;
    width: 100%;
  }
}
