/* Popup Styles */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  backdrop-filter: blur(5px);
}

.popup-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-container {
  background: white;
  width: 95%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-header {
  background: linear-gradient(135deg, #ff5500, #ff3300);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.popup-header h2 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.popup-body {
  padding: 30px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
}

.popup-intro {
  color: #666;
  margin-bottom: 25px;
  font-size: 1.1rem;
  border-left: 4px solid #ff5500;
  padding-left: 15px;
}

/* Floating Button */
.popup-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  background: #ff5500;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 20px rgba(255, 85, 0, 0.4);
  transition: all 0.3s ease;
  border: 2px solid white;
}

.popup-floating-btn:hover {
  background: #e64a00;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 85, 0, 0.5);
}

.popup-floating-btn i {
  font-size: 1.2rem;
}

/* Form Sections */
.form-section {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.form-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #ff5500;
  padding-bottom: 10px;
}

.form-section h3 i {
  color: #ff5500;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff5500;
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.1);
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #555;
  padding: 8px 15px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.radio-label:hover {
  border-color: #ff5500;
  background: #fff5f0;
}

.radio-label input[type="radio"] {
  width: auto;
  margin-right: 5px;
  accent-color: #ff5500;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #555;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  accent-color: #ff5500;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.form-actions button {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-primary {
  background: #ff5500;
  color: white;
}

.btn-primary:hover {
  background: #e64a00;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 85, 0, 0.3);
}

.btn-primary i {
  margin-right: 8px;
}

/* Form Message */
.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Loading State */
.btn-primary.loading {
  position: relative;
  color: transparent;
}

.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .popup-floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .popup-floating-btn span {
    display: none;
  }
  
  .popup-floating-btn i {
    font-size: 1.5rem;
    margin: 0;
  }

  .popup-container {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .popup-body {
    padding: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 8px;
  }

  .radio-label {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }
}

/* Exit Intent Style (optional) */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.popup-shake {
  animation: shake 0.5s ease;
}