/**
 * Join Form CSS - New Modern Design
 * Complete redesign for the Aroma Matrimony join form
 */

/* Base styling and variables */
:root {
  --primary-color: #ef4444; /* Red - main theme color */
  --primary-light: #f87171;
  --primary-dark: #dc2626;
  --secondary-color: #b91c1c; /* Darker Red */
  --secondary-light: #ef4444;
  --accent-color: #991b1b; /* Deep Red */
  --success-color: #10b981; /* Emerald */
  --warning-color: #f59e0b; /* Amber */
  --danger-color: #ef4444; /* Red */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --border-radius-2xl: 2rem;
  --border-radius-full: 9999px;
}

body {
  background-color: #f5f7ff;
  color: var(--gray-700);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Main container styling */
.join-form-container {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* Card styling with glass morphism effect */
.join-form-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.join-form-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 1.75rem 2rem;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
  transform: rotate(30deg);
  pointer-events: none;
}

.card-header h4 {
  margin: 0;
  font-weight: 700;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.card-body {
  padding: 0;
  background-color: white;
}

/* Step indicators and progress */
.step-indicator-wrapper {
  padding: 2rem 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.step-indicator {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.step-indicator span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-full);
  background-color: var(--primary-color);
  color: white;
  margin-right: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.progress {
  height: 8px;
  margin: 0 2rem 2rem;
  border-radius: var(--border-radius-full);
  background-color: var(--gray-100);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-bar {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Form sections wrapper */
.form-sections-wrapper {
  position: relative;
  min-height: 500px;
  padding: 0 2rem 2rem;
}

/* Form section styling with 3D transitions */
.form-section {
  position: absolute;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) rotateX(10deg);
  transform-origin: top center;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
  padding: 1rem 0;
  perspective: 1000px;
}

.form-section.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotateX(0);
  pointer-events: all;
  animation: fadeInUp 0.6s ease-out;
}

/* Enhanced animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px) rotateX(10deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Section headings */
.section-heading {
  margin-bottom: 1.75rem;
  position: relative;
}

.section-heading h5 {
  color: var(--gray-800);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section-heading h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: var(--border-radius-full);
  transform: scaleX(0.7);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.section-heading:hover h5::after {
  transform: scaleX(1);
}

/* Form controls styling */
.form-group {
  margin-bottom: 1.75rem;
  position: relative;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-size: 0.9rem;
  display: block;
  transition: color 0.3s ease;
}

.form-control {
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
  font-size: 1rem;
  background-color: white;
  width: 100%;
  color: var(--gray-800);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
}

.form-control:hover:not(:focus) {
  border-color: var(--gray-300);
}

.form-group:focus-within .form-label {
  color: var(--primary-color);
}

/* Custom styling for select elements */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Custom styling for date inputs */
input[type="date"].form-control {
  padding-right: 10px;
}

/* Placeholder styling */
::placeholder {
  color: var(--gray-400);
  opacity: 1;
}

/* Validation styling */
.form-control.is-invalid {
  border-color: var(--danger-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef4444' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

/* Select2 customization */
.select2-container--default .select2-selection--single {
  height: 48px;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.select2-container--default .select2-selection--single:hover {
  border-color: var(--gray-300);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 46px;
  padding-left: 1rem;
  color: var(--gray-800);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-color);
}

.select2-dropdown {
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.select2-container--open .select2-dropdown {
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Navigation buttons styling */
.form-navigation {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  margin-top: 1rem;
}

.nav-button {
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}

.nav-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.nav-button:active::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(30, 30);
    opacity: 0;
  }
}

.prev-button {
  background-color: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.prev-button:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.next-button, .submit-button {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.next-button:hover, .submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.next-button:active, .submit-button:active, .prev-button:active {
  transform: translateY(1px);
}

/* Image upload styling */
.image-upload-container {
  border: 2px dashed var(--primary-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  background-color: var(--gray-50);
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.image-upload-container:hover {
  background-color: var(--gray-100);
  border-color: var(--primary-dark);
}

.image-upload-container.drag-over {
  background-color: rgba(239, 68, 68, 0.05);
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}

.image-upload-placeholder i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.image-upload-placeholder p {
  margin: 0;
  font-size: 1rem;
}

.image-upload-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.selected-images-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.selected-image-item {
  position: relative;
  width: 150px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.selected-image-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.selected-image-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.selected-image-item .image-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cover-photo-radio {
  margin: 0;
  cursor: pointer;
}

.cover-photo-label {
  color: white;
  font-size: 0.8rem;
  margin: 0;
  cursor: pointer;
}

.remove-image-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin: 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.remove-image-btn:hover {
  opacity: 1;
}

.cover-photo-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-full);
  font-weight: 600;
}

/* OTP section styling */
.otp-section {
  background-color: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.otp-section:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}

#sendOtpBtn, #verifyOtpBtn {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

#sendOtpBtn:hover, #verifyOtpBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
}

/* Mobile input group */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group-prepend {
  margin-right: -1px;
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

/* Country code select styling */
.country-code-wrapper {
  min-width: 120px;
  max-width: 120px;
}

.country-code-select {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  height: 100%;
  padding: 0.375rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4 6 8.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.country-code-select:focus {
  background-color: var(--primary-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4 6 8.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  color: white;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 0.2rem rgba(231, 29, 54, 0.25);
  outline: none;
}

.country-code-select option {
  background-color: white;
  color: #333;
  font-weight: normal;
  padding: 8px;
}

/* OTP timer styling */
.otp-timer {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Resend OTP button */
.btn-outline-danger {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background-color: transparent;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-danger:hover {
  color: white;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(231, 29, 54, 0.3);
}

.input-group > .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Small text styling */
.text-muted {
  color: var(--gray-500) !important;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .join-form-container {
    margin: 2rem auto;
  }
  
  .card-header {
    padding: 1.5rem;
  }
  
  .step-indicator-wrapper,
  .progress,
  .form-sections-wrapper,
  .form-navigation {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .form-sections-wrapper {
    min-height: 450px;
  }
}

@media (max-width: 768px) {
  .join-form-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  
  .card-header {
    padding: 1.25rem;
  }
  
  .step-indicator-wrapper,
  .progress,
  .form-sections-wrapper,
  .form-navigation {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  
  .form-sections-wrapper {
    min-height: 400px;
  }
  
  .nav-button {
    padding: 0.6rem 1.25rem;
  }
  
  .section-heading h5 {
    font-size: 1.15rem;
  }
}

@media (max-width: 576px) {
  .join-form-container {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .step-indicator-wrapper,
  .progress,
  .form-sections-wrapper,
  .form-navigation {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .form-sections-wrapper {
    min-height: 350px;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .nav-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .step-indicator {
    font-size: 0.9rem;
  }
  
  .step-indicator span {
    width: 28px;
    height: 28px;
  }
  
  .section-heading h5 {
    font-size: 1.1rem;
  }
}