/* Custom Form for Elementor - Stylesheet */

.cfe-form-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: transparent;
  border: none;
  padding: 0;
  transition: all 0.3s ease;
}

.cfe-form-container * {
  box-sizing: border-box;
}

/* Title */
.cfe-form-title {
  margin-top: 0;
  text-align: center;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cfe-form-title span,
.cfe-form-title strong {
  font-weight: 700;
}

/* Fields Group */
.cfe-field-group {
  display: flex;
  flex-direction: column;
}

.cfe-field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

/* Standard Inputs - Uniform Height & Alignment */
.cfe-input {
  width: 100%;
  height: 52px;
  min-height: 52px;
  line-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  padding: 0 16px;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cfe-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
}

.cfe-input:focus {
  outline: none;
  border-color: #5bf1ff;
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 12px rgba(91, 241, 255, 0.35);
}

/* Remove number input spinners / arrows */
.cfe-form-container input[type="number"]::-webkit-outer-spin-button,
.cfe-form-container input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.cfe-form-container input[type="number"],
input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Textarea styling - Generous height & NO scrollbars */
.cfe-form-container textarea.cfe-textarea,
.cfe-form-container textarea,
textarea.cfe-textarea {
  display: block !important;
  width: 100% !important;
  height: 120px !important;
  min-height: 120px !important;
  line-height: 1.55 !important;
  padding: 14px 16px !important;
  resize: none !important;
  overflow: hidden !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

.cfe-form-container textarea.cfe-textarea::-webkit-scrollbar,
.cfe-form-container textarea::-webkit-scrollbar,
.cfe-textarea::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Select & Dropdown Styling */
.cfe-select-wrapper {
  position: relative;
  width: 100%;
}

.cfe-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
}

.cfe-select option {
  background-color: #121824;
  color: #ffffff;
}

.cfe-select-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #5bf1ff;
  border-bottom: 2px solid #5bf1ff;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

/* Phone Wrapper with Country Code - Matched Height */
.cfe-phone-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cfe-phone-wrapper:focus-within {
  border-color: #5bf1ff;
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 12px rgba(91, 241, 255, 0.35);
}

.cfe-ddi-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  cursor: pointer;
}

.cfe-ddi-badge {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

.cfe-ddi-arrow {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin-left: 4px;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.cfe-ddi-select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer;
  z-index: 2;
  font-size: 16px;
}

.cfe-ddi-select option {
  background-color: #161b22;
  color: #ffffff;
  font-size: 15px;
  padding: 10px 14px;
}

.cfe-phone-wrapper .cfe-phone-input {
  flex: 1;
  height: 100% !important;
  min-height: 100% !important;
  line-height: normal !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 16px !important;
}

/* Disclaimer text */
.cfe-disclaimer {
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 22px;
  text-align: left;
}

/* Submit Button */
.cfe-button-wrapper {
  display: flex;
  width: 100%;
}

.cfe-align-left {
  justify-content: flex-start;
}

.cfe-align-center {
  justify-content: center;
}

.cfe-align-right {
  justify-content: flex-end;
}

.cfe-align-justify .cfe-submit-button {
  width: 100%;
}

.cfe-submit-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cfe-submit-button:active {
  transform: scale(0.985);
}

.cfe-submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinner */
.cfe-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: cfe-spin 0.75s linear infinite;
}

.cfe-submit-button.is-loading .cfe-btn-spinner {
  display: inline-block;
}

@keyframes cfe-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Feedback message */
.cfe-feedback-message {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 500;
}

.cfe-feedback-message.is-success {
  background-color: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.cfe-feedback-message.is-error {
  background-color: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ==========================================
   Mobile Responsiveness (Screens <= 600px)
   ========================================== */
@media (max-width: 600px) {
  .cfe-phone-wrapper {
    width: 100% !important;
  }

  .cfe-ddi-box {
    width: 96px !important;
    max-width: 96px !important;
    min-width: 96px !important;
    padding: 0 8px 0 10px !important;
  }

  .cfe-phone-wrapper .cfe-phone-input {
    padding: 0 12px !important;
    font-size: 0.95rem !important;
  }
}
