﻿/* Карта */
#map {
    height: 500px;
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Элементы аукционов */
.auction-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

    .auction-item:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .auction-item h5 {
        margin: 0 0 10px 0;
        color: #333;
        font-weight: 600;
    }

.auction-distance {
    color: #666;
    font-size: 12px;
    float: right;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Список аукционов */
#auctions-list {
    max-height: 760px;
    overflow-y: auto;
    padding-right: 10px;
}

#auctions-items {
    padding: 10px;
}

    /* Стилизация скроллбара */
    #auctions-list::-webkit-scrollbar {
        width: 6px;
    }

    #auctions-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    #auctions-list::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        #auctions-list::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Форма подписки */
.subscription-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Анимация для кнопки подписки */
#subscribeBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#subscribeBtn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,123,255,0.3);
}

/* Стили для информационных сообщений */
.map-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #map {
        height: 350px;
    }

    .auction-item {
        padding: 12px;
    }

    .auction-distance {
        float: none;
        display: inline-block;
        margin-top: 5px;
    }

    #auctions-list {
        max-height: 300px;
    }
}

/* Підказка «?» біля кнопки «Знайти на карті» */
.geo-hint {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    margin-bottom: 8px;
    border: 1px solid #0d6efd;
    border-radius: 50%;
    background: #fff;
    color: #0d6efd;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    user-select: none;
}

.geo-hint::after {
    content: attr(data-geo-hint);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 1080;
    width: 340px;
    max-width: 85vw;
    padding: 10px 12px;
    border-radius: 6px;
    background: #333;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.geo-hint:hover::after,
.geo-hint:focus::after {
    opacity: 1;
    visibility: visible;
}

/* Стили для загрузки */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
