/* contact-form.css - Premium Contact Form & Country Code Dropdown */

/* Form Wrapper & Card */
.form-card {
  background: #0f766e; /* Deep green */
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(15, 118, 110, 0.25);
  max-width: 550px;
  margin: 0 auto;
  margin-top: 54px; /* Align with adjacent block's h2 */
  position: relative;
  overflow: visible; /* Crucial for flag dropdown to overflow */
}

@media (max-width: 992px) {
  .form-card {
    margin-top: 0;
  }
}

@media (max-width: 576px) {
  .form-card {
    padding: 24px;
    margin-top: 0;
  }
}

.form-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.form-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
  line-height: 1.4;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input Wrapper & Floating Label */
.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-label {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-label svg {
  width: 16px;
  height: 16px;
  color: #ffffff;
}

.form-control {
  font-family: var(--font-secondary);
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid #ffffff;
  background: #ffffff;
  color: var(--primary-900);
  outline: none;
  transition: all var(--transition-fast);
  width: 100%;
}

.form-control:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* Custom Phone Group (Dropdown + Input Wrapper) */
.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid #ffffff;
  border-radius: var(--border-radius-md);
  background: #ffffff;
  transition: all var(--transition-fast);
  overflow: visible; /* Ensure dropdown works */
}

.phone-input-wrapper:focus-within {
  border-color: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* Flag Selection Trigger Button */
.flag-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-right: 1px solid var(--primary-200);
  background: transparent;
  color: var(--primary-900);
  cursor: pointer;
  user-select: none;
}

.flag-select-btn:hover {
  background: rgba(15, 23, 42, 0.03);
}

.flag-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.dial-code {
  font-weight: 600;
  font-size: 0.95rem;
}

.chevron-icon {
  width: 12px;
  height: 12px;
  color: var(--primary-600);
  transition: transform var(--transition-fast);
}

.flag-select-btn.active .chevron-icon {
  transform: rotate(180deg);
}

/* Phone text input */
.phone-field {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  flex: 1;
  padding: 14px 16px;
}

/* Custom Dropdown for Flag/Country list */
.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-width: 320px;
  max-height: 300px;
  background: var(--white);
  border: 1px solid var(--primary-200);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
}

.country-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Search Box */
.dropdown-search-wrapper {
  padding: 10px;
  border-bottom: 1px solid var(--primary-100);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 2;
  border-top-left-radius: var(--border-radius-md);
  border-top-right-radius: var(--border-radius-md);
}

.dropdown-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--primary-200);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  outline: none;
}

.dropdown-search:focus {
  border-color: var(--accent-teal);
}

/* Country scroll list */
.country-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-200) transparent;
}

.country-list::-webkit-scrollbar {
  width: 6px;
}

.country-list::-webkit-scrollbar-thumb {
  background-color: var(--primary-200);
  border-radius: 3px;
}

.country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.country-item:hover, .country-item.highlighted {
  background: var(--primary-50);
}

.country-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.country-name {
  font-size: 0.9rem;
  color: var(--primary-800);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.country-item-dial {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-600);
}

/* Submit Button */
.submit-btn {
  width: 100%;
  margin-top: 10px;
  background: #F59E0B !important; /* Spot color: Amber/Orange */
  color: #000000 !important; /* Black text */
  font-weight: 900;
  font-size: 1.05rem;
  border: none;
}

.submit-btn:hover {
  background: #D97706 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.form-privacy-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

.form-privacy-note a {
  color: #ffffff;
  text-decoration: underline;
}

/* Form success message */
.form-success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.form-success-overlay .form-title {
  color: var(--primary-900);
}

.form-success-overlay .form-subtitle {
  color: var(--primary-800);
}

.form-success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: var(--border-radius-full);
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

/* Light Sweep Effect for WhatsApp button in success overlay */
.form-success-overlay .btn-whatsapp {
  position: relative;
  overflow: hidden;
}

.form-success-overlay .btn-whatsapp::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 25%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.4) 75%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: sweepLight 8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes sweepLight {
  0% { left: -150%; }
  50% { left: 250%; }
  100% { left: 250%; }
}

.success-icon-wrapper svg {
  width: 36px;
  height: 36px;
}
