/**
 * Gpost Courier Shipping - Frontend Styles
 *
 * @since 2.0.0
 */

/* Shipping label layout */
.woocommerce-gpost-label,
.woocommerce-gpost-label-icon {
    display: inline-block;
    vertical-align: middle;
}

.woocommerce-gpost-label-icon {
    margin-right: 6px;
}

/* Tooltip icon */
.gpost-help-tip {
    color: #666;
    display: inline-block;
    font-size: 1.1em;
    font-style: normal;
    height: 16px;
    line-height: 16px;
    position: relative;
    vertical-align: middle;
    width: 16px;
    margin-left: 4px;
}

.gpost-help-tip::after {
    font-family: Dashicons;
    speak: never;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    content: url("../tooltip.svg");
    cursor: help;
}

/* Tooltip popup */
.gpost-help-tip::before {
    opacity: 0;
    pointer-events: none;
    bottom: 100%;
    left: 50%;
    position: absolute;
    z-index: 10;
    transform: translate(-50%, 10px);
    transform-origin: top;
    transition: all 0.18s ease-out 0.18s;
    background-color: #f5f5f5;
    box-shadow: 0 0 3px #ddd;
    content: attr(data-tooltip);
    padding: 10px;
    white-space: nowrap;
    margin-bottom: 11px;
    border-radius: 4px;
    font-size: 13px;
}

.gpost-help-tip:hover::before {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

/* City input validation */
.gpost-invalid-input {
    border-color: #f04f63 !important;
}

.gpost-error-message {
    color: #f04f63;
    margin-top: 8px;
    font-size: 13px;
}

/* City autocomplete dropdown */
.gpost-matching-cities-options {
    border: 1px solid #d9d9d9;
    border-top: none;
    width: 100%;
    margin-top: 0;
    padding: 4px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
    position: relative;
    z-index: 99999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.gpost-matching-cities-options div {
    cursor: pointer;
    padding: 10px 12px;
    margin: 1px 0;
    border-radius: 4px;
    transition: background-color 0.12s ease;
    -webkit-user-select: none;
    user-select: none;
    line-height: 1.4;
}

.gpost-matching-cities-options div:hover {
    background-color: #f0f0f0;
}

/* Checkout WC compatibility */
body.checkout-wc .select2-container {
    z-index: 100 !important;
}

body.checkout-wc .select2-selection__rendered {
    padding-top: 0.82rem;
}

body.checkout-wc .select2-selection--single {
    background: #fff;
}

.woocommerce-shipping-fields .select2-selection--single {
    background-color: inherit !important;
}
