/* =========================================
   ŁapaMapa - Główny Styl (style.css)
   Wersja: SKALOWANIE NAPRAWIONE (Mobile Friendly)
   ========================================= */

/* 1. RESET I USTAWIENIA OGÓLNE */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; 
    background-color: #f0f0f0;
}

/* 2. MAPA */
#map {
    height: 100%;
    width: 100%;
    z-index: 1; 
}

/* 3. LOGO APLIKACJI */
.app-logo {
    position: absolute;
    top: 0; right: 0;
    width: 380px; 
    margin-top: -10px; margin-right: -20px;
    height: auto; 
    z-index: 1000; 
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    pointer-events: none; 
}

@media (max-width: 600px) {
    .app-logo { display: none; }
}

/* 4. GŁÓWNY PRZYCISK */
.btn-main {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%); 
    z-index: 1000; 
    background-color: #FF6700; 
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.1s; 
}
.btn-main:active { transform: translateX(-50%) scale(0.95); }

/* 5. OKNO ZGŁOSZENIOWE (MODAL - NAPRAWIONY) */
.hidden { display: none !important; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); 
    z-index: 2000; 
    display: flex;
    justify-content: center;
    align-items: center; 
    backdrop-filter: blur(3px); 
    /* Usunąłem padding tutaj, bo przeszkadzał na małych ekranach */
}

.modal-content {
    background: white;
    padding: 20px; /* Mniejszy padding wewnątrz */
    border-radius: 20px;
    
    /* --- POPRAWKA SKALOWANIA --- */
    width: 90%; /* Zostawia 5% marginesu po bokach */
    max-width: 400px; /* Nie szersze niż 400px na komputerze */
    /* -------------------------- */
    
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: wyskok 0.3s ease-out;
    max-height: 90vh; /* Maksymalna wysokość */
    overflow-y: auto; /* Przewijanie */
}

@keyframes wyskok { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

h2 { margin-top: 0; margin-bottom: 15px; color: #333; text-align: center; font-size: 22px; }

label {
    display: block; 
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px; /* Trochę mniejsza czcionka */
    color: #555;
    width: 100%;
}

select, input[type="text"], input[type="tel"], textarea {
    width: 100%;
    padding: 10px; /* Mniejszy padding */
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px; 
    box-sizing: border-box; 
    font-family: inherit;
    background: #fff;
}

/* Przyciski do zdjęć */
.btn-photo-green, .btn-photo-gray {
    flex: 1; text-align: center; padding: 12px 5px;
    border-radius: 8px; font-weight: bold; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); font-size: 13px; color: white;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.btn-photo-green { background-color: #28a745; }
.btn-photo-gray { background-color: #6c757d; }

/* Podgląd */
#preview-container { margin-top: 15px; text-align: center; background: #f9f9f9; padding: 10px; border-radius: 8px; border: 1px dashed #ccc; }
#preview-img { max-width: 100%; max-height: 150px; object-fit: contain; border-radius: 5px; display: block; margin: 0 auto 10px auto; }
.btn-remove {
    background-color: #dc3545; color: white; border: none;
    padding: 8px; width: 100%; border-radius: 8px; cursor: pointer;
    font-weight: bold; font-size: 13px;
}

/* Przyciski Dolne */
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; margin-bottom: 5px; }
.btn-secondary { flex: 1; background: #6c757d; color: white; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 16px; }
.btn-primary { flex: 1; background: #FF6700; color: white; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 16px; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Komunikat o braku telefonu */
.warning-box {
    background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba;
    padding: 8px; border-radius: 8px; font-size: 12px; margin-top: 8px;
    display: none; 
}

/* --- STOPKA PRAWNA --- */
.legal-footer {
    position: absolute; bottom: 5px; right: 5px;
    z-index: 999; background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px; border-radius: 5px; font-size: 11px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
.legal-footer a { color: #333; text-decoration: none; margin: 0 5px; }
.legal-footer a:hover { text-decoration: underline; color: #FF6700; }
@media (max-width: 600px) {
    .legal-footer { width: 100%; text-align: center; right: auto; left: 0; bottom: 0; border-radius: 0; }
}

/* --- PINEZKI --- */
.moj-wlasny-pin {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    transition: margin-top 0.2s ease-out, filter 0.2s ease-out;
}
.moj-wlasny-pin:hover { margin-top: -15px; filter: drop-shadow(0 15px 15px rgba(0,0,0,0.5)); }