/* Premium Light Theme - taXi-LP branding matching screenshots */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: #f7f6f2; /* Teplé světlé pozadí */
    color: #2d2d2d; /* Tmavě šedé písmo */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px 0;
}

.app-container {
    width: 100%;
    max-width: 1100px; /* Luxusní a vyvážená šířka pro centrování */
    margin: auto; /* Magické centrování ve flexboxu (vertikálně i horizontálně) */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Hlavička webu */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
}

.app-logo {
    height: 48px;
    object-fit: contain;
    transition: height 0.2s ease;
}

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-online .status-dot {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

.status-busy {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-busy .status-dot {
    background-color: #f59e0b;
}

.status-offline {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}
.status-offline .status-dot {
    background-color: #6b7280;
}

/* Hlavní rozložení (Split Layout) */
.app-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    width: 100%;
}

@media (max-width: 900px) {
    .app-main {
        grid-template-columns: 1fr;
    }
    .map-panel {
        height: 380px; /* Pevná výška na tabletech při vertikálním naskládání */
        min-height: auto;
    }
}

/* Světlá Karta s horním zlatým ohraničením z dodaného screenshotu */
.card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border-top: 4px solid #e5a93b; /* Zlatý vrchní lem */
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c2c2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Slevový štítek z screenshotu */
.discount-badge {
    background-color: #108c52;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(16, 140, 82, 0.2);
}

/* Formuláře - Světlé vstupy */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    background-color: #f9f9fb;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    padding: 12px 14px;
    color: #2c2c2e;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #e5a93b;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(229, 169, 59, 0.15);
}

/* Výběr času odjezdu (Tabs) */
.time-tabs {
    display: flex;
    background-color: #f2f2f7;
    border-radius: 10px;
    padding: 4px;
    border: 1px solid #e5e5ea;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #8e8e93;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background-color: #e5a93b;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(229, 169, 59, 0.25);
}

.tab-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Plánovač předobjednávek */
.scheduler-container {
    background-color: #fcfbf9;
    border: 1px dashed rgba(229, 169, 59, 0.4);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.2s ease;
}

.scheduler-container label {
    font-size: 0.8rem;
    color: #e5a93b;
    font-weight: 700;
}

.scheduler-container input {
    background-color: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    padding: 8px 12px;
    color: #2c2c2e;
    font-size: 0.9rem;
}

.notice-text {
    font-size: 0.75rem;
    color: #e5a93b;
    font-style: italic;
    line-height: 1.3;
}

/* Karta ceny */
.price-card {
    background: linear-gradient(135deg, rgba(229, 169, 59, 0.08) 0%, rgba(255, 170, 0, 0.03) 100%);
    border: 1px solid rgba(229, 169, 59, 0.15);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: scaleIn 0.2s ease;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row span {
    color: #e5a93b;
    font-weight: 600;
    font-size: 0.9rem;
}

.price-row strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2c2c2e;
}

.price-details {
    font-size: 0.8rem;
    color: #8e8e93;
}

/* Tlačítka - Tmavě šedé, lesklé podle dodaného screenshotu */
.btn {
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary {
    background-color: #2c2c2e; /* Tmavý podklad z screenshotu */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(44, 44, 46, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background-color: #1c1c1e;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44, 44, 46, 0.25);
}

.btn-danger {
    background-color: #dc2626; /* Výrazná červená */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
}

.btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
}

.btn-secondary {
    background-color: #e5e5ea;
    color: #2c2c2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #d1d1d6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary:active:not(:disabled), .btn-secondary:active:not(:disabled), .btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    background-color: #e5e5ea;
    color: #aeaea2;
    cursor: not-allowed;
    box-shadow: none;
}

/* Pravá sekce: Mapa a Rychlý kontakt */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Karta Mapy */
.map-panel {
    padding: 5px;
    overflow: hidden;
    height: 100%; /* Vyplní celou výšku gridu a srovná se s formulářem */
    min-height: 520px; /* Zajišťuje skvělou výšku na velkých displejích */
    border-radius: 20px;
    position: relative; /* Nutné pro absolutní pozicování křížku/špendlíku */
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

/* Zaměřovací špendlík uprostřed mapy (permanentně schovaný v prospěch draggable start markeru) */
.map-center-pin {
    display: none !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Cvrknutí/tažení prochází skrz na mapu */
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1.25);
}

.map-center-pin.dragging {
    transform: translate(-50%, -68%) scale(1.15); /* Povytažení a zvětšení při tažení mapy */
}

.map-center-pin .pin-icon {
    width: 16px;
    height: 16px;
    border: 3.5px solid #e5a93b; /* Zlatý lem */
    border-radius: 50%;
    background-color: #2c2c2e; /* Tmavé tělo */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
    position: relative;
    transition: all 0.2s ease;
}

.map-center-pin .pin-icon::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid #e5a93b; /* Zlatá špička */
}

.map-center-pin .pin-shadow {
    width: 10px;
    height: 3.5px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    position: absolute;
    bottom: -13px;
    transition: all 0.2s ease;
}

.map-center-pin.dragging .pin-shadow {
    transform: scale(0.4);
    opacity: 0.4;
}

.map-center-pin.hidden {
    display: none !important;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background-color: #f2f2f7;
    color: #8e8e93;
}

/* Druhá karta: Taxi na zavolání z dodaného screenshotu */
.call-panel {
    background-color: #ffffff;
}

.phone-button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #2c2c2e;
    color: #ffd700;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.phone-button-link:hover {
    background-color: #1c1c1e;
    transform: translateY(-1px);
}

.call-guideline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #f9f9fb;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e5e5ea;
}

.call-guideline h3 {
    font-size: 0.75rem;
    font-weight: 800;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.guideline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #2c2c2e;
    font-weight: 600;
}

.guideline-icon {
    font-size: 1.1rem;
}

/* Chybový banner */
.error-banner {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 12px;
    color: #ef4444;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Závěrečná patička (Dark Footer z screenshotu) */
.app-footer {
    background-color: #2c2c2e;
    color: #aeaea2;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 4px solid #e5a93b;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
    font-size: 0.8rem;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.footer-col h3 {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: #6b7280;
}

.hidden {
    display: none !important;
}

/* Spinner a animace */
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(229, 169, 59, 0.1);
    border-top: 3px solid #e5a93b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* GPS Zaměřovací tlačítko */
.gps-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e5e5ea;
    color: #2c2c2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gps-btn:hover {
    background-color: #f2f2f7;
    color: #e5a93b;
    transform: scale(1.05);
}

.gps-btn:active {
    transform: scale(0.95);
}

/* --- STYLY PRO LIVE SLEDOVÁNÍ JÍZDY --- */
.status-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2c2c2e;
    margin-bottom: 6px;
}

.status-description {
    font-size: 0.95rem;
    color: #8e8e93;
    line-height: 1.4;
}

.tracking-route-details {
    background-color: #f7f6f2; /* Teplé krémové pozadí */
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.detail-item span {
    color: #8e8e93;
    font-weight: 500;
}

.detail-item strong {
    color: #2c2c2e;
    font-weight: 800;
    font-size: 1.05rem;
}

.tracking-driver-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.driver-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.driver-text strong {
    font-size: 0.95rem;
    color: #2c2c2e;
    font-weight: 700;
}

.driver-text span {
    font-size: 0.8rem;
    color: #8e8e93;
}

.plate-number-badge {
    background-color: #e5a93b; /* Zlatý podklad taXi-LP */
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(229, 169, 59, 0.2);
}

.tracking-finish-details {
    background-color: rgba(16, 140, 82, 0.05);
    border: 1px solid rgba(16, 140, 82, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-row span {
    color: #108c52;
    font-weight: 600;
}

.receipt-row strong {
    font-size: 1.3rem;
    color: #108c52;
    font-weight: 800;
}

/* Mobilní responzivita: Plovoucí spodní panel s fixní horní hlavičkou */
@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        height: 100vh;
        width: 100vw;
        overflow: hidden;
    }

    .app-container {
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Hlavička - fixní nahoře, neplovoucí */
    .app-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        z-index: 10;
        background: #ffffff;
        padding: 10px 15px;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    .app-logo {
        height: 32px;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .app-main {
        position: relative;
        width: 100%;
        height: calc(100vh - 58px); /* Vyplní zbytek výšky pod hlavičkou */
        overflow: hidden;
    }

    /* Celoplošná mapa na pozadí pod panelem */
    .map-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        padding: 0;
        margin: 0;
        z-index: 1;
    }

    #map {
        border-radius: 0;
        height: 100%;
    }

    /* Posunutí plovoucího špendlíku do středu viditelné oblasti (nad spodní panel) */
    .map-center-pin {
        top: 24% !important; /* Polovina z neobsazené horní části (48%) */
    }

    /* Plovoucí GPS tlačítko - vpravo nad spodním panelem */
    .gps-btn {
        position: absolute;
        top: auto;
        bottom: calc(52vh + 15px); /* Umístěno těsně nad spodní kartu */
        right: 15px;
        z-index: 10;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }

    /* Objednávkový a sledovací panel - plovoucí na spodku */
    .booking-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 52vh; /* Spodní panel pluje a překrývá 52% mapy */
        max-height: 52vh;
        z-index: 2;
        border-radius: 28px 28px 0 0; /* Elegantní zaoblení vršku */
        border-top: 4px solid #e5a93b;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
        padding: 20px 20px 30px 20px;
        overflow-y: auto;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .booking-panel h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .form-group {
        gap: 4px;
    }

    .form-group label {
        font-size: 0.7rem;
    }

    .form-group input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .btn {
        padding: 10px;
        font-size: 0.85rem;
    }

    /* Skryjeme patičku a druhou sekci na mobilu */
    .app-footer, .call-panel, .right-panel > *:not(.map-panel) {
        display: none !important;
    }
}
