.tryoto-delivery-logo {
    display: inline-block;
    max-height: 24px;
    width: auto;
    margin-left: 8px;
    vertical-align: middle;
}

/* Keep the label + price + logo on one line where possible */
.woocommerce-shipping-methods li label,
.wc-block-components-shipping-rates-control__package label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* ==================== Checkout Map Picker ==================== */
.tryoto-map-wrap {
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fafafa;
}

.tryoto-map-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

/* Wrap the search element in a white container so the autocomplete shows
 * up consistently on Safari / Mac dark-mode and macOS contrast-adjustment
 * settings, which the bare component can't override on its own. */
.tryoto-map-search-slot {
    position: relative;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color-scheme: light;
    forced-color-adjust: none;
}

/* The new <gmp-place-autocomplete> web component.
 * Pin to light scheme + force background even though most styling lives
 * inside the component's Shadow DOM. */
gmp-place-autocomplete.tryoto-map-search {
    display: block;
    width: 100%;
    color-scheme: light;
    forced-color-adjust: none;
    background-color: #fff;
    color: #222;
}

/* Some Maps SDK versions expose the inner input as a CSS part. */
gmp-place-autocomplete.tryoto-map-search::part(input) {
    background-color: #fff !important;
    color: #222 !important;
}

/* Suggestion dropdown also uses Material theming — pin it to light. */
.pac-container,
gmp-place-autocomplete {
    color-scheme: light;
    forced-color-adjust: none;
}
.pac-container {
    background-color: #fff !important;
    color: #222 !important;
}
.pac-item {
    background-color: #fff !important;
    color: #222 !important;
}
.pac-item:hover {
    background-color: #f5f5f5 !important;
}

.tryoto-map-canvas {
    width: 100%;
    height: 320px;
    border-radius: 4px;
    background: #e8eaed;
    overflow: hidden;
}

.tryoto-map-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #666;
}

/* Make sure the Google Places dropdown sits above theme modals/overlays */
.pac-container {
    z-index: 100000 !important;
}

/* ==================== Map-controlled address fields ==================== */
.tryoto-locked-field {
    background-color: #f5f5f5 !important;
    color: #555 !important;
    cursor: not-allowed;
}
.tryoto-locked-field:focus {
    outline: none;
    box-shadow: none;
}
.tryoto-locked-select {
    pointer-events: none;
    opacity: 0.7;
}

/* Select2 wrapper (country dropdown) */
.tryoto-locked-select2 {
    pointer-events: none;
    opacity: 0.7;
}
.tryoto-locked-select2 .select2-selection {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
}

/* ==================== Locate Me button ==================== */
.tryoto-map-locate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.tryoto-map-locate-btn:hover {
    background: #f5f5f5;
}
.tryoto-map-locate-btn:active {
    background: #ebebeb;
}
.tryoto-map-locate-btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

/* Crosshair icon — pure CSS, no external asset */
.tryoto-map-locate-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    border: 2px solid #1a73e8;
    border-radius: 50%;
    position: relative;
}
.tryoto-map-locate-icon::before,
.tryoto-map-locate-icon::after {
    content: "";
    position: absolute;
    background: #1a73e8;
}
.tryoto-map-locate-icon::before {
    top: 50%;
    left: -6px;
    right: -6px;
    height: 2px;
    transform: translateY(-50%);
}
.tryoto-map-locate-icon::after {
    left: 50%;
    top: -6px;
    bottom: -6px;
    width: 2px;
    transform: translateX(-50%);
}
.tryoto-map-locate-btn.is-loading .tryoto-map-locate-icon {
    animation: tryoto-spin 0.8s linear infinite;
}
@keyframes tryoto-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
