/**
 * Стили для фронтенда OVZ Map
 */

.ovz-map-wrapper {
    position: relative;
    margin: 20px 0;
}

.ovz-map {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Фильтры - новый красивый дизайн */
.ovz-filters {
    background: linear-gradient(135deg, #f8f4f0 0%, #f5ede8 100%);
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid #E67E51;
    box-shadow: 0 2px 15px rgba(230, 126, 81, 0.1);
}

.ovz-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-end;
}

.ovz-filter-item {
    flex: 1;
    min-width: 200px;
}

.ovz-filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: #5a4a3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Типы - мультиселект как теги WordPress */
.ovz-filter-types {
    flex: 2;
    min-width: 280px;
    max-width: 400px;
}

.ovz-type-select-container {
    position: relative;
}

.ovz-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    min-height: 32px;
}

.ovz-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    cursor: default;
    animation: tagAppear 0.2s ease;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ovz-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.ovz-tag-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ovz-type-dropdown {
    position: relative;
}

.ovz-type-search {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0d8d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #5a4a3a;
    cursor: pointer;
    transition: all 0.3s;
}

.ovz-type-search:hover,
.ovz-type-search:focus {
    border-color: #E67E51;
    outline: none;
    box-shadow: 0 2px 8px rgba(230, 126, 81, 0.15);
}

.ovz-type-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #E67E51;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ovz-type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.ovz-type-option:last-child {
    border-bottom: none;
}

.ovz-type-option:hover {
    background: #f8f4f0;
}

.ovz-option-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ovz-option-name {
    font-size: 14px;
    color: #5a4a3a;
}

/* Стилизованные селекты */
.ovz-select-wrapper {
    position: relative;
}

.ovz-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #E67E51;
    font-size: 10px;
    pointer-events: none;
}

.ovz-filter-item select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0d8d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #5a4a3a;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s;
}

.ovz-filter-item select:hover,
.ovz-filter-item select:focus {
    border-color: #E67E51;
    outline: none;
    box-shadow: 0 2px 8px rgba(230, 126, 81, 0.15);
}

/* Даты событий */
.ovz-filter-dates .ovz-date-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ovz-filter-dates input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0d8d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #5a4a3a;
}

.ovz-filter-dates input:hover,
.ovz-filter-dates input:focus {
    border-color: #E67E51;
    outline: none;
    box-shadow: 0 2px 8px rgba(230, 126, 81, 0.15);
}

.ovz-date-sep {
    color: #E67E51;
    font-weight: 600;
    font-size: 16px;
}

/* Кнопки */
.ovz-filter-actions {
    display: flex;
    gap: 12px;
}

.ovz-btn-reset {
    padding: 12px 28px;
    border: 2px solid #c9b896;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    color: #8b7355;
}

.ovz-btn-reset:hover {
    background: #c9b896;
    color: #fff;
    border-color: #c9b896;
}

/* Маркеры */
.ovz-marker {
    background: transparent !important;
    border: none !important;
}

/* Popup */
.ovz-popup {
    padding: 5px;
}

.ovz-popup h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #E67E51;
    padding-bottom: 8px;
}

.ovz-popup-type {
    margin: 5px 0;
    color: #E67E51;
}

.ovz-popup-address {
    margin: 8px 0;
    color: #666;
    font-style: italic;
}

.ovz-popup-phone {
    margin: 8px 0;
    color: #27ae60;
}

.ovz-popup-website a {
    color: #3498db;
    text-decoration: none;
}

.ovz-popup-website a:hover {
    text-decoration: underline;
}

.ovz-popup-dates {
    margin: 8px 0;
    color: #9b59b6;
}

.ovz-popup-link {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.ovz-popup-link a {
    color: #E67E51;
    text-decoration: none;
    font-weight: 600;
}

.ovz-popup-link a:hover {
    text-decoration: underline;
}

/* Легенда */
/* Легенда внизу карты - чекбоксы как Jira Labels */
.ovz-map-legend {
    background: linear-gradient(135deg, #f8f4f0 0%, #f5ede8 100%);
    padding: 25px 30px;
    border-radius: 0 0 12px 12px;
    border-top: 3px solid #E67E51;
    box-shadow: 0 2px 15px rgba(230, 126, 81, 0.1);
}

.ovz-map-legend h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #5a4a3a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ovz-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ovz-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e0d8d0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #5a4a3a;
}

.ovz-legend-item:hover {
    border-color: var(--type-color, #E67E51);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 81, 0.2);
}

.ovz-legend-item.active {
    background: var(--type-color, #E67E51);
    border-color: var(--type-color, #E67E51);
    color: #fff;
    box-shadow: 0 4px 15px rgba(230, 126, 81, 0.3);
}

.ovz-legend-item.active .ovz-legend-name {
    color: #fff;
}

.ovz-legend-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.ovz-legend-name {
    font-size: 14px;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 992px) {
    .ovz-filters {
        padding: 20px;
    }

    .ovz-filter-row {
        flex-direction: column;
        gap: 20px;
    }

    .ovz-filter-item {
        width: 100%;
        min-width: auto;
    }

    .ovz-filter-types {
        min-width: auto;
    }

    .ovz-type-checkboxes {
        justify-content: center;
    }

    .ovz-filter-actions {
        width: 100%;
        justify-content: center;
    }

    .ovz-btn-reset {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ovz-filters {
        padding: 15px;
    }

    .ovz-filter-dates .ovz-date-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .ovz-date-sep {
        display: none;
    }

    .ovz-legend-items {
        justify-content: center;
    }

    .ovz-legend-item {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Кластеры */
.marker-cluster-small {
    background-color: rgba(230, 126, 81, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(230, 126, 81, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(230, 126, 81, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(230, 126, 81, 0.8);
}

.marker-cluster-large {
    background-color: rgba(230, 126, 81, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(230, 126, 81, 0.8);
}

.marker-cluster div {
    color: white;
    font-weight: bold;
}

/* Скрыть флаг в атрибуции Leaflet */
svg.leaflet-attribution-flag {
    display: none !important;
}

/* Стили для одиночной страницы места */
.ovz-place-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ovz-place-single .entry-header {
    margin-bottom: 30px;
    text-align: center;
}

.ovz-place-single .entry-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.ovz-place-type {
    display: inline-block;
    padding: 8px 16px;
    background: #E67E51;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.ovz-place-image {
    margin-bottom: 30px;
    text-align: center;
}

.ovz-place-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ovz-place-content {
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.8;
}

.ovz-place-details {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.ovz-place-details h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E67E51;
    font-size: 24px;
}

.ovz-details-table {
    width: 100%;
    border-collapse: collapse;
}

.ovz-details-table th,
.ovz-details-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.ovz-details-table th {
    width: 150px;
    font-weight: 600;
    color: #666;
}

.ovz-details-table a {
    color: #E67E51;
    text-decoration: none;
}

.ovz-details-table a:hover {
    text-decoration: underline;
}

.ovz-place-map-section {
    margin-bottom: 40px;
}

.ovz-place-map-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E67E51;
    font-size: 24px;
}

.ovz-single-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ovz-back-link {
    display: inline-block;
    padding: 12px 24px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.ovz-back-link:hover {
    background: #e0e0e0;
}

/* Блок контактов */
.ovz-place-contacts {
    margin-bottom: 40px;
}

.ovz-place-contacts h2 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E67E51;
    font-size: 24px;
}

.ovz-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ovz-contact-block {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #E67E51;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ovz-contact-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ovz-contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.ovz-contact-icon.vk-icon {
    background: #4c75a3;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.ovz-contact-icon.maks-icon {
    background: #ff6b35;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.ovz-contact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ovz-contact-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ovz-contact-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    word-break: break-word;
}

.ovz-contact-value:hover {
    color: #E67E51;
}

/* Адаптивность контактов */
@media (max-width: 768px) {
    .ovz-contacts-grid {
        grid-template-columns: 1fr;
    }
}

/* Хлебные крошки вверху */
.ovz-breadcrumb-top {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.ovz-breadcrumb-top ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ovz-breadcrumb-top li {
    display: inline-flex;
    align-items: center;
}

.ovz-breadcrumb-top a {
    color: #E67E51;
    text-decoration: none;
    transition: color 0.3s;
}

.ovz-breadcrumb-top a:hover {
    color: #d35400;
    text-decoration: underline;
}

.ovz-breadcrumb-top .sep {
    margin: 0 12px;
    color: #999;
}

.ovz-breadcrumb-top .current {
    color: #666;
    font-weight: 500;
}
