/* ================================================
   MODERN GOAL-BASED LIFE INSURANCE FORM
   PolicyAdvisor.in - Mobile Optimized
   ================================================ */

/* Form Container */
.retirement-quote-form {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 30px auto;
}

/* Progress Bar */
.retirement-progress-wrapper {
  margin-bottom: 30px;
  padding: 0 10px;
}

.retirement-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-text,
.progress-percent {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.progress-percent {
  color: #64748b;
}

.retirement-progress-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.retirement-progress-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, #1d6ae0 0%, #3b82f6 100%);
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* Steps */
.retirement-step {
  display: none;
}

.retirement-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.retirement-step-title {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  text-align: center;
}

.retirement-step-desc {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.6;
}

/* ================================================
   GOAL CARDS (STEP 1)
   ================================================ */

.goal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.goal-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Gradient border effect */
.goal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #1d6ae0, #3b82f6, #60a5fa);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.goal-card:hover::before {
  opacity: 1;
}

.goal-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 20px rgba(29, 106, 224, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  border-color: #1d6ae0;
}

.goal-card.selected {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #1d6ae0;
  border-width: 3px;
  box-shadow: 0 6px 18px rgba(29, 106, 224, 0.2);
}

.goal-card.selected::before {
  opacity: 1;
}

.goal-icon {
  font-size: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.goal-card:hover .goal-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  transform: scale(1.1) rotate(5deg);
}

.goal-card.selected .goal-icon {
  background: linear-gradient(135deg, #1d6ae0 0%, #3b82f6 100%);
  transform: scale(1.1);
}

.goal-content {
  flex: 1;
}

.goal-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.goal-card:hover .goal-title {
  color: #1d6ae0;
}

.goal-card.selected .goal-title {
  color: #1d6ae0;
}

.goal-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.goal-arrow {
  font-size: 20px;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-weight: bold;
}

.goal-card:hover .goal-arrow {
  color: #1d6ae0;
  transform: translateX(4px);
}

.goal-card.selected .goal-arrow {
  color: #1d6ae0;
}

/* ================================================
   PRODUCT CARDS (STEP 2)
   ================================================ */

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.product-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #16a34a, #22c55e, #4ade80);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #16a34a;
}

.product-card.selected {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #16a34a;
  border-width: 3px;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.2);
}

.product-icon {
  font-size: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.product-card:hover .product-icon {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  transform: scale(1.1) rotate(-5deg);
}

.product-card.selected .product-icon {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  transform: scale(1.1);
}

.product-content {
  flex: 1;
}

.product-title {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.product-card:hover .product-title {
  color: #16a34a;
}

.product-card.selected .product-title {
  color: #16a34a;
}

.product-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.product-arrow {
  font-size: 20px;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-weight: bold;
}

.product-card:hover .product-arrow {
  color: #16a34a;
  transform: translateX(4px);
}

.product-card.selected .product-arrow {
  color: #16a34a;
}

/* ================================================
   FORM FIELDS (STEP 3 & 4)
   ================================================ */

.retirement-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.retirement-field-group {
  margin-bottom: 0;
}

.retirement-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.retirement-select,
.retirement-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.3s;
  font-family: inherit;
  background: white;
}

.retirement-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' 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;
  background-size: 20px;
  padding-right: 40px;
  cursor: pointer;
}

.retirement-select option {
  font-size: 16px;
  padding: 8px 12px;
}

.retirement-select:focus,
.retirement-input:focus {
  outline: none;
  border-color: #1d6ae0;
  box-shadow: 0 0 0 3px rgba(29,106,224,0.1);
}

.retirement-select.error,
.retirement-input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.retirement-error {
  display: none;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  margin-top: 6px;
  padding-left: 2px;
}

/* Consent Checkbox */
.retirement-consent {
  margin: 24px 0;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
}

.retirement-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  padding-left: 35px;
}

.retirement-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.retirement-checkbox .checkmark {
  position: absolute;
  left: 0;
  top: 2px;
  height: 22px;
  width: 22px;
  background-color: #fff;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  transition: all 0.3s;
}

.retirement-checkbox:hover .checkmark {
  border-color: #1d6ae0;
}

.retirement-checkbox input:checked ~ .checkmark {
  background-color: #1d6ae0;
  border-color: #1d6ae0;
}

.retirement-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.retirement-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.retirement-checkbox .consent-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* Buttons */
.retirement-btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  width: 100%;
  font-family: inherit;
  margin-top: 15px;
}

.retirement-btn-primary {
  background: linear-gradient(135deg, #1d6ae0 0%, #1557b0 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(29,106,224,0.3);
}

.retirement-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29,106,224,0.4);
}

.retirement-btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(22,163,74,0.3);
  font-size: 20px;
  padding: 18px 36px;
  margin-bottom: 15px;
}

.retirement-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22,163,74,0.4);
}

.retirement-btn-back {
  background: #f3f4f6;
  color: #6b7280;
  width: auto;
  padding: 12px 24px;
  font-size: 16px;
  margin-top: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.retirement-btn-back:hover {
  background: #e5e7eb;
}

.retirement-footer {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-top: 20px;
  line-height: 1.6;
}

/* Pincode Field Animation */
#pincodeField {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 150px;
  }
}

/* ================================================
   MOBILE RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .retirement-quote-form {
    padding: 30px 20px;
    border-radius: 12px;
    margin: 20px 10px;
  }
  
  .retirement-step-title {
    font-size: 22px;
  }
  
  .retirement-step-desc {
    font-size: 15px;
  }
  
  .goal-card,
  .product-card {
    padding: 18px;
    gap: 14px;
  }
  
  .goal-icon,
  .product-icon {
    width: 56px;
    height: 56px;
    font-size: 30px;
  }
  
  .goal-title,
  .product-title {
    font-size: 16px;
  }
  
  .goal-desc,
  .product-desc {
    font-size: 13px;
  }
  
  .retirement-btn-success {
    font-size: 18px;
    padding: 16px 28px;
  }
}

@media (max-width: 480px) {
  .retirement-quote-form {
    padding: 24px 16px;
    border-radius: 8px;
    margin: 15px 8px;
  }
  
  .retirement-step-title {
    font-size: 20px;
  }
  
  .retirement-step-desc {
    font-size: 14px;
  }
  
  .goal-card,
  .product-card {
    padding: 16px;
    gap: 12px;
  }
  
  .goal-icon,
  .product-icon {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }
  
  .goal-title,
  .product-title {
    font-size: 15px;
  }
  
  .goal-desc,
  .product-desc {
    font-size: 12px;
  }
  
  .retirement-btn {
    font-size: 16px;
    padding: 14px 24px;
  }
  
  .retirement-btn-success {
    font-size: 17px;
    padding: 15px 24px;
  }
  
  .retirement-progress-header {
    font-size: 13px;
  }
}