/*
========================================
 PaylessWatts Solar Form (React)
 Backup Power Step - Premium Configurator Design
========================================
*/

/* Overall container with premium background */
.step-backup-power {
  position: relative;
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 30px;
}

/* Section title styling */
.backup-step-title {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.backup-step-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #3D7BF4;
  border-radius: 2px;
}

.backup-step-subtitle {
  font-size: 18px;
  color: #64748b;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Backup type selector - Card style with premium hover effects */
.backup-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  animation: fadeIn 0.5s ease-in-out;
}

@media (max-width: 768px) {
  .backup-options {
    grid-template-columns: 1fr;
  }
}

/* Premium card styling for options */
.backup-option-card {
  position: relative;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  min-height: 180px;
}

.backup-option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(61, 123, 244, 0.5);
}

.backup-option-card.selected {
  border-color: #3D7BF4;
  background-color: rgba(61, 123, 244, 0.05);
  box-shadow: 0 8px 24px rgba(61, 123, 244, 0.15);
}

.backup-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Premium styled icon container */
.backup-icon-container {
  position: relative;
  font-size: 3rem;
  margin-bottom: 20px;
  color: #64748b;
  transition: all 0.3s ease;
  height: 80px;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.backup-option-card:hover .backup-icon-container {
  transform: scale(1.1);
  color: #3D7BF4;
  background: #EFF6FF;
  box-shadow: 0 8px 16px rgba(61, 123, 244, 0.15);
}

.backup-option-card.selected .backup-icon-container {
  color: #3D7BF4;
  background: #EFF6FF;
  box-shadow: 0 8px 16px rgba(61, 123, 244, 0.2);
}

.static-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.animated-battery-icon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.backup-option-card.selected .static-icon {
  opacity: 0;
}

.backup-option-card.selected .animated-battery-icon {
  opacity: 1;
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% {
    color: #3D7BF4;
    text-shadow: 0 0 10px rgba(61, 123, 244, 0.5);
  }
  50% {
    color: #1DCD8D;
    text-shadow: 0 0 20px rgba(29, 205, 141, 0.7);
  }
}

.option-text {
  font-weight: 600;
  font-size: 20px;
  color: #1e293b;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.option-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 15px;
  line-height: 1.4;
}

.backup-option-card.selected .option-text {
  color: #3D7BF4;
  font-weight: 700;
}

/* Premium "selected" badge */
.selected-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #1DCD8D;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.backup-option-card.selected .selected-badge {
  opacity: 1;
  transform: scale(1);
}

/* Products configurator section */
.backup-products-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-top: 20px;
  animation: fadeIn 0.5s ease-in-out;
  border: 1px solid #e2e8f0;
}

.backup-products-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.backup-products-title i {
  margin-right: 10px;
  color: #3D7BF4;
}

/* Product cards - Car configurator style */
.backup-product-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .backup-product-cards {
    grid-template-columns: 1fr;
  }
}

/* Product card with premium styling */
.product-card {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background-color: white;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.product-card.selected {
  border-color: #3D7BF4;
  box-shadow: 0 8px 24px rgba(61, 123, 244, 0.12);
}

.product-card-header {
  display: flex;
  align-items: center;
  background: #f8fafc;
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.product-card.selected .product-card-header {
  background: rgba(61, 123, 244, 0.08);
  border-bottom-color: rgba(61, 123, 244, 0.2);
}

.product-icon {
  font-size: 24px;
  color: #64748b;
  margin-right: 15px;
  transition: all 0.3s ease;
}

.product-card.selected .product-icon {
  color: #3D7BF4;
}

.product-name {
  font-weight: 700;
  font-size: 18px;
  color: #1e293b;
  transition: all 0.3s ease;
  flex-grow: 1;
}

.product-card.selected .product-name {
  color: #3D7BF4;
}

/* Checkbox styling - Premium */
.checkbox-container {
  position: relative;
  display: flex;
  align-items: center;
}

.checkbox-checkmark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  background-color: white;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.product-card.selected .checkbox-checkmark {
  background-color: #3D7BF4;
  border-color: #3D7BF4;
}

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

.product-card.selected .checkbox-checkmark:after {
  display: block;
}

/* Hide actual checkbox */
.product-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Product card body */
.product-card-body {
  padding: 20px;
}

.product-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Premium product image */
.product-image {
  height: 160px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.product-image.battery {
  background-image: url('../img/battery-storage.jpg');
}

.product-image.generator {
  background-image: url('../img/standby-generator.jpg');
}

/* Product specs - premium table */
.product-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
}

.product-spec {
  display: flex;
  flex-direction: column;
}

.spec-label {
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 500;
}

.spec-value {
  color: #1e293b;
  font-weight: 600;
}

/* Mobile collapsible content */
.product-collapsible-content {
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.product-collapsible-toggle {
  display: none;
  width: 100%;
  text-align: center;
  padding: 8px;
  background: #f8fafc;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.product-collapsible-toggle i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.product-collapsible-toggle.expanded i {
  transform: rotate(180deg);
}

/* Product pricing section - Premium */
.product-pricing {
  background: #f1f5f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.product-card.selected .product-pricing {
  background: rgba(61, 123, 244, 0.08);
}

.price-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.price-label {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 3px;
}

.price-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: flex-end;
}

.product-card.selected .price-value {
  color: #3D7BF4;
}

.price-unit {
  font-size: 14px;
  color: #64748b;
  margin-left: 3px;
  font-weight: 500;
  margin-bottom: 3px;
}

/* Quantity control - Premium car configurator style */
.quantity-control-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quantity-control-label {
  font-weight: 600;
  font-size: 14px;
  color: #64748b;
}

.product-quantity {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  z-index: 2;
  height: 42px;
  width: 130px;
}

.product-card.selected .product-quantity {
  border-color: #3D7BF4;
  box-shadow: 0 2px 8px rgba(61, 123, 244, 0.15);
}

.quantity-btn {
  width: 42px;
  height: 42px;
  border: none;
  background-color: #f8fafc;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease;
  font-size: 18px;
  color: #64748b;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.quantity-btn:hover {
  background-color: #f1f5f9;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-btn-minus {
  border-right: 1px solid #e2e8f0;
}

.quantity-btn-plus {
  border-left: 1px solid #e2e8f0;
  color: #3D7BF4;
}

.product-card.selected .quantity-btn-plus {
  background-color: #EFF6FF;
}

/* Fix button content */
.quantity-btn-minus:after {
  content: "-";
  display: block;
  font-size: 22px;
  line-height: 1;
}

.quantity-btn-plus:after {
  content: "+";
  display: block;
  font-size: 22px;
  line-height: 1;
}

.quantity-input {
  width: 50px;
  border: none;
  background: transparent;
  text-align: center;
  padding: 0;
  font-weight: 700;
  color: #1e293b;
  font-size: 16px;
  pointer-events: none;
}

.product-card.selected .quantity-input {
  color: #3D7BF4;
}

/* Item total price - Premium car configurator style */
.product-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding: 12px 15px;
  background: #f8fafc;
  border-radius: 8px;
  transition: all 0.3s ease;
  visibility: visible !important;
  opacity: 1 !important;
  border: 1px dashed #cbd5e1;
}

.product-card.selected .product-total {
  background: rgba(29, 205, 141, 0.08);
  border-color: rgba(29, 205, 141, 0.3);
}

.total-label {
  font-weight: 600;
  font-size: 14px;
  color: #64748b;
  display: inline-block;
  visibility: visible !important;
}

.total-value {
  font-weight: 700;
  font-size: 18px;
  color: #1e293b;
  display: inline-block;
  visibility: visible !important;
}

.product-card.selected .total-value {
  color: #1DCD8D;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .product-card-body {
    padding: 15px;
  }
  
  .product-image {
    height: 120px;
  }
  
  .product-collapsible-content {
    max-height: 0;
  }
  
  .product-collapsible-content.expanded {
    max-height: 1000px;
  }
  
  .product-collapsible-toggle {
    display: block;
  }
  
  .product-card.selected .product-collapsible-content {
    max-height: 1000px;
  }
  
  .product-specs {
    grid-template-columns: 1fr;
  }
  
  .backup-product-cards {
    gap: 15px;
  }
  
  .backup-products-section {
    padding: 20px 15px;
  }
  
  /* Enhanced quantity controls for mobile */
  .quantity-control-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .product-quantity {
    width: 100%;
  }
  
  .product-card.selected {
    border-width: 2px;
    box-shadow: 0 10px 30px rgba(61, 123, 244, 0.15);
  }
  
  /* Make the card header more finger-friendly on mobile */
  .product-card-header {
    padding: 20px 15px;
  }
  
  /* Improved feedback message for mobile */
  .backup-feedback-message {
    padding: 15px;
  }
  
  /* Make price display clearer on mobile */
  .product-pricing {
    padding: 12px;
  }
  
  .product-total {
    padding: 15px 12px;
  }
}

/* Animation for the selected card */
@keyframes selectPulse {
  0% {
    box-shadow: 0 8px 24px rgba(61, 123, 244, 0.12);
  }
  50% {
    box-shadow: 0 8px 30px rgba(61, 123, 244, 0.25);
  }
  100% {
    box-shadow: 0 8px 24px rgba(61, 123, 244, 0.12);
  }
}

.product-card.selected {
  animation: selectPulse 2s ease-in-out infinite;
}

/* Order summary - Premium car configurator style */
.backup-order-summary {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  margin-top: 30px;
  border: 1px solid #e2e8f0;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.summary-title i {
  margin-right: 10px;
  color: #3D7BF4;
}

.summary-items {
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.summary-item:last-child {
  border-bottom: none;
}

.item-name {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #1e293b;
}

.item-quantity {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
  margin-left: 8px;
  color: #64748b;
}

.item-price {
  font-weight: 600;
  color: #1e293b;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 2px solid #f1f5f9;
  margin-top: 10px;
}

.total-text {
  font-weight: 700;
  font-size: 18px;
  color: #1e293b;
}

.total-price {
  font-weight: 700;
  font-size: 24px;
  color: #3D7BF4;
}

/* Disclaimer text */
.price-disclaimer {
  margin-top: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #64748b;
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

/* Continue Button - Premium */
.backup-continue-btn {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

#backupStepContinueBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  background: linear-gradient(to right, #3D7BF4, #5D5FEF);
  color: white;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(61, 123, 244, 0.3);
  position: relative;
  overflow: hidden;
}

#backupStepContinueBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 123, 244, 0.4);
  background: linear-gradient(to right, #3567D6, #4A4BDB);
}

#backupStepContinueBtn:active {
  transform: translateY(0);
}

.btn-icon-lightning {
  margin-right: 10px;
  font-size: 20px;
}

/* Animation for quantity change */
@keyframes quantityPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.quantity-change {
  animation: quantityPulse 0.3s ease-in-out;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button back */
.btn-back {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 30px;
  color: #6c757d;
  cursor: pointer;
  font-weight: 500;
  padding: 10px 20px;
  text-align: center;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.btn-back:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
  color: #495057;
}

.btn-back i {
  margin-right: 8px;
} 