/**
 * SkyNet Suburb & Postal Code Dropdown Styles
 * Clean, Modern Light-Themed UI with High Contrast & Seamless WooCommerce Store Integration
 */

/* Full-width container spanning across Block Checkout grids & Classic float layouts */
.skypoint-suburb-search-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    clear: both !important;
    margin: 12px 0 16px 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.skypoint-suburb-search-row .woocommerce-input-wrapper {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

/* Modern Input Box with Clean Light Border */
.skypoint-suburb-search-input {
    width: 100% !important;
    height: 46px !important;
    line-height: 46px !important;
    padding: 0 14px 0 38px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23475569" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: 12px center !important;
    background-size: 16px 16px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.skypoint-suburb-search-input::placeholder {
    color: #64748b !important;
    font-size: 13.5px !important;
}

.skypoint-suburb-search-input:hover {
    border-color: #94a3b8 !important;
    background-color: #f8fafc !important;
}

.skypoint-suburb-search-input:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Dropdown Wrapper */
.skypoint-suburb-autocomplete-wrapper {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

/* Light-Themed Dropdown Popover */
.skypoint-suburb-dropdown {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    max-height: 290px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    list-style: none !important;
    font-family: inherit !important;
    display: none;
    box-sizing: border-box !important;
}

.skypoint-suburb-dropdown.is-open {
    display: block !important;
    animation: skypointDropdownSlide 0.15s ease-out !important;
}

@keyframes skypointDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown List Items */
.skypoint-suburb-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    transition: background-color 0.12s ease, border-color 0.12s ease !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: 3px solid transparent !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    min-height: 42px !important;
    background-color: #ffffff !important;
}

.skypoint-suburb-item:last-child {
    border-bottom: none !important;
}

.skypoint-suburb-item:hover,
.skypoint-suburb-item.is-selected {
    background-color: #f1f5f9 !important;
    border-left-color: #2563eb !important;
}

/* Suburb Combination Text Container */
.skypoint-suburb-item .skypoint-suburb-name {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.skypoint-suburb-item:hover .skypoint-suburb-name,
.skypoint-suburb-item.is-selected .skypoint-suburb-name {
    color: #0f172a !important;
    font-weight: 600 !important;
}

.skypoint-suburb-item .skypoint-suburb-pin {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
    width: 18px !important;
    height: 18px !important;
}

/* Subtle Postcode Badge for Visual Clarity */
.skypoint-suburb-item .skypoint-suburb-code {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.5px !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.12s ease !important;
}

.skypoint-suburb-item:hover .skypoint-suburb-code,
.skypoint-suburb-item.is-selected .skypoint-suburb-code {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

/* Status Messages */
.skypoint-suburb-loading,
.skypoint-suburb-empty {
    padding: 14px !important;
    text-align: center !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background-color: #ffffff !important;
}

.skypoint-suburb-loading::after {
    content: " ...";
    animation: skypointDots 1s steps(5, end) infinite;
}

@keyframes skypointDots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Custom Slim Light Scrollbar */
.skypoint-suburb-dropdown::-webkit-scrollbar {
    width: 6px;
}

.skypoint-suburb-dropdown::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

.skypoint-suburb-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.skypoint-suburb-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Responsive Optimization (<= 768px) */
@media (max-width: 768px) {
    .skypoint-suburb-search-input {
        height: 46px !important;
        font-size: 14px !important;
        padding-left: 36px !important;
    }

    .skypoint-suburb-item {
        padding: 11px 12px !important;
        min-height: 44px !important;
    }

    .skypoint-suburb-item .skypoint-suburb-name {
        font-size: 13px !important;
    }

    .skypoint-suburb-dropdown {
        max-height: 240px !important;
    }
}
