/*
 * Signup - Multi-step signup form wizard styles
 *
 * Used by residential internet signup flow.
 * Includes step navigation, address selection, and speed/plan cards.
 */

/* Signup Section Layout */
.signup-section {
  padding: 40px 24px;
}

.signup-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Signup Form Container */
.signup-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Step Structure */
.signup-step {
  border-bottom: 1px solid #eee;
}

.signup-step:last-child {
  border-bottom: none;
}

.signup-step.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.signup-step.completed .step-number {
  background: #2d7d46;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #54595F;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-header h2 {
  margin: 0;
  font-size: 1.2em;
}

.step-content {
  padding: 0 24px 24px 72px;
}

.step-badge {
  font-size: 0.65em;
  font-weight: normal;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 8px;
}

.step-badge.optional {
  background: #e0f2fe;
  color: #0369a1;
}

/* Form Labels */
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Address Confirmed Banner */
.address-confirmed-banner {
  background: #d4edda;
  border-bottom: 1px solid #c3e6cb;
  padding: 12px 24px;
  margin-bottom: 0;
}

.address-confirmed-banner .banner-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.address-confirmed-banner .banner-checkmark {
  background: #28a745;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.address-confirmed-banner .banner-info {
  flex: 1;
}

.address-confirmed-banner .banner-info strong {
  display: block;
  font-size: 0.85em;
  color: #155724;
}

.address-confirmed-banner .banner-provider {
  background: #155724;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8em;
}

/* Address Search Form */
.signup-form .address-input-wrapper {
  max-width: none;
  min-width: auto;
}

.address-search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.signup-form .address-input,
.address-search-form .address-input,
#address-input {
  width: 100%;
  max-width: none;
}

/* Address Options (multiple results) */
.address-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.address-option-form {
  margin: 0;
}

.address-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}

.address-option:hover:not(.disabled) {
  border-color: #aaa;
}

.address-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.address-option .address-text {
  font-weight: 500;
  font-size: 1rem;
}

.address-option .network-text {
  font-size: 0.875rem;
  color: #666;
}

.address-option .service-status {
  font-size: 0.85em;
  color: #dc3545;
  margin-top: 4px;
}

/* Confirmed Address Display */
.confirmed-address-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f0fdf4;
  border: 2px solid #2d7d46;
  border-radius: 8px;
}

.change-link {
  background: none;
  border: none;
  color: #DB1E36;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
}

/* Option Cards */
.option-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.option-card:hover {
  border-color: #aaa;
}

.option-card input[type="radio"] {
  margin-right: 12px;
  margin-top: 4px;
}

.option-card:has(input:checked) {
  border-color: #2d7d46;
  background: #f0fdf4;
}

.option-card-content strong {
  display: block;
  margin-bottom: 4px;
}

.option-card-content p {
  margin: 0;
  color: #666;
  font-size: 0.9em;
}

/* Speed Card */
.speed-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.speed-card .price {
  font-size: 1.2em;
  font-weight: bold;
  color: #2d7d46;
  text-align: right;
  min-width: 100px;
}

/* WiFi and Voice Card pricing alignment */
.wifi-card,
.voice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wifi-card .option-card-content,
.voice-card .option-card-content {
  flex: 1;
}

.wifi-card .price,
.voice-card .price {
  font-size: 1.2em;
  font-weight: bold;
  color: #2d7d46;
  text-align: right;
  min-width: 100px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Infrastructure Notice */
.infrastructure-notice {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Porting warning callout */
.porting-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--warning-bg);
  border: 2px solid var(--warning-border);
  border-radius: 8px;
}

.porting-warning-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--warning-text);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

.porting-warning-content {
  flex: 1;
}

.porting-warning-content strong {
  display: block;
  color: #78350f;
  margin-bottom: 4px;
}

.porting-warning-content p {
  margin: 0;
  color: #92400e;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Porting form layout */
.porting-help-text {
  margin-bottom: 20px;
  color: #666;
  font-size: 0.9em;
  line-height: 1.5;
}

.porting-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .porting-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Porting form field styling */
.porting-fields .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.porting-fields .form-label {
  font-weight: 600;
  color: var(--deep-slate);
  font-size: 0.9rem;
}

.form-label-optional {
  font-weight: normal;
  color: #666;
  font-size: 0.85em;
}

.porting-fields .form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--slate-200, #e2e8f0);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.porting-fields .form-input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(219, 30, 54, 0.1);
}

.porting-fields .form-input::placeholder {
  color: #9ca3af;
}

/* Signup-specific Address Result States
 * (Extends base .address-result from forms.css with signup-specific icon styling)
 */
.signup-form .address-result {
  padding: 16px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
}

.signup-form .address-result.success {
  background: var(--success-bg, #f0fdf4);
  border: 2px solid var(--success-border, #86efac);
}

.signup-form .address-result.warning,
.signup-form .address-result.not-available {
  background: var(--warning-bg, #fefce8);
  border: 2px solid var(--warning-border, #fde047);
}

.signup-form .address-result.error {
  background: var(--error-bg, #fef2f2);
  border: 2px solid var(--error-border, #fecaca);
}

.signup-form .address-result.info {
  background: #eff6ff;
  border: 2px solid #93c5fd;
}

.signup-form .address-result .result-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.signup-form .address-result.success .result-icon {
  background: var(--success-text, #16a34a);
  color: white;
}

.signup-form .address-result.warning .result-icon,
.signup-form .address-result.not-available .result-icon {
  background: var(--warning-text, #ca8a04);
  color: white;
}

.signup-form .address-result.error .result-icon {
  background: var(--error-text, #dc2626);
  color: white;
}

.signup-form .address-result.info .result-icon {
  background: #3b82f6;
  color: white;
}

.signup-form .address-result .result-content {
  flex: 1;
}

.signup-form .address-result .result-content strong {
  display: block;
  margin-bottom: 4px;
}

.signup-form .address-result .result-content p {
  margin: 0;
  color: #666;
}

.signup-form .address-result .network-info {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

/* Order Summary (Review Step) */
.order-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 24px;
}

.summary-section {
  padding: 16px 0;
  border-bottom: 1px solid #dee2e6;
}

.summary-section:first-child {
  padding-top: 0;
}

.summary-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-section h4 {
  margin: 0 0 8px 0;
  font-size: 0.9em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-section p {
  margin: 4px 0;
}

.summary-section.pricing .price-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.summary-section.pricing .price-line.total {
  border-top: 2px solid #dee2e6;
  margin-top: 8px;
  padding-top: 16px;
  font-weight: bold;
  font-size: 1.1em;
}

.summary-section.pricing .price-line.infrastructure {
  color: #666;
  font-size: 0.9em;
  font-style: italic;
}

/* Form hints */
.form-hint {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}

/* Required field indicator */
.required {
  color: #dc3545;
}

/* Confirmed display sections - green border/background like confirmed-address-display */
.confirmed-speed-display,
.confirmed-wifi-display,
.confirmed-voice-display,
.confirmed-utility-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f0fdf4;
  border: 2px solid #2d7d46;
  border-radius: 8px;
}

.confirmed-customer-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px;
  background: #f0fdf4;
  border: 2px solid #2d7d46;
  border-radius: 8px;
}

.mesh-info {
  color: #666;
  font-size: 0.9em;
}

/* Voice summary styling */
.voice-summary-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-product {
  font-weight: 500;
}

.porting-info,
.new-number-info {
  font-size: 0.85em;
  color: #666;
}

.porting-info {
  padding-left: 12px;
  border-left: 2px solid var(--slate-200, #e2e8f0);
}

/* Mesh Extender Recommendation Card */
.mesh-recommendation-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.mesh-recommendation-card h4 {
  margin: 0 0 16px 0;
  color: var(--deep-slate, #284968);
}

.mesh-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.mesh-benefits li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 0.9em;
}

.mesh-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2d7d46;
  font-weight: bold;
}

/* Stepper Control */
.mesh-selector-stepper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stepper-control {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: #f8fafc;
  font-size: 1.25em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}

.stepper-btn:hover {
  background: #e2e8f0;
}

.stepper-btn:active {
  background: #cbd5e1;
}

.stepper-value {
  width: 48px;
  text-align: center;
  font-size: 1.1em;
  font-weight: 600;
}

.mesh-price {
  font-weight: 600;
  color: var(--deep-slate, #284968);
}

/* Large submit button */
.button.large {
  padding: 16px 32px;
  font-size: 1.1em;
}

/* Loading spinner */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e0e0e0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mesh and porting info badges */

/* Address input loading state (readonly during form submission) */
.address-input[readonly],
.address-input.loading {
  background-color: var(--slate-100, #f1f5f9);
  cursor: wait;
}

/* Address option with existing service - more prominent styling */
.address-option.has-service {
  opacity: 0.7;
  background: var(--slate-50, #f8fafc);
  border-left: 4px solid var(--brand-red);
}

.address-option.has-service:hover {
  border-color: #ddd;
  border-left-color: var(--brand-red);
}

.service-badge {
  display: inline-block;
  background: var(--brand-red);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Address select card with existing service styling */
.address-select-card.has-service {
  opacity: 0.7;
  background: var(--slate-50, #f8fafc);
  border-left: 4px solid var(--brand-red);
  cursor: not-allowed;
}

.address-select-card.has-service:hover {
  border-color: #ddd;
  border-left-color: var(--brand-red);
}

/* Selection hint for required choices */
.selection-hint {
  color: var(--slate-600, #54595F);
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: center;
}

.selection-hint.hidden {
  display: none;
}

/* Customer Information Form - Step 5 */
.customer-form-intro {
  margin-bottom: 24px;
  color: var(--slate-600, #54595F);
}

.customer-info-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
}

.customer-info-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-info-form .field-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--slate-800, #1a202c);
}

.customer-info-form .field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--slate-200, #e2e8f0);
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.customer-info-form .field input::placeholder {
  color: var(--slate-400, #9ca3af);
}

.customer-info-form .field input:hover {
  border-color: var(--slate-300, #cbd5e1);
}

.customer-info-form .field input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(219, 30, 54, 0.1);
}

.customer-info-form .form-hint {
  font-size: 0.85rem;
  color: var(--slate-500, #64748b);
  margin-top: 4px;
}

.customer-info-form .button {
  margin-top: 8px;
  align-self: flex-start;
}
