/* number.css --- all styles for the phone form + toast */

/* Basic layout for the form wrapper */
.number-form-wrapper {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(135deg, #fef7ed 0%, #fffbeb 100%);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 
    0 10px 25px -3px rgba(120, 53, 15, 0.1),
    0 0 0 1px rgba(120, 53, 15, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

/* Decorative circles */
.form-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.circle-1 {
  width: 80px;
  height: 80px;
  top: -20px;
  right: -20px;
}

.circle-2 {
  width: 60px;
  height: 60px;
  bottom: 30px;
  left: -15px;
}

.circle-3 {
  width: 40px;
  height: 40px;
  bottom: -10px;
  right: 40px;
}

/* Form header */
.form-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.form-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(120, 53, 15, 0.2));
}

.number-heading {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #78350f;
  line-height: 1.2;
}

.number-subtitle {
  margin: 0;
  font-size: 14px;
  color: #92400e;
  opacity: 0.8;
  line-height: 1.5;
}

/* Form fields container */
.form-fields {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

.phone-form .field {
  display: block;
  margin-bottom: 20px;
}

.phone-form .label-text {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #78350f;
  margin-bottom: 8px;
}

/* Input container with icon */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #d97706;
  z-index: 1;
}

.phone-form input[type="email"],
.phone-form input[type="tel"] {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border-radius: 14px;
  border: 2px solid rgba(120, 53, 15, 0.1);
  background: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  color: #451a03;
  font-weight: 500;
}

.phone-form input::placeholder {
  color: #a8a29e;
  font-weight: 400;
}

.phone-form input:focus {
  border-color: #d97706;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 0 0 4px rgba(217, 119, 6, 0.1),
    0 4px 12px rgba(120, 53, 15, 0.1);
  transform: translateY(-1px);
}

/* hint text */
.hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #92400e;
  opacity: 0.7;
}

/* actions */
.form-actions {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.btn-primary {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 400;
  font-size: 16px;
  box-shadow: 
    0 6px 20px rgba(217, 119, 6, 0.3),
    0 0 0 1px rgba(217, 119, 6, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(217, 119, 6, 0.4),
    0 0 0 1px rgba(217, 119, 6, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Button loader */
.btn-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  gap: 4px;
}

.loader-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  animation: loaderPulse 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes loaderPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Form footer */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #92400e;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.form-footer svg {
  width: 14px;
  height: 14px;
}

/* message */
.form-msg {
  margin-top: 12px;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.form-msg:not(.error) {
  background: rgba(101, 163, 13, 0.1);
  color: #365314;
  border: 1px solid rgba(101, 163, 13, 0.2);
}

.form-msg.error {
  background: rgba(185, 28, 28, 0.1);
  color: #7f1d1d;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

/* --------------------------
   Bottom-right toast
   -------------------------- */
.phone-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 360px;
  max-width: calc(100% - 48px);
  transform: translateY(16px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  border-radius: 16px;
  background: linear-gradient(135deg, #fef7ed 0%, #fffbeb 100%);
  box-shadow: 
    0 20px 25px -5px rgba(120, 53, 15, 0.15),
    0 0 0 1px rgba(120, 53, 15, 0.05);
  backdrop-filter: blur(12px);
}

/* visible state */
.phone-toast.phone-toast--visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* toast inner */
.phone-toast .toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-text strong {
  font-weight: 600;
  color: #78350f;
  font-size: 14px;
}

.toast-text span {
  color: #92400e;
  font-size: 13px;
  opacity: 0.9;
}

/* close button */
.toast-close {
  border: none;
  background: rgba(120, 53, 15, 0.08);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #78350f;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(120, 53, 15, 0.12);
  transform: scale(1.05);
}

.toast-close:active {
  transform: scale(0.95);
}

/* small screens */
@media (max-width: 480px) {
  .number-form-wrapper {
    padding: 24px;
    border-radius: 16px;
  }
  
  .number-heading {
    font-size: 20px;
  }
  
  .phone-toast {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 16px;
  }
  
  .form-icon {
    font-size: 40px;
  }
}

/* Animation for form elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.number-form-wrapper > * {
  animation: fadeInUp 0.6s ease-out;
}

.number-form-wrapper > *:nth-child(2) {
  animation-delay: 0.1s;
}

.number-form-wrapper > *:nth-child(3) {
  animation-delay: 0.2s;
}