/* ShadcnUI-inspired Contact Form Styles with Material Design inputs */

.contact-form-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 992px) {
  .contact-form-container {
    grid-template-columns: 1fr;
  }
}

/* Stepper container */
.stepper-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 25px;
}

/* Refined form header */
.form-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}

/* Refined stepper design */
.stepper {
  display: flex;
  justify-content: space-between;
  margin: 30px 0;
  position: relative;
  padding: 0 15px;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: rgba(0,0,0,0.12);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #999;
}

.step.active {
  color: var(--accent-color);
}

.step.completed {
  color: var(--primary-color);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #fff;
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: scale(1.1);
}

.step.completed .step-number {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* Form styles */
.shadcn-form {
  font-family: inherit;
  max-width: 100%; /* Prevent horizontal overflow */
}

.form-step {
  display: none;
  padding-top: 10px;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Material Design form groups and inputs */
.form-group {
  margin-bottom: 32px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #666;
  text-align: left; /* Left align labels */
  font-size: 14px;
  transition: color 0.2s;
}

.shadcn-input, 
.shadcn-select,
.shadcn-textarea {
  width: 100%;
  box-sizing: border-box; /* Prevent horizontal overflow */
  padding: 12px 16px;
  background-color: #f5f5f5;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 4px 4px 0 0;
  font-size: 16px;
  transition: all 0.3s;
}

.shadcn-input:focus, 
.shadcn-select:focus,
.shadcn-textarea:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
  background-color: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.shadcn-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Safari-specific fixes for dropdown styling */
.shadcn-select {
  /* Reset default browser styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  /* Make sure Safari respects the styles */
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background-color: #f5f5f5;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 4px 4px 0 0;
  font-size: 16px;
  transition: all 0.3s;
  
  /* Add a custom dropdown arrow that works across browsers */
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px; /* Make room for the arrow */
}

/* Improve focus state for Safari */
.shadcn-select:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
  background-color: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Fix Safari padding issues */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .shadcn-select {
      padding-top: 10px;
      padding-bottom: 10px;
    }
  }
}

/* Fix for select options in Safari */
.shadcn-select option {
  padding: 10px;
  background-color: #fff;
  color: var(--text-dark);
}

/* Fix Safari's specific handling of required fields */
.shadcn-select::-webkit-validation-bubble {
  display: none;
}

/* Error styles */
.form-group.error .shadcn-input,
.form-group.error .shadcn-select,
.form-group.error .shadcn-textarea {
  border-bottom-color: #e53935;
  background-color: rgba(229, 57, 53, 0.03);
}

.form-group.error label {
  color: #e53935;
}

.form-error {
  color: #f44336;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.form-error:before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: #f44336;
  color: white;
  border-radius: 50%;
  margin-right: 6px;
  font-size: 10px;
  font-weight: bold;
}

/* Validation success styles */
.form-group.valid .shadcn-input,
.form-group.valid .shadcn-select,
.form-group.valid .shadcn-textarea {
  border-bottom-color: #4CAF50;
}

.form-group.valid:after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 40px;
  color: #4CAF50;
  font-weight: bold;
}

/* Safari validation bubble fix - expanded */
.shadcn-input::-webkit-validation-bubble,
.shadcn-textarea::-webkit-validation-bubble,
.shadcn-select::-webkit-validation-bubble {
  display: none;
}

.shadcn-input::-webkit-validation-bubble-message,
.shadcn-textarea::-webkit-validation-bubble-message,
.shadcn-select::-webkit-validation-bubble-message {
  display: none;
}

.form-error {
  color: #f44336;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 500;
}

/* Form navigation buttons */
.form-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 35px;
}

.shadcn-button {
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prev-button {
  background-color: #e0e0e0;
  color: #333;
}

.next-button, 
.submit-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.shadcn-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Success message styling */
.form-success {
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  font-size: 56px;
  color: #4CAF50;
  margin-bottom: 20px;
}

.form-success h3 {
  color: #333;
  margin-bottom: 16px;
}

.form-success p {
  color: #666;
  font-size: 16px;
}

/* Contact info section - Updated with buttons */
.contact-info {
  background: white;
  padding: 30px 25px; /* Slightly more top/bottom padding */
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto; /* Let it adjust to the same height */
  box-sizing: border-box; /* Include padding in height calculation */
}

.contact-info h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 28px;
  letter-spacing: -0.5px;
  font-weight: 600;
}

.contact-info p {
  margin: 10px 0;
  color: #666;
}

/* New styles for contact buttons */
.contact-buttons {
  list-style: none;
  padding: 0;
  margin-top: 20px; /* Replace auto with fixed value */
  margin-bottom: 0;
}

.contact-buttons li {
  margin-bottom: 15px;
}

.contact-buttons li:last-child {
  margin-bottom: 0;
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 12px 15px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-btn i {
  margin-right: 10px;
  font-size: 18px;
  /* Always display icons */
  display: inline-block !important;
}

.contact-btn--primary {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.contact-btn--primary:hover {
  background-color: #ffe599;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-btn--primary i {
  color: var(--primary-color); /* Ensure icon matches text color for contrast */
}

.contact-btn--stroke {
  background-color: #ffffff;
  border: 2px solid #25D366;
  color: #25D366;
}

.contact-btn--stroke:hover {
  background-color: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-btn--stroke i {
  color: #25D366; /* WhatsApp green color for icon */
}

.contact-btn img {
  vertical-align: middle;
  height: 24px;
  width: auto;
  margin-right: 8px;
}

.error .shadcn-input,
.error .shadcn-select,
.error .shadcn-textarea {
  border-color: #f44336 !important;
}

/* Form title styling */
.stepper-container .form-title {
  margin: 0;
  color: var(--primary-color);
  font-size: 28px;
  letter-spacing: -0.5px;
  font-weight: 600;
}

.stepper-container .form-subtitle {
  margin-top: 0;
  margin-bottom: 25px;
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Add these styles for a two-column form layout */

/* Form step with grid layout */
.form-step {
  display: none;
  padding-top: 10px;
}

.form-step.active {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  grid-column-gap: 25px;
  animation: fadeIn 0.5s ease;
}

/* For full-width elements that should span both columns */
.form-step h3,
.form-group.full-width,
.form-group textarea,
.form-nav-buttons {
  grid-column: 1 / -1;
}

/* Responsive: Switch to single column on smaller screens */
@media (max-width: 768px) {
  .form-step.active {
    grid-template-columns: 1fr;
  }
}

/* Add styling for the contact image */
.contact-image {
  margin: 20px 0;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-image img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  opacity: 0.85;
}