/**
 * FourTech WooCommerce Integration Styles
 * Theme-agnostic: Does not override theme typography, colors, borders, or form controls.
 */

/* Hide redundant city field when FourTech state-as-city is active */
.woocommerce-checkout .fourtech-hidden-city,
.woocommerce-checkout .form-row.fourtech-hidden-city,
.woocommerce-checkout [data-fourtech-hidden="true"],
.woocommerce-address-fields .fourtech-hidden-city,
.woocommerce-address-fields .form-row.fourtech-hidden-city,
.fourtech-hidden-city,
[data-fourtech-hidden="true"] {
    display: none !important;
}

/* Scoped loading indicator */
.fourtech-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.fourtech-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: fourtech-spin 0.75s linear infinite;
}

@keyframes fourtech-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* National Address & GPS Location Button Styles */
.fourtech-location-btn-wrapper {
    margin-top: 8px;
    margin-bottom: 6px;
    display: block;
}

.fourtech-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    transition: all 0.2s ease;
}

.fourtech-location-btn:hover:not(:disabled) {
    background: #eaeaea;
    border-color: #999;
}

.fourtech-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fourtech-location-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.fourtech-location-status {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

.fourtech-location-status.status-info {
    color: #0073aa;
}

.fourtech-location-status.status-error {
    color: #cc1818;
}

.fourtech-location-status.status-success {
    color: #46b450;
}

.fourtech-custom-error {
    color: #cc1818;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Hide National Address when not applicable */
.fourtech-hidden-short-address {
    display: none !important;
}

