/**
 * Hum Address Completion Styles
 * Version: 2023-11-15 14:30
 */


/* Color Variables */
:root {
  /* Main Colors */
  --hum-color-white: #fff;
  --hum-color-black: #000;
  --hum-color-gray-light: #f5f5f5;
  --hum-color-gray-medium: #ddd;
  
  /* UI Colors */
  --hum-color-error: #e74c3c;
  --hum-color-error-bg: #fdf3f2;
  --hum-color-success: #27ae60;
  --hum-color-success-bg: #f2fff2;
  
  /* Shadow Colors */
  --hum-color-shadow: rgba(0, 0, 0, 0.1);
  
  /* Brand Colors */
  --hum-color-primary: #001030;
}

/* Responsive Layout */
@media screen and (max-width: 640px) {
  .hum-address-widget .flex-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hum-address-widget .form-field-wrapper {
    width: 100%;
  }
  
  .hum-address-widget .form-input_v2 {
    width: 100%;
  }
  
  .hum-address-widget .button.w-button {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .hum-address-widget #address-suggestions {
    width: 100%;
  }
}

/* Address Suggestions - Specific styles not in the remote stylesheet */
.hum-address-widget {
  position: relative;
  width: 100%;
}

.hum-address-widget #address-suggestions {
  display: none;
  position: absolute;
  z-index: 99999;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background-color: var(--hum-color-white);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 10px var(--hum-color-shadow);
  margin-top: 5px;
  text-align: left !important;
}

.hum-address-widget .suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  text-align: left !important;
}

.hum-address-widget .suggestion-item:last-child {
  border-bottom: none;
}

.hum-address-widget .suggestion-item:hover {
  background-color: #f9f9f9;
}

.hum-address-widget .suggestion-item.active {
  background-color: var(--hum-color-gray-light);
  border-left: 3px solid #0066cc;
}

.hum-address-widget .suggestion-item.error {
  color: #d32f2f;
  font-style: italic;
}

.hum-address-widget .has-secondary {
  color: #444;
}

.hum-address-widget .has-multiple-units .address-text {
  font-weight: 500;
}

.hum-address-widget .multiple-units-indicator {
  font-size: 0.85em;
  color: #0066cc;
  background-color: rgba(0, 102, 204, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 12px;
  position: relative;
  font-weight: 500;
}

.hum-address-widget .suggestion-item.has-multiple-units {
  position: relative;
}

.hum-address-widget .suggestion-item.has-multiple-units:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0066cc;
}

.hum-address-widget .additional-addresses {
  font-size: 0.9em;
  color: #0066cc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hum-address-widget .additional-addresses-count {
  font-weight: 500;
}

.hum-address-widget .additional-addresses-arrow {
  font-weight: bold;
  font-size: 1.2em;
}

.hum-address-widget .secondary-header {
  padding: 10px 15px;
  font-weight: 600;
  background-color: var(--hum-color-gray-light);
  border-bottom: 1px solid var(--hum-color-gray-medium);
}

.hum-address-widget .secondary-address-base {
  padding: 8px 14px;
  font-size: 13px;
  color: #666;
  font-style: italic;
  background-color: #f9fafb;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hum-address-widget .secondary-item {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: center;
}

.hum-address-widget .secondary-unit {
  font-weight: 600;
  min-width: 60px;
}

.hum-address-widget .secondary-address-complete {
  color: #666;
  font-size: 0.9em;
}

.hum-address-widget .form-error-message {
  display: none;
  color: var(--hum-color-error);
  margin-top: 10px;
  font-size: 0.9em;
}

.hum-address-widget .address-results {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 4px;
  display: none;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.hum-address-widget .address-results.invalid-address {
  background-color: var(--hum-color-error-bg);
  border-left: 3px solid var(--hum-color-error);
}

.hum-address-widget .address-results pre {
  margin: 0;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 4px;
  white-space: pre-wrap;
  font-size: 0.9em;
  color: #444;
}

.hum-address-widget .address-results h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1em;
  color: #333;
}

.hum-address-widget .address-results.invalid-address h3 {
  color: var(--hum-color-error);
}

.hum-address-widget .address-text {
  flex: 1;
  text-align: left !important;
}

.hum-address-widget .suggestion-item.has-secondary {
  font-weight: 500;
  color: var(--hum-color-black);
}

.hum-address-widget .suggestion-item.additional-addresses {
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: #0095ff;
  font-weight: 500;
}

.hum-address-widget .additional-addresses:hover {
  background-color: #edf5ff;
}

.hum-address-widget .form-field-wrapper {
  position: relative;
  width: 100%;
}

.hum-address-widget .suggestion-item.secondary-item {
  padding-left: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  position: relative;
}

.hum-address-widget .suggestion-item.secondary-item:hover {
  background-color: rgba(0, 149, 255, 0.1);
}

.hum-address-widget .secondary-unit {
  font-weight: 600;
  color: #0095ff;
  min-width: 60px;
  pointer-events: none;
}

.hum-address-widget .secondary-address-complete {
  color: #555;
  font-size: 0.9em;
  margin-left: 10px;
  pointer-events: none;
}

.hum-address-widget .secondary-unit-count {
  font-size: 0.85em;
  color: #0066cc;
  background-color: rgba(0, 102, 204, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 25px;
  font-weight: 500;
}

.hum-address-widget .secondary-item:after {
  content: none;
}

.hum-address-widget .primary-address-indicator {
  font-size: 0.85em;
  color: #6c63ff;
  background-color: rgba(108, 99, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 12px;
  font-weight: 500;
  position: relative;
}

.hum-address-widget .suggestion-item.is-primary-address:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6c63ff;
}

.hum-address-widget .suggestion-item.is-primary-address {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.hum-address-widget .suggestion-item.is-primary-address .address-text {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Additional utility classes */
.flex-container {
  display: flex;
}

.gap-small {
  gap: 1rem;
}

.align-items-end {
  align-items: flex-end;
}

.flex-grow {
  flex: 1;
}

.margin-top-negative-medium {
  margin-top: -4rem;
}

.padding-top-small {
  padding-top: 1rem;
}

/* Layout positioning */
.justify-start {
  justify-content: flex-start;
}

.footer-sticky {
  position: sticky;
  bottom: 0;
  width: 100%;
  background-color: var(--hum-color-primary);
  z-index: 5;
}

/* Ensure the page wrapper has min-height for sticky footer */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure main content takes up available space */
.main-wrapper {
  flex: 1;
}

.suggestion-item.has-secondary {
  font-weight: 500;
  color: #000;
}

/* Additional addresses row */
.suggestion-item.additional-addresses {
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: #0095ff;
  font-weight: 500;
}

.additional-addresses:hover {
  background-color: #edf5ff;
}

/* Form Components */
.form-field-wrapper {
  position: relative;
}

.address-text {
  flex: 1;
  text-align: left !important;
}

.suggestion-item.has-secondary {
  font-weight: 500;
  color: #000;
}

/* Additional addresses row */
.suggestion-item.additional-addresses {
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: #0095ff;
  font-weight: 500;
}

.additional-addresses-arrow {
  font-size: 24px;
  line-height: 1;
}

.additional-addresses:hover {
  background-color: #edf5ff;
}

/* Form Components */
.form-field-wrapper {
  position: relative;
}

.form-error-message {
  color: var(--hum-color-error);
  font-size: 0.85rem;
  display: none;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 6px 0;
  border-radius: 4px;
  text-align: left;
}

.form-success-message {
  color: var(--hum-color-success);
  margin-top: 15px;
  padding: 10px;
  background-color: var(--hum-color-success-bg);
  border-radius: 4px;
  display: none;
}

/* Additional utility classes */
.flex-container {
  display: flex;
}

.gap-small {
  gap: 1rem;
}

.align-items-end {
  align-items: flex-end;
}

.flex-grow {
  flex: 1;
}

.margin-top-negative-medium {
  margin-top: -4rem;
}

.padding-top-small {
  padding-top: 1rem;
}

/* Layout positioning */
.justify-start {
  justify-content: flex-start;
}

.footer-sticky {
  position: sticky;
  bottom: 0;
  width: 100%;
  background-color: var(--hum-color-primary);
  z-index: 5;
}

/* Ensure the page wrapper has min-height for sticky footer */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure main content takes up available space */
.main-wrapper {
  flex: 1;
}

.suggestion-item.has-secondary {
  font-weight: 500;
  color: #000;
}

/* Remove the ::before pseudo-element with the Apt label */

.suggestion-item.has-multiple-units:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0095ff;
}

/* Secondary Address Options */
.secondary-header {
  background-color: #f5f7fa;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.secondary-address-base {
  padding: 8px 14px;
  font-size: 13px;
  color: #666;
  font-style: italic;
  background-color: #f9fafb;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-item.secondary-item {
  padding-left: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  position: relative;
}

.suggestion-item.secondary-item:hover {
  background-color: rgba(0, 149, 255, 0.1);
}

.secondary-unit {
  font-weight: 600;
  color: #0095ff;
  min-width: 60px;
  pointer-events: none;
}

.secondary-address-complete {
  color: #555;
  font-size: 0.9em;
  margin-left: 10px;
  pointer-events: none;
}

/* Secondary unit count styling */
.secondary-unit-count {
  font-size: 0.85em;
  color: #0066cc;
  background-color: rgba(0, 102, 204, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 25px;
  font-weight: 500;
}

.secondary-item:after {
  content: none;
}

/* Primary Address Indicator */
.primary-address-indicator {
  font-size: 0.85em;
  color: #6c63ff;
  background-color: rgba(108, 99, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 12px;
  font-weight: 500;
  position: relative;
}

/* Add purple dot next to primary address indicator */
.suggestion-item.is-primary-address:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6c63ff;
}

/* Update layout specifically for primary address items */
.suggestion-item.is-primary-address {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.suggestion-item.is-primary-address .address-text {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Update the layout for all suggestion items to be consistent */
.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
} 