// Portal address cards
.address-card {
  position: relative;
}

.address-header {
  display: flex;
  align-items: flex-start;
  gap: $space-3;
  margin-bottom: $space-3;
}

.address-icon {
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.6;
}

.address-info {
  flex: 1;
  min-width: 0;
}

.address-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pico-color);
  display: flex;
  align-items: center;
  gap: $space-2;
  flex-wrap: wrap;
}

.primary-badge {
  @include badge(var(--pico-primary-background), var(--pico-primary-inverse), $radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.address-details {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--pico-muted-color);
  margin-bottom: $space-4;
  padding-left: calc(1.25rem + #{$space-3});
}

.address-phone {
  color: var(--pico-color);
  font-weight: 500;
}

.address-actions {
  display: flex;
  gap: $space-2;
  flex-wrap: wrap;
  padding-left: calc(1.25rem + #{$space-3});

  button {
    margin: 0;
  }
}

// Add address section
.add-address-card {
  text-align: center;
}

.add-address-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: $space-2;
  
  .add-icon {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1;
  }
}

// Portal done button
.portal-done-actions {
  margin-top: $space-5;
  text-align: center;
  
  a[role="button"] {
    min-width: 200px;
  }
}

// Pending verification card
.pending-card {
  text-align: center;
  padding: $space-8 $space-6;
  
  .pending-icon {
    font-size: 3rem;
    margin-bottom: $space-4;
  }
  
  p {
    color: var(--pico-muted-color);
    margin-bottom: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .portal-done-actions {
    margin-top: $space-6;
  }
}

.empty-state {
  text-align: center;
  padding: $space-8 $space-6;
  background: var(--pico-card-background-color);
  border: 1px dashed var(--pico-card-border-color);
  border-radius: $radius-lg;

  .empty-icon {
    font-size: 3rem;
    margin-bottom: $space-3;
    opacity: 0.5;
  }

  h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pico-color);
    margin: 0 0 $space-2;
  }

  p {
    font-size: 0.9375rem;
    margin: 0 0 $space-5;
    color: var(--pico-muted-color);
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  a[role="button"] {
    margin: 0;
    font-size: 0.9375rem;
    padding: 0.625rem $space-5;
  }
}

.address-form {
  fieldset {
    @include form-fieldset;
    margin: 0 0 $space-5;
    legend { font-size: 1.125rem; margin-bottom: $space-3; }
    label { font-size: 0.875rem; margin-bottom: 0.375rem; }
    input, select, textarea { margin-bottom: $space-3; font-size: 0.9375rem; }
    .grid { gap: $space-3; }
  }
  footer {
    margin-top: $space-5; display: flex; gap: $space-2; justify-content: center; flex-wrap: wrap;
    button, input[type="submit"], a { margin: 0; font-size: 0.9375rem; padding: 0.625rem $space-5; }
    button, input[type="submit"] { font-weight: 500; border-radius: $radius-md; }
  }
}

// Google Places Autocomplete styling
gmp-place-autocomplete {
  display: block;
  width: 100%;
  margin-bottom: $space-3;
  background-color: var(--pico-form-element-background-color);
  border: 1px solid var(--pico-form-element-border-color);
  border-radius: 10px;
  color-scheme: light;
}

[data-theme="dark"] gmp-place-autocomplete {
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) gmp-place-autocomplete {
    color-scheme: dark;
  }
}
