/* home-map-ui.css - маркеры, обратное геокодирование и map-popup UI */

/* ==================== 12. МАРКЕРЫ КАРТЫ ==================== */
.map-leaflet-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.custom-marker {
    background: transparent;
    border: none;
}

.map-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.map-marker--loading,
.map-marker--unloading {
    width: 28px;
    height: 28px;
}

.map-marker--intermediate {
    width: 24px;
    height: 24px;
}

.map-marker--loading {
    background: #3B82F6;
}

.map-marker--unloading {
    background: #EF4444;
}

.map-marker--intermediate {
    background: #10B981;
}

.map-marker .marker-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.map-marker--loading .marker-number,
.map-marker--unloading .marker-number {
    font-size: 11px;
}

.map-marker--intermediate .marker-number {
    font-size: 10px;
}

.map-marker i.fas {
    display: none;
}

.map-popup {
    font-family: 'Inter', sans-serif;
    padding: 8px 12px;
    min-width: 200px;
}

.map-popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.map-popup-address {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.map-route-info {
    margin: 10px;
}

.route-info-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.route-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.route-info-distance,
.route-info-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}

.route-info-distance i,
.route-info-duration i {
    color: #3B82F6;
    font-size: 12px;
}

.route-legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 10px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.route-legend-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.route-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #475569;
}

.route-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.route-legend-dot.loading {
    background: #3B82F6;
}

.route-legend-dot.intermediate {
    background: #10B981;
}

.route-legend-dot.unloading {
    background: #EF4444;
}

.map-marker:hover {
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: rotate(-45deg) scale(1.1);
    transition: all 0.2s ease;
}

.map-marker::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50% 50% 50% 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

.leaflet-popup-tip {
    box-shadow: none;
}

.map-marker .marker-number {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}

/* ==================== 13. КНОПКА КАРТЫ И ОБРАТНОЕ ГЕОКОДИРОВАНИЕ ==================== */
.map-click-mode {
    cursor: crosshair;
}

.temp-map-marker {
    background: transparent;
    border: none;
}

.temp-marker-pin {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: markerAppear 0.3s ease-out;
}

.temp-marker-pin i {
    color: var(--primary-blue);
    font-size: 40px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

.click-mode-hint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 10px 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    max-width: 90%;
    min-width: 260px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.click-mode-hint.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.click-mode-hint .hint-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.click-mode-hint .hint-content i {
    font-size: 16px;
    margin-bottom: 2px;
}

.click-mode-hint .hint-content small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

/* ==================== 14. КОМПАКТНЫЕ МОДАЛЬНЫЕ ОКНА КАРТЫ ==================== */
.address-selection-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-large);
    border: 1px solid var(--gray-200);
    padding: 0;
    overflow: hidden;
    background: var(--white);
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    animation: dialogAppear 0.3s ease-out;
}

.address-selection-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.compact-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    min-height: 44px;
    box-sizing: border-box;
}

.compact-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.compact-title i {
    font-size: 14px;
    color: var(--white);
}

.compact-address {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    min-height: 60px;
    max-height: 60px;
    overflow: hidden;
    box-sizing: border-box;
}

.compact-address i {
    color: var(--primary-blue);
    font-size: 13px;
    margin-top: 2px;
    flex-shrink: 0;
}

.compact-address .address-text {
    font-size: 12px;
    color: var(--text-dark);
    line-height: 1.3;
    word-break: break-word;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    max-height: 32px;
    min-height: 32px;
}

.compact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(29, 78, 216, 0.08) 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 11px;
    color: var(--primary-blue);
    font-weight: 500;
    min-height: 36px;
    box-sizing: border-box;
}

.compact-info i {
    color: var(--primary-blue);
    font-size: 11px;
    flex-shrink: 0;
}

.compact-info .limit-text {
    color: #ef4444;
    font-weight: 600;
}

.compact-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    background: var(--gray-50);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.compact-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    width: 100%;
    max-width: 140px;
    min-height: 36px;
    position: relative;
    overflow: hidden;
}

.compact-cancel-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--text-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.compact-cancel-btn:active {
    transform: translateY(0);
}

.compact-cancel-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.compact-cancel-btn:hover i {
    transform: translateX(-2px);
}

.compact-cancel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.compact-cancel-btn:hover::before {
    left: 100%;
}

/* 1. ОСНОВНОЕ ОКНО ВЫБОРА ТИПА */
.main-selection-popup .leaflet-popup-content-wrapper {
    min-height: 280px;
}

.compact-options {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    box-sizing: border-box;
}

.compact-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: 'Inter', sans-serif;
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.compact-option:hover {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(29, 78, 216, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.compact-option:active {
    transform: translateY(-1px);
}

.compact-option[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.compact-option[disabled]:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--gray-200);
    background: var(--white);
}

.compact-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
    border-radius: 6px;
    color: var(--primary-blue);
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.compact-option:hover .compact-icon {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.05);
}

.compact-option[disabled] .compact-icon {
    transform: none;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
}

.compact-option[disabled]:hover .compact-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
    color: var(--primary-blue);
    transform: none;
}

.loading-option .compact-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
    color: var(--primary-blue);
}

.unloading-option .compact-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #EF4444;
}

.intermediate-option .compact-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #10B981;
}

.loading-option:hover .compact-icon {
    background: var(--gradient-primary);
    color: var(--white);
}

.unloading-option:hover .compact-icon {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: var(--white);
}

.intermediate-option:hover .compact-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--white);
}

.compact-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
    transition: color 0.3s ease;
}

.loading-option:hover .compact-text {
    color: var(--primary-blue);
}

.unloading-option:hover .compact-text {
    color: #EF4444;
}

.intermediate-option:hover .compact-text {
    color: #10B981;
}

.compact-option[disabled] .compact-text {
    color: var(--gray-500);
}

.compact-option[disabled]:hover .compact-text {
    color: var(--gray-500);
}

/* 2. ОКНО ВЫБОРА ДЕЙСТВИЯ */
.intermediate-action-popup .leaflet-popup-content-wrapper {
    min-height: 280px;
}

.intermediate-header {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.compact-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 124px;
    box-sizing: border-box;
}

.compact-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    min-height: 60px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.compact-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.compact-action-btn:hover::before {
    left: 100%;
}

.compact-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.compact-action-btn:active {
    transform: translateY(-1px);
}

.compact-action-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.compact-action-btn[disabled]:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--gray-200);
    background: var(--white);
}

.compact-action-btn[disabled]:hover::before {
    left: -100%;
}

.compact-action-btn.replace-btn {
    border-color: #10B981;
}

.compact-action-btn.replace-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-color: #059669;
}

.compact-action-btn.add-btn {
    border-color: var(--primary-blue);
}

.compact-action-btn.add-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(29, 78, 216, 0.08) 100%);
    border-color: #2563EB;
}

.compact-action-btn[disabled].replace-btn {
    border-color: var(--gray-200);
}

.compact-action-btn[disabled].add-btn {
    border-color: var(--gray-200);
}

.compact-action-btn[disabled]:hover {
    border-color: var(--gray-200);
}

.compact-action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.compact-action-btn:hover .compact-action-icon {
    transform: scale(1.1);
}

.compact-action-btn[disabled]:hover .compact-action-icon {
    transform: none;
}

.compact-action-btn.replace-btn .compact-action-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10B981;
}

.compact-action-btn.add-btn .compact-action-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.15) 100%);
    color: var(--primary-blue);
}

.compact-action-btn.replace-btn:hover .compact-action-icon {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: var(--white);
}

.compact-action-btn.add-btn:hover .compact-action-icon {
    background: var(--gradient-primary);
    color: var(--white);
}

.compact-action-btn[disabled].replace-btn .compact-action-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
}

.compact-action-btn[disabled].add-btn .compact-action-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(29, 78, 216, 0.15) 100%);
}

.compact-action-btn[disabled]:hover .compact-action-icon {
    background: none;
}

.compact-action-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.compact-action-btn.replace-btn:hover .compact-action-text {
    color: #10B981;
}

.compact-action-btn.add-btn:hover .compact-action-text {
    color: var(--primary-blue);
}

.compact-action-btn[disabled] .compact-action-text {
    color: var(--gray-500);
}

.compact-action-btn[disabled]:hover .compact-action-text {
    color: var(--gray-500);
}

/* 3. ОКНО ВЫБОРА АДРЕСА ДЛЯ ЗАМЕНЫ */
.replace-selection-popup .leaflet-popup-content-wrapper {
    min-height: 320px;
}

.replace-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.compact-replace-list {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 164px;
    max-height: 164px;
    box-sizing: border-box;
}

.compact-replace-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 40px;
    box-sizing: border-box;
}

.compact-replace-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.compact-replace-option:hover::before {
    left: 100%;
}

.compact-replace-option:hover {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(29, 78, 216, 0.05) 100%);
    transform: translateX(4px) translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.compact-replace-option:active {
    transform: translateX(4px) translateY(0);
}

.compact-replace-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.compact-replace-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.3);
    transition: all 0.3s ease;
}

.compact-replace-option:hover .compact-replace-number {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(30, 58, 138, 0.4);
}

.compact-replace-current {
    font-size: 11px;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-weight: 500;
    transition: color 0.3s ease;
}

.compact-replace-option:hover .compact-replace-current {
    color: var(--primary-blue);
    font-weight: 600;
}

.compact-replace-action {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 6px;
    color: var(--gray-600);
    font-size: 11px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.compact-replace-option:hover .compact-replace-action {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.1) rotate(-5deg);
}

.compact-replace-option:hover .compact-replace-action i {
    transform: translateX(2px);
}

.compact-replace-list::-webkit-scrollbar {
    width: 6px;
}

.compact-replace-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
    margin: 2px 0;
}

.compact-replace-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.compact-replace-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
    background-clip: padding-box;
}

/* ==================== 15. УВЕДОМЛЕНИЯ О ВЫБОРЕ ТОЧКИ НА КАРТЕ ==================== */
.map-hint-notification {
    position: absolute;
    top: 45%; /* ПОДНИМАЕМ ДО 45% */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.map-hint-notification.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%); /* Оставляем центр на 45% */
    pointer-events: all;
}

/* Обновляем анимации для позиции 45% */
@keyframes hintSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9); /* Начинаем выше */
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.map-hint-notification.visible {
    animation: hintSlideIn 0.4s ease-out forwards;
}

@keyframes hintSlideOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9); /* Уходим выше */
    }
}

.map-hint-notification:not(.visible) {
    animation: hintSlideOut 0.3s ease-in forwards;
}

/* Также поднимаем подтверждение */
.hint-confirmation-notification {
    position: absolute;
    top: 45%; /* ПОДНИМАЕМ ДО 45% */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.hint-confirmation-notification.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
    pointer-events: all;
}

/* Обновляем анимации подтверждения */
@keyframes confirmSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95); /* Начинаем выше */
        filter: blur(2px);
    }
    70% {
        transform: translate(-50%, -45%) scale(1.02); /* Небольшой баунс */
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
    }
}

.hint-confirmation-notification.visible {
    animation: confirmSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes confirmSlideOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.95); /* Уходим выше */
        filter: blur(2px);
    }
}

.hint-confirmation-notification:not(.visible) {
    animation: confirmSlideOut 0.3s ease-out forwards;
}

/* Остальные стили остаются без изменений */
.map-hint-notification .hint-container {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(59, 130, 246, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: white;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-hint-notification .hint-content {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 16px;
    position: relative;
}

.map-hint-notification .hint-icon-wrapper {
    background: rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-hint-notification .hint-icon {
    font-size: 20px;
    color: white;
}

.map-hint-notification .hint-text-wrapper {
    flex: 1;
    min-width: 0;
}

.map-hint-notification .hint-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.map-hint-notification .hint-message {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
    margin-bottom: 12px;
}

.map-hint-notification .hint-message strong {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.map-hint-notification .hint-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.map-hint-notification .hint-dont-show-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-hint-notification .hint-dont-show-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.map-hint-notification .hint-dont-show-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.map-hint-notification .hint-dont-show-btn:hover::before {
    left: 100%;
}

.map-hint-notification .hint-dont-show-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.map-hint-notification .hint-dont-show-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.map-hint-notification .hint-dont-show-btn:hover i {
    transform: rotate(15deg);
}

.map-hint-notification .hint-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-left: auto;
}

.map-hint-notification .hint-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.map-hint-notification .hint-close-btn:active {
    transform: scale(0.95);
}

.map-hint-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    transform: scaleX(1);
    transform-origin: left;
    animation: progressBar 5.5s linear forwards;
}

@keyframes progressBar {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

.hint-confirmation-notification .hint-container {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(16, 185, 129, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    color: white;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hint-confirmation-notification .hint-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
    position: relative;
}

.hint-confirmation-notification .hint-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.hint-confirmation-notification .hint-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.hint-confirmation-notification .hint-icon {
    font-size: 20px;
    color: #d1fae5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
    animation: iconCheck 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes iconCheck {
    0% {
        transform: scale(0) rotate(-90deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.hint-confirmation-notification .hint-text-wrapper {
    flex: 1;
    min-width: 0;
}

.hint-confirmation-notification .hint-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    background: linear-gradient(to right, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hint-confirmation-notification .hint-message {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hint-confirmation-notification .hint-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hint-confirmation-notification .hint-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hint-confirmation-notification .hint-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.hint-confirmation-notification .hint-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: successPulse 3s ease-out forwards;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    20% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes ripple {
    to {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}
