.address-typeahead-wrapper * {
    box-sizing: border-box;
}

.address-typeahead-wrapper {
    margin: 20px 0;
}

.address-container {
    position: relative;
    width: 100%;
}

.address-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.address-input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.address-input:focus {
    border-color: #4CAF50;
}

.address-check-btn {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.address-check-btn:hover:not(:disabled) {
    background-color: #45a049;
}

.address-check-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Spinner for loading state */
.address-check-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.address-check-btn.loading .spinner {
    display: inline-block;
}

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

.address-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.dropdown-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: #f5f5f5;
}

.dropdown-item.active {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    padding-left: 8px;
}

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

.loading {
    padding: 12px;
    text-align: center;
    color: #666;
}

.no-results {
    padding: 12px;
    text-align: center;
    color: #999;
}

.address-error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.address-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

.address-details.show {
    display: block;
}

.address-details h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.address-details pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

.address-details .error {
    color: #d32f2f;
}

.address-details .success {
    color: #388e3c;
}

.address-unit-toggle {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    display: block;
}

.address-unit-input-group {
    margin-bottom: 10px;
}
