/**
 * AU Suburb & Postcode Lookup – Styles
 * Blends with standard WooCommerce / Storefront / most themes.
 */

/* Hide the raw text input once we've replaced it with a dropdown */
.ausl-hidden-field {
    display: none !important;
}

/* The suburb dropdown – matches WC's .input-text styling */
.ausl-suburb-dropdown {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 14px;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ausl-suburb-dropdown:focus {
    outline: none;
    border-color: #96588a; /* WooCommerce purple — overridden by theme variables if set */
    box-shadow: 0 0 0 3px rgba(150, 88, 138, 0.15);
}

.ausl-suburb-dropdown:hover {
    border-color: #999;
}

/* Status messages (searching / error) */
.ausl-status {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    line-height: 1.4;
}

.ausl-status--loading {
    color: #666;
}

.ausl-status--loading::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid #ccc;
    border-top-color: #96588a;
    border-radius: 50%;
    animation: ausl-spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.ausl-status--error {
    color: #c00;
}

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

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ausl-suburb-dropdown {
        font-size: 16px; /* prevent iOS zoom */
    }
}
