/* assets/css/sections/modal.css */

/* =========================================
   1. ZÁKLADNÍ OVERLAY A SPOLEČNÉ PRVKY
   ========================================= */
.apple-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    
    /* OPRAVA ROLOVÁNÍ PRO DLOUHÁ OKNA */
    display: flex; 
    align-items: flex-start; /* Zabrání oříznutí vršku okna */
    justify-content: center;
    overflow-y: auto;
    padding: 40px 20px;
    
    opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-overflow-scrolling: touch;
}

.apple-modal-overlay.active { opacity: 1; visibility: visible; }

.apple-modal-content {
    margin: auto; /* Automatické centrování kratších oken */
    background: #FFFFFF;
    width: 100%;
    border-radius: 32px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* Odstraněno max-height a overflow-y - roluje celý overlay */
}

.apple-modal-overlay.active .apple-modal-content { transform: scale(1) translateY(0); }

/* Křížek pro zavření */
.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(241, 245, 249, 0.9);
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #0f172a;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
    z-index: 50;
}
.modal-close:hover { background: #e2e8f0; transform: rotate(90deg); }


/* =========================================
   2. SERVISNÍ MODAL (DETAIL SLUŽBY)
   ========================================= */
.service-modal-premium {
    max-width: 550px;
    padding: 0;
}

.modal-mascot-header { 
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 25px 0 0;
    display: flex; flex-direction: column; align-items: center;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 32px 32px 0 0;
}

.modal-f-mascot { 
    height: 120px; 
    width: auto; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    display: block; margin-bottom: -1px;
}

.modal-body-padding { padding: 25px 35px 35px; text-align: center; }

.modal-body-padding h3 { 
    font-size: 1.8rem; font-weight: 800; color: #0f172a; 
    margin-bottom: 12px; line-height: 1.15; 
}

.modal-lead { font-size: 1.05rem; line-height: 1.5; color: #475569; margin-bottom: 15px; }

.modal-list-premium { 
    list-style: none; padding: 0; margin: 20px 0; 
    display: grid; grid-template-columns: 1fr; gap: 10px; 
    text-align: left; 
}
.modal-list-premium li { 
    font-weight: 700; font-size: 0.95rem; color: #334155; 
    display: flex; align-items: center; gap: 10px; 
    background: #f8fafc; padding: 10px 14px; border-radius: 8px;
}
.modal-list-premium li::before { 
    content: '\f058'; font-family: "Font Awesome 6 Free"; font-weight: 900; 
    color: #10b981; font-size: 1.1rem; 
}

.modal-cta-btn {
    width: 100%; justify-content: center; display: flex; align-items: center; gap: 10px;
    background: #FF5E00; color: #fff; padding: 16px; border-radius: 100px;
    font-weight: 800; font-size: 1.05rem; text-decoration: none;
    box-shadow: 0 10px 25px rgba(255, 94, 0, 0.3);
    transition: all 0.3s;
    box-sizing: border-box;
}
.modal-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(255, 94, 0, 0.4); }


/* =========================================
   3. OBJEDNÁVKOVÝ MODAL (FORMULÁŘ)
   ========================================= */
.order-modal-redesign {
    max-width: 600px;
    padding: 50px 40px;
}

.modal-header-fancy { text-align: center; margin-bottom: 30px; }
.modal-header-fancy .header-icon {
    width: 60px; height: 60px; background: #eff6ff; color: #0056D2;
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 1.5rem;
}
.modal-header-fancy h2 { font-size: 1.8rem; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.modal-header-fancy p { color: #64748b; font-size: 1rem; }
.emergency-link-inline { color: #FF5E00; font-weight: 700; text-decoration: underline; }

.modal-form-fancy .input-group { margin-bottom: 20px; display: flex; flex-direction: column; text-align: left; }
.modal-form-fancy label { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; color: #334155; text-transform: uppercase; }

.modal-form-fancy input, 
.modal-form-fancy textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-family: inherit; font-size: 1rem; color: #0f172a;
    transition: all 0.3s;
    box-sizing: border-box;
}

.modal-form-fancy input:focus, 
.modal-form-fancy textarea:focus {
    outline: none; border-color: #0056D2; background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 210, 0.1);
}

.modal-form-fancy textarea { min-height: 100px; resize: vertical; }
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* SLIDER CAPTCHA */
.captcha-slider-area { margin: 30px 0; }
.slider-track { 
    height: 56px; background: #f1f5f9; border-radius: 100px; 
    position: relative; border: 2px solid #e2e8f0; overflow: hidden; 
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s;
}
.slider-handle {
    position: absolute; left: 4px; top: 4px; width: 44px; height: 44px;
    background: #fff; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: #FF5E00; box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    cursor: grab; z-index: 5; font-size: 1.2rem;
}
.slider-text { font-size: 0.9rem; font-weight: 700; color: #94a3b8; user-select: none; }

.slider-track.unlocked { background: #10b981; border-color: #059669; }
.slider-track.unlocked .slider-text { color: #fff; }
.slider-track.unlocked .slider-handle { color: #10b981; cursor: default; }

.btn-submit-fancy {
    width: 100%; padding: 18px; background: #0056D2; color: #fff; border: none;
    border-radius: 100px; font-weight: 800; font-size: 1.1rem; cursor: pointer;
    opacity: 0.5; pointer-events: none; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-sizing: border-box;
}
.btn-submit-fancy.active { opacity: 1; pointer-events: auto; box-shadow: 0 10px 25px rgba(0, 86, 210, 0.3); }
.btn-submit-fancy:hover { background: #0046aa; transform: translateY(-2px); }


/* =========================================
   4. DĚKOVACÍ MODAL (SUCCESS)
   ========================================= */
.thank-you-modal-redesign {
    text-align: center;
    max-width: 480px !important;
    padding: 50px 30px !important;
}

.success-icon-wrapper {
    width: 90px; height: 90px;
    background: #dcfce7; color: #16a34a;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; margin: 0 auto 25px; position: relative;
}

.success-circle-anim {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; border: 2px solid #16a34a;
    animation: successPulse 2s infinite; opacity: 0;
}

@keyframes successPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.success-text-content h2 { font-size: 2rem; color: #0f172a; margin-bottom: 15px; }
.success-text-content p { color: #64748b; font-size: 1.1rem; margin-bottom: 20px; }
.success-text-content .small-info { font-size: 0.95rem; background: #f8fafc; padding: 15px; border-radius: 12px; margin-bottom: 30px; }

.btn-success-close-action {
    background: #0f172a; color: #fff; border: none; padding: 16px; width: 100%;
    border-radius: 50px; font-weight: 700; font-size: 1.1rem; cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
}
.btn-success-close-action:hover { background: #0056D2; }


/* =========================================
   5. LOKALITY MODAL (MAPA)
   ========================================= */
.service-modal-premium.modal-wide {
    max-width: 900px;
    padding: 0;
    display: flex; flex-direction: column;
}

.modal-header-split {
    padding: 25px; background: #fff; border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; gap: 20px;
    border-radius: 32px 32px 0 0;
}
.header-icon-pill {
    width: 50px; height: 50px; background: #eff6ff; color: #0056D2;
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    flex-shrink: 0;
}

.modal-split-body {
    display: flex;
    flex-wrap: wrap;
}

.split-col { padding: 25px; flex: 1; min-width: 300px; }
.left-col { background: #fff; border-right: 1px solid #f1f5f9; }
.right-col { background: #f8fafc; }

.col-title { 
    font-size: 1rem; text-transform: uppercase; color: #0f172a; margin-bottom: 20px; 
    font-weight: 800; display: flex; align-items: center; gap: 8px;
}

.loc-group { margin-bottom: 20px; }
.loc-label { display: block; font-weight: 700; margin-bottom: 8px; color: #334155; }
.loc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.town-pill { 
    background: #f1f5f9; padding: 4px 10px; border-radius: 6px; 
    font-size: 0.85rem; color: #475569; border: 1px solid #e2e8f0; 
}

.district-item { 
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; 
    padding: 12px; margin-bottom: 10px; 
}
.district-item strong { display: block; color: #0056D2; font-size: 0.9rem; margin-bottom: 4px; }
.streets-inline { font-size: 0.85rem; color: #64748b; }

.modal-footer-sticky { 
    padding: 20px; background: #fff; border-top: 1px solid #f1f5f9; 
    border-radius: 0 0 32px 32px;
}


/* =========================================
   6. DOKONALÁ RESPONSIVITA PRO MOBILY
   ========================================= */
@media (max-width: 768px) {
    .apple-modal-overlay { padding: 20px 15px; }
    
    .order-modal-redesign { padding: 35px 20px; }
    
    .modal-body-padding { padding: 20px 20px 25px; }
    .modal-body-padding h3 { font-size: 1.5rem; margin-bottom: 10px; }
    .modal-lead { font-size: 0.95rem; margin-bottom: 12px; }
    
    .modal-list-premium { margin: 12px 0 20px; gap: 8px; }
    .modal-list-premium li { padding: 8px 12px; font-size: 0.85rem; }
    
    .modal-mascot-header { padding-top: 20px; }
    .modal-f-mascot { height: 100px; }
    
    .modal-cta-btn { padding: 14px; font-size: 1rem; }

    .modal-header-split { 
        padding: 20px 15px; 
        flex-direction: column; 
        text-align: center; 
    }
    
    .modal-split-body { flex-direction: column; }
    .split-col { border-right: none; padding: 20px 15px; width: 100%; box-sizing: border-box; }
    
    .form-row-split { grid-template-columns: 1fr; gap: 0; }
    .thank-you-modal-redesign { padding: 40px 20px !important; }
}