/* ==========================================
   🗺️ MAPS.CSS - Style dla map OpenStreetMap
   ========================================== */

/* ==========================================
   📍 SEKCJA LOKALIZACJI FIRMY
   ========================================== */
.company-location-section {
    margin: 30px 40px;
    padding: 25px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.location-header h3 {
    font-size: 22px;
    color: #1a202c;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.company-address {
    color: #718096;
    margin-bottom: 20px;
    font-size: 16px;
}

/* ==========================================
   🗺️ KONTENER MAPY
   ========================================== */
.company-map-container {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}

/* ==========================================
   ⏳ LOADING SPINNER
   ========================================== */
.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #718096;
    background: linear-gradient(45deg, #f8fafc 25%, transparent 25%), 
                linear-gradient(-45deg, #f8fafc 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8fafc 75%), 
                linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.map-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: var(--radius-full); /* 50% - Shape & Sizing System v4.0 */
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loading p {
    margin: 0;
    font-weight: 500;
    font-size: 16px;
}

/* ==========================================
   📌 PORTAL MAP - DEDYKOWANE KLASY
   ========================================== */

/* Główny kontener mapy portalu */
.portal-map {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Custom markery - używamy dedykowanych klas */
.portal-map .company-default-marker {
    background: transparent;
    border: none;
}

.logo-marker-container,
.default-marker-container {
    position: relative;
    transition: transform 0.2s ease;
}

.marker-hover {
    transform: scale(1.1) translateY(-5px);
    z-index: 1000;
}

/* Marker z logo */
.logo-marker-pin {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50% 50% 50% 0; /* Custom - map pin shape */
    border: 3px solid #667eea;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.logo-marker-pin img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transform: rotate(45deg);
    border-radius: var(--radius-full); /* 50% - Shape & Sizing System v4.0 */
}

/* Domyślny marker */
.default-marker-pin {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50% 50% 50% 0; /* Custom - map pin shape */
    border: 2px solid white;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.marker-initial {
    color: white;
    font-weight: bold;
    font-size: 18px;
    transform: rotate(45deg);
}

/* Cienie markerów */
.logo-marker-shadow,
.default-marker-shadow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    background: rgba(0,0,0,0.1);
    border-radius: var(--radius-full); /* 50% - Shape & Sizing System v4.0 */
    z-index: 1;
}

/* ==========================================
   📍 MAŁE MARKERY (dla map z wieloma ofertami)
   ========================================== */
.portal-map .small-company-logo-marker {
    background: transparent;
    border: none;
}

.small-logo-marker {
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #667eea;
    border-radius: var(--radius-full); /* 50% - Shape & Sizing System v4.0 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.small-logo-marker img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: var(--radius-full); /* 50% - Shape & Sizing System v4.0 */
}

/* ==========================================
   💬 POPUP LEAFLET
   ========================================== */
.company-map-popup {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.popup-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px; /* Custom - pomiędzy sm (4px) a button (8px) */
    flex-shrink: 0;
}

.popup-content {
    flex: 1;
}

.popup-company-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.popup-address {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

.popup-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: var(--badge-padding-md); /* 6px 12px */
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.popup-btn:hover {
    background: #3182ce;
}

/* Multi-offer popup */
.multi-offer-popup h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.multi-offer-popup h4 a {
    color: #667eea;
    text-decoration: none;
}

.multi-offer-popup h4 a:hover {
    text-decoration: underline;
}

/* ==========================================
   ℹ️ INFORMACJE O LOKALIZACJI
   ========================================== */
.location-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.location-details h4,
.location-nearby h4 {
    font-size: 16px;
    color: #2d3748;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.location-nearby p {
    color: #718096;
    margin: 0 0 10px 0;
    font-size: 14px;
}

/* ==========================================
   🧭 PRZYCISK TRASY
   ========================================== */
.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-directions:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-directions:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* ==========================================
   📊 POBLISKIE OFERTY
   ========================================== */
#nearby-offers-count {
    color: #4a5568;
    line-height: 1.5;
    font-size: 14px;
}

#nearby-offers-count strong {
    color: #2d3748;
}

#nearby-offers-count a {
    color: #667eea;
    text-decoration: none;
}

#nearby-offers-count a:hover {
    text-decoration: underline;
}

.nearby-offer-item {
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}

.nearby-offer-item:last-child {
    border-bottom: none;
}

.nearby-offer-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.nearby-offer-item a:hover {
    text-decoration: underline;
}

.nearby-offer-item small {
    display: block;
    color: #718096;
    margin-top: 2px;
}

/* ==========================================
   🎨 CUSTOMIZACJA KONTROLEK LEAFLET
   ========================================== */
.company-map-container .leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-map-container .leaflet-control-zoom a {
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-weight: bold;
}

.company-map-container .leaflet-control-zoom a:hover {
    background: #f7fafc;
    border-color: #667eea;
    color: #667eea;
}

.company-map-container .leaflet-control-attribution {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm); /* 4px - Shape & Sizing System v4.0 */
    margin: 5px;
    font-size: 11px;
}

/* Customizacja popup Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 107, 53, 0.2);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-tip {
    background: white;
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-top: none;
}

/* Custom popup styles */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 107, 53, 0.2);
    padding: 0;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
    animation: popupFadeIn 0.3s ease-out;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.custom-popup .leaflet-popup-tip {
    background: white;
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-top: none;
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

/* Popup animations */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Popup hover effects */
.custom-popup .leaflet-popup-content-wrapper:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Popup content styling improvements */
.custom-popup .leaflet-popup-content h4 {
    margin: 0 0 12px 0;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

.custom-popup .leaflet-popup-content h4 a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-popup .leaflet-popup-content h4 a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Active popup state */
.popup-active .leaflet-popup-content-wrapper {
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.popup-active .leaflet-popup-tip {
    border-color: rgba(255, 107, 53, 0.4);
}

/* Popup positioning fixes */
.portal-map .leaflet-popup {
    margin-bottom: 20px;
}

.leaflet-popup-pane {
    z-index: 1000;
}

/* Custom tooltip styles */
.portal-map .custom-tooltip {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.custom-tooltip .leaflet-tooltip-content {
    background: rgba(45, 55, 72, 0.95);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: tooltipFadeIn 0.2s ease-out;
}

.custom-tooltip .leaflet-tooltip-content div {
    margin: 0;
}

.portal-map .leaflet-tooltip-top::before {
    border-top-color: rgba(45, 55, 72, 0.95);
}

.portal-map .leaflet-tooltip-bottom::before {
    border-bottom-color: rgba(45, 55, 72, 0.95);
}

.portal-map .leaflet-tooltip-left::before {
    border-left-color: rgba(45, 55, 72, 0.95);
}

.portal-map .leaflet-tooltip-right::before {
    border-right-color: rgba(45, 55, 72, 0.95);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ==========================================
   🎨 DODATKOWE STYLE DLA MAPY
   ========================================== */

/* ==========================================
   📱 RESPONSIVE DESIGN
   ========================================== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .company-location-section {
        margin: 25px 30px;
    }
    
    .company-map-container {
        height: 300px;
    }
    
    .location-header h3 {
        font-size: 21px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .company-location-section {
        margin: 20px 15px;
        padding: 20px 0; /* Custom - Vertical-only spacing (map responsive) */
    }
    
    .location-header h3 {
        font-size: 20px;
    }
    
    .company-address {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    .company-map-container {
        height: 250px;
        border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 */
    }
}

/* Mobile */
@media (max-width: 480px) {
    .company-location-section {
        margin: 15px 10px;
        padding: 15px 0;
    }
    
    .location-header h3 {
        font-size: 18px;
    }
    
    .company-address {
        font-size: 14px;
    }
    
    .company-map-container {
        height: 200px;
        border-radius: 6px; /* Custom - pomiędzy sm (4px) a button (8px) */
    }
}










































