/* Property Wizard Widget - Enhanced Responsive Styles */
.pw-widget-container {
/*  background: #f8f9fa;*/
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}


.pw-widget-container-inner {
  max-width: 1100px;
  width: 100%;
  background: transparent;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Progress Dots */
.pw-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 40px 0;
  flex-wrap: wrap;
  width: 100%;
  max-width: 600px;
}

.pw-progress-dot {
  width: 42px;
  height: 5px;
  background: #d1d5db;
  border-radius: 3px;
  transition: all 0.3s ease;
  flex: 0 0 auto;
}

.pw-progress-dot.pw-active {
  background: #1e3a8a;
}

.pw-progress-dot.pw-completed {
  background: #1e3a8a;
}

/* Header */
.pw-step-header {
  text-align: center;
  margin-bottom: 50px;
}

.pw-step-header h1 {
  font-size: 28px;
  color: #1e3a8a;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

/* Wizard Content - Below the progress dots */
.pw-wizard-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Step Content */
.pw-step-content {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.pw-step-content.pw-active {
  display: block;
  animation: pw-fadeIn 0.4s ease;
}

@keyframes pw-fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Cards Grid */
.pw-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.pw-cards-grid.pw-sub-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Property Card with Image */
.pw-property-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.pw-property-card:hover {
  border-color: #1e3a8a;
  box-shadow: 0 6px 20px rgba(30,58,138,0.15);
  transform: translateY(-4px);
}

.pw-property-card.pw-selected {
  border-color: #1e3a8a;
  border-width: 3px;
  box-shadow: 0 8px 24px rgba(30,58,138,0.2);
}

.pw-property-card.pw-selected::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  background: #1e3a8a;
  border-radius: 50%;
  z-index: 2;
}

.pw-property-card.pw-selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.pw-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.pw-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.pw-property-card:hover .pw-card-image img {
  transform: scale(1.05);
}

.pw-card-label {
  padding: 20px;
  font-size: 16px;
  color: #1e3a8a;
  font-weight: 500;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icon Cards */
.pw-icon-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 30px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.pw-icon-card:hover {
  border-color: #1e3a8a;
  box-shadow: 0 6px 20px rgba(30,58,138,0.15);
  transform: translateY(-4px);
}

.pw-icon-card.pw-selected {
  border-color: #1e3a8a;
  border-width: 3px;
  box-shadow: 0 8px 24px rgba(30,58,138,0.2);
}

.pw-icon-card.pw-selected::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  background: #1e3a8a;
  border-radius: 50%;
}

.pw-icon-card.pw-selected::after {
  content: '✓';
  position: absolute;
  top: 16px;
  right: 16px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.pw-card-icon {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-grow: 1;
}

.pw-card-icon svg {
  width: 85px;
  height: 85px;
  stroke: #1e3a8a;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pw-card-label-icon {
  font-size: 16px;
  color: #1e3a8a;
  font-weight: 500;
  text-align: center;
  padding: 0 10px;
}

/* Buttons */
.pw-button-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.pw-btn {
  padding: 16px 45px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 56px;
}

.pw-btn-back {
  background: #e5e7eb;
  color: #374151;
  padding: 16px 32px;
}

.pw-btn-back:hover {
  background: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pw-btn-next {
  background: #1e3a8a;
  color: #ffffff;
  min-width: 200px;
  justify-content: center;
}

.pw-btn-next:hover:not(:disabled) {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,58,138,0.3);
}

.pw-btn-next:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.pw-btn-icon-left::before {
  content: '←';
  font-size: 20px;
}

.pw-btn-icon-right::after {
  content: '→';
  font-size: 20px;
}

/* Sliders */
.pw-slider-group {
  margin-bottom: 50px;
  width: 100%;
  box-sizing: border-box;
}

.pw-slider-group label {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: #1f2937;
  margin-bottom: 20px;
  line-height: 1.6;
}

.pw-slider-value-display {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 400;
  color: #1f2937;
  margin-bottom: 18px;
  display: inline-block;
  min-width: 90px;
  box-sizing: border-box;
}

.pw-custom-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.pw-custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.pw-custom-slider::-webkit-slider-thumb:hover {
  background: #1e40af;
  transform: scale(1.1);
}

.pw-custom-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.pw-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

/* Form */
.pw-form-section {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.pw-form-group {
  margin-bottom: 28px;
  width: 100%;
  box-sizing: border-box;
}

.pw-form-group label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 10px;
}

.pw-form-group input {
  width: 100%;
  padding: 15px 18px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  color: #1f2937;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.pw-form-group input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 4px rgba(30,58,138,0.1);
}

.pw-form-group input.pw-error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.pw-form-group input.pw-error:focus {
  box-shadow: 0 0 0 4px rgba(220,38,38,0.1);
}

.pw-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Gender & Interest */
.pw-gender-selection, .pw-interest-options {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.pw-gender-option, .pw-interest-option {
  flex: 0 0 auto;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.pw-gender-option input[type="radio"], .pw-interest-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.pw-gender-label, .pw-interest-label {
  margin-left: 8px;
  font-size: 16px;
  color: #1f2937;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 24px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #ffffff;
  white-space: nowrap;
  box-sizing: border-box;
}

.pw-gender-option input[type="radio"]:checked + .pw-gender-label,
.pw-interest-option input[type="radio"]:checked + .pw-interest-label {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
}

/* Phone */
.pw-phone-input-group {
  display: flex;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pw-country-code-select {
    color: #111827;
    background-color: #ffffff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding-right: 2.5rem; /* space for arrow */
}

/* IMPORTANT: selected value visibility */
.pw-country-code-select option {
    color: #111827;
}

/* Fix phone input to match */
.pw-phone-input-group input[type="tel"] {
  flex: 1;
  color: #1f2937; /* Ensure text is visible */
  background: #ffffff;
}

/* Terms */
.pw-terms-checkbox {
  margin-top: 30px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.pw-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pw-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.pw-checkbox-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  flex: 1;
}

.pw-terms-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

/* Thank You */
.pw-thankyou-container {
  text-align: center;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.pw-thankyou-title {
  font-size: 32px;
  color: #1e3a8a;
  font-weight: 500;
  margin-bottom: 20px;
}

.pw-thankyou-subtitle {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 50px;
}

.pw-contact-section {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  box-sizing: border-box;
}

.pw-contact-image {
  flex: 0 0 200px;
  box-sizing: border-box;
}

.pw-contact-image img {
  width: 100% !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pw-contact-message {
  flex: 1;
  text-align: left;
  box-sizing: border-box;
}

.pw-contact-text {
  font-size: 20px;
  color: #1e3a8a;
  font-weight: 500;
  line-height: 1.6;
}

.pw-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
  width: 100%;
  box-sizing: border-box;
}

.pw-action-btn {
  background: #e0f2fe;
  color: #0369a1;
  border: 2px solid #0369a1;
  padding: 16px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.pw-action-btn:hover {
  background: #0369a1;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3,105,161,0.3);
}

.pw-celebration-message {
  text-align: center;
  font-size: 18px;
  color: #059669;
  font-weight: 500;
  margin-bottom: 20px;
  animation: pw-fadeInScale 0.5s ease;
}

@keyframes pw-fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Enhanced Responsive Fixes */
@media (max-width: 1024px) {
  .pw-widget-container {
    padding: 20px 15px;
  }
  
  .pw-cards-grid {
    gap: 15px;
  }
  
  .pw-property-card, .pw-icon-card {
    padding: 15px;
  }
  
  .pw-card-image {
    height: 150px;
  }
  
  .pw-card-icon svg {
    width: 70px;
    height: 70px;
  }
  
  .pw-step-header h1 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .pw-widget-container {
    padding: 15px 10px;
  }
  
  .pw-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  
  .pw-cards-grid.pw-sub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pw-form-row {
    grid-template-columns: 1fr;
  }
  
  .pw-button-container {
    flex-direction: column;
  }
  
  .pw-btn-next {
    min-width: 100%;
    order: -1;
  }
  
  .pw-contact-section {
    flex-direction: column;
    padding: 25px;
  }
  
  .pw-contact-message {
    text-align: center;
  }
  
  .pw-contact-image {
    flex: 0 0 auto;
    width: 100%;
  }
  
  
  .pw-thankyou-title {
    font-size: 28px;
  }
  
  .pw-thankyou-subtitle {
    font-size: 16px;
  }
  
  .pw-property-card, .pw-icon-card {
    padding: 10px;
  }
  
  .pw-card-image {
    height: 130px;
  }
  
  .pw-card-label {
    font-size: 14px;
    padding: 15px;
  }
  
  .pw-card-icon {
    height: 80px;
    margin-bottom: 15px;
  }
  
  .pw-card-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .pw-card-label-icon {
    font-size: 14px;
  }
  
  .pw-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 50px;
  }
  
  .pw-step-header h1 {
    font-size: 22px;
  }
  
  .pw-form-group input {
    font-size: 15px;
    padding: 12px 15px;
  }
  
  .pw-gender-label, .pw-interest-label {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .pw-phone-input-group {
    flex-direction: column;
  }
  
  .pw-country-code-select {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .pw-widget-container {
    padding: 10px 5px;
  }
  
  .pw-cards-grid, .pw-cards-grid.pw-sub-grid {
    grid-template-columns: 1fr;
  }
  
  .pw-progress-dots {
    gap: 5px;
  }
  
  .pw-progress-dot {
    width: 30px;
    height: 4px;
  }
  
  .pw-step-header {
    margin-bottom: 30px;
  }
  
  .pw-step-header h1 {
    font-size: 20px;
  }
  
  .pw-cards-grid {
    margin-bottom: 40px;
    gap: 15px;
  }
  
  .pw-property-card, .pw-icon-card {
    padding: 8px;
  }
  
  .pw-card-image {
    height: 120px;
  }
  
  .pw-card-label {
    font-size: 13px;
    padding: 12px;
  }
  
  .pw-card-icon {
    height: 70px;
    margin-bottom: 12px;
  }
  
  .pw-card-icon svg {
    width: 50px;
    height: 50px;
  }
  
  .pw-card-label-icon {
    font-size: 13px;
  }
  
  .pw-btn {
    padding: 12px 15px;
    font-size: 14px;
    min-height: 45px;
  }
  
  .pw-slider-group {
    margin-bottom: 30px;
  }
  
  .pw-form-group {
    margin-bottom: 20px;
  }
  
  .pw-form-group label {
    font-size: 14px;
  }
  
  .pw-form-group input {
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .pw-gender-selection, .pw-interest-options {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .pw-gender-label, .pw-interest-label {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .pw-thankyou-title {
    font-size: 24px;
  }
  
  .pw-thankyou-subtitle {
    font-size: 15px;
    margin-bottom: 30px;
  }
  
  .pw-contact-section {
    padding: 20px;
  }
  

  
  .pw-contact-text {
    font-size: 18px;
  }
  
  .pw-action-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .pw-celebration-message {
    font-size: 16px;
  }
}

/* Fix for WordPress content wrappers */
.entry-content .pw-widget-container,
.site-main .pw-widget-container {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Ensure proper box sizing */
.pw-widget-container *,
.pw-widget-container *::before,
.pw-widget-container *::after {
  box-sizing: border-box !important;
}

/* Fix for potential theme conflicts */
.pw-widget-container form,
.pw-widget-container input,
.pw-widget-container button,
.pw-widget-container select {
  font-family: inherit;
  font-size: inherit;
}

@media (max-width: 768px) {
  .pw-widget-container {
    padding: 15px 10px;
  }
  
  .pw-progress-dots {
    margin: 15px 0 30px 0;
    gap: 5px;
  }
  
  .pw-progress-dot {
    width: 30px;
    height: 4px;
  }
}

@media (max-width: 480px) {
  .pw-widget-container {
    padding: 10px 5px;
  }
  
  .pw-progress-dots {
    margin: 10px 0 25px 0;
  }
}