/* ==================== Create Horoscope Dialog ==================== */
/* Ported from feature/promo_8_3 — same dialog UI used to capture
   horoscope input from any promo CTA on the home page. */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dialogFadeIn 0.3s ease;
}

.dialog-overlay.fade-out {
  animation: dialogFadeOut 0.2s ease forwards;
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialogFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.dialog-card {
  background: #FFFFFF;
  border-radius: 24px;
  max-width: 600px;
  width: calc(100% - 32px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dialog-header {
  display: flex;
  align-items: center;
  padding: 18px 16px 12px;
}

.dialog-header-title {
  flex: 1;
  font-family: 'Philosopher', serif;
  font-size: 20px;
  font-weight: 700;
  color: #121115;
}

.dialog-header-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #121115;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
}

/* Dialog form fields */
.dialog-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.dialog-form .form-row-3 {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-form .form-row-3 > * {
  flex: 1;
}

.dialog-form .form-row-desktop {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.dialog-form .form-row-desktop > * {
  flex: 1;
}

.dialog-form .form-group-2 {
  flex: 2;
}

.dialog-form .form-group {
  flex: 1;
}

.dialog-form .form-input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #121115;
  border: 1px solid #8F9192;
  border-radius: 4px;
  background: #FFFFFF;
  outline: none;
  box-sizing: border-box;
}

.dialog-form .form-input:focus {
  border-color: #191970;
}

.dialog-form .form-input::placeholder {
  color: #121115;
}

.dialog-form .form-helper {
  font-size: 13px;
  color: #5E6B84;
  line-height: 1.7;
  margin-bottom: 16px;
}

.dialog-form .form-helper b {
  font-weight: 600;
}

.dialog-form .form-helper-time {
  font-size: 13px;
  color: #5E6B84;
  line-height: 1.7;
  margin-bottom: 12px;
}

.dialog-form .form-helper-time b {
  font-weight: 600;
}

.dialog-form .form-error {
  color: #E53E3E;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.dialog-form .form-error.visible {
  display: block;
}

/* Dialog custom dropdowns */
.dialog-form .custom-dropdown {
  position: relative;
  user-select: none;
}

.dialog-form .dropdown-trigger {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #8F9192;
  border-radius: 4px;
  background: #FFFFFF;
  cursor: pointer;
}

.dialog-form .dropdown-trigger-text {
  flex: 1;
  font-size: 13px;
  color: #121115;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-form .dropdown-trigger-text.placeholder {
  color: #121115;
}

.dialog-form .dropdown-arrow {
  display: flex;
  align-items: center;
  color: #8B7BAB;
}

.dialog-form .dropdown-arrow .material-icons-outlined {
  font-size: 20px;
}

.dialog-form .dropdown-menu {
  display: none;
  position: fixed;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 10002;
  max-height: 300px;
  overflow: hidden;
  flex-direction: column;
}

.dialog-form .custom-dropdown.open .dropdown-menu {
  display: flex;
}

.dialog-form .dropdown-list {
  overflow-y: auto;
  max-height: 260px;
}

.dialog-form .dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
  color: #121115;
  cursor: pointer;
  border-bottom: 1px solid #F0F1F2;
}

.dialog-form .dropdown-item:last-child {
  border-bottom: none;
}

.dialog-form .dropdown-item:hover {
  background: #F8F6FF;
}

.dialog-form .dropdown-item.selected {
  color: #191970;
  font-weight: 600;
  background: #F8F6FF;
}

.dialog-form .dropdown-item-check {
  margin-left: auto;
  display: none;
  color: #191970;
}

.dialog-form .dropdown-item.selected .dropdown-item-check {
  display: inline;
}

.dialog-form .dropdown-empty {
  padding: 16px;
  font-size: 13px;
  color: #8F9192;
  text-align: center;
}

.dialog-form .dropdown-search {
  display: flex;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #F0F1F2;
}

.dialog-form .dropdown-search-icon {
  position: static;
  transform: none;
  color: #8B7BAB;
  font-size: 20px;
  margin-right: 8px;
  flex-shrink: 0;
}

.dialog-form .dropdown-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #121115;
  background: #F0F1F2;
  padding: 6px 12px;
  border-radius: 25px;
}

.dialog-form .dropdown-search input::placeholder {
  color: #8F9192;
}

/* Dialog submit button */
.dialog-form .dialog-submit-wrap {
  margin-top: 24px;
  text-align: center;
}

.dialog-form .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  background: #191970;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.dialog-form .btn-primary:hover {
  opacity: 0.9;
}

.dialog-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dialog-form .btn-primary.loading .btn-text {
  display: none;
}

.dialog-form .btn-primary.loading .btn-loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: dialogSpin 0.6s linear infinite;
}

.dialog-form .btn-primary .btn-loading {
  display: none;
}

.dialog-form .btn-icon {
  width: 24px;
  height: 24px;
}

@keyframes dialogSpin {
  to { transform: rotate(360deg); }
}

/* ==================== Responsive ==================== */
@media (max-width: 800px) {
  .dialog-card {
    max-width: calc(100% - 32px);
  }

  .dialog-header-title {
    font-size: 18px;
  }

  .dialog-form .form-row {
    flex-direction: column;
    gap: 16px;
  }

  .dialog-form .form-row-desktop {
    flex-direction: column;
    gap: 12px;
  }
}
