@import url('../../vendor/maplibre-gl.css');

.irannet-geo-picker {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    direction: rtl;
    font-family:
        Tahoma,
        Arial,
        sans-serif;
}

.irannet-geo-picker,
.irannet-geo-picker * {
    box-sizing: border-box;
}

.irannet-geo-picker__map {
    position: absolute;
    inset: 0;
}

.irannet-geo-picker .irannet-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: min(380px, calc(100% - 40px));
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.96);
    box-shadow:
        0 6px 24px rgba(0,0,0,.14);
}

.irannet-geo-picker .irannet-panel strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.irannet-geo-picker .location-status {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.8;
    color: #666;
}

.irannet-geo-picker .location-status.loading {
    color: #555;
}

.irannet-geo-picker .location-status.error {
    color: #a02929;
}

.irannet-geo-picker .coordinates {
    margin-top: 5px;
    font-size: 11px;
    color: #888;
    direction: ltr;
}

.irannet-geo-picker .center-pin {
    position: absolute;
    z-index: 20;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    transform:
        translate(-50%, -100%)
        rotate(-45deg);
    background: #111;
    border: 4px solid #fff;
    border-radius:
        50% 50% 50% 0;
    box-shadow:
        0 3px 12px rgba(0,0,0,.3);
    pointer-events: none;
}

.irannet-geo-picker .center-pin::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.irannet-geo-picker .geo-search {
    position: relative;
    margin-top: 12px;
}

.irannet-geo-picker .geo-search input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
}

.irannet-geo-picker .geo-search input:focus {
    border-color: #888;
}

.irannet-geo-picker .geo-search-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 50;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow:
        0 8px 28px rgba(0,0,0,.18);
}

.irannet-geo-picker .geo-search-results.active {
    display: block;
}

.irannet-geo-picker .geo-search-result {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
}

.irannet-geo-picker .geo-search-result:last-child {
    border-bottom: 0;
}

.irannet-geo-picker .geo-search-result:hover {
    background: #f6f6f6;
}

.irannet-geo-picker .geo-result-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.irannet-geo-picker .geo-result-address {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.7;
    color: #777;
}

.irannet-geo-picker .geo-empty {
    padding: 12px;
    font-size: 12px;
    color: #777;
}

.irannet-geo-picker .geo-address-card {
    display: none;
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    background: #f7f7f7;
}

.irannet-geo-picker .geo-address-card.active {
    display: block;
}

.irannet-geo-picker .geo-address-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.irannet-geo-picker .geo-address-text {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.9;
    color: #555;
}

.irannet-geo-picker .geo-address-meta {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.8;
    color: #777;
}

.irannet-geo-picker .geo-confirm-wrap {
    margin-top: 12px;
}

.irannet-geo-picker .geo-confirm-button {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 11px;
    background: #111;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        opacity .15s ease,
        transform .15s ease;
}

.irannet-geo-picker .geo-confirm-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.irannet-geo-picker .geo-confirm-button:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.irannet-geo-picker .geo-confirm-button.confirmed {
    background: #222;
}

.irannet-geo-picker .geo-confirm-message {
    display: none;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.8;
    color: #3d633f;
}

.irannet-geo-picker .geo-confirm-message.active {
    display: block;
}

@media (max-width: 600px) {
    .irannet-geo-picker .irannet-panel {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .irannet-geo-picker .geo-search-results {
        max-height: 220px;
    }
}
