/* ==========================================================================
   PARTNER.DENIKNEVESTY.CZ – CENTRÁLNÍ DESIGN SYSTÉM & STYLY (partner.css)
   Všechny podstránky partnerské administrace načítají tento soubor.
   ========================================================================== */

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    -webkit-text-size-adjust: 100%;
}

/* Jemné krémovo-růžové pozadí shodné s novým Deníkem nevěsty */
.mesh-gradient {
    background-color: #FDFBF9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(254, 205, 214, 0.35) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 232, 222, 0.5) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 247, 248, 0.6) 0px, transparent 60%),
        radial-gradient(at 0% 100%, rgba(245, 232, 222, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(254, 205, 214, 0.3) 0px, transparent 50%);
}

/* Plovoucí iOS Frosted Glass horní navigace */
.ios-glass-nav {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(28px) saturate(190%) contrast(96%);
    -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(96%);
    border: 1px solid rgba(255, 255, 255, 0.82) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.98) !important;
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.9),
        0 16px 36px -10px rgba(0, 0, 0, 0.08),
        0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}

@media (max-width: 1023px) {
    .ios-glass-nav {
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-radius: 0 !important;
    }
}

/* Hlavní souhrnná karta (Apple Frosted Glass Showcase Window) */
.hero-showcase-window {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.66) 50%, rgba(255, 255, 255, 0.84) 100%);
    backdrop-filter: blur(32px) saturate(190%) contrast(96%);
    -webkit-backdrop-filter: blur(32px) saturate(190%) contrast(96%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top: 1.5px solid #ffffff;
    box-shadow: 
        inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px 0 rgba(255, 255, 255, 0.35),
        0 24px 56px -15px rgba(212, 143, 118, 0.18),
        0 10px 24px -8px rgba(0, 0, 0, 0.035),
        0 0 0 1px rgba(244, 215, 205, 0.55);
    position: relative;
    overflow: hidden;
}

/* Fix pro 100% spolehlivé vykreslování dlaždic rozcestníku bez výpadků WebKit GPU vrstev */
.module-tile {
    background: #ffffff !important;
    border: 1px solid rgba(228, 228, 231, 0.9) !important;
    box-shadow: 0 4px 20px -2px rgba(212, 143, 118, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Formulářové prvky (input, select, textarea) v iOS stylu */
.ios-input {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(214, 211, 209, 0.9);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-input:hover {
    border-color: #fda4af;
    background-color: #ffffff;
}

.ios-input:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14);
    background-color: #ffffff;
}

/* Jemná odezva tlačítek při kliknutí */
.tap-bounce {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
}

.tap-bounce:active {
    transform: scale(0.97);
}

/* Moderní iOS Toggle Switch přepínač */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.ios-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    z-index: 2;
}

.ios-switch-slider {
    position: absolute;
    pointer-events: none;
    inset: 0;
    background-color: #e7e5e4;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ios-switch-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.ios-switch input:checked + .ios-switch-slider {
    background: linear-gradient(135deg, #e11d48 0%, #ec4899 100%);
}

.ios-switch input:checked + .ios-switch-slider::before {
    transform: translateX(20px);
}

.ios-switch input:focus-visible + .ios-switch-slider {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}

/* ==========================================================================
   ŘÁDKOVÉ ZOBRAZENÍ ROZCESTNÍKU (Ultra-kompaktní řádek: [Název] [Pilulka] ... [Šipka])
   ========================================================================== */
.modules-list-view {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
}

/* Celá karta je jeden kompaktní horizontální řádek */
.modules-list-view .module-tile {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.85rem 1.25rem !important;
    gap: 0.75rem !important;
    min-height: unset !important;
    border-radius: 1.25rem !important;
}

/* Levý blok: Název kategorie a hned vedle na stejném řádku odznáček / pilulka */
.modules-list-view .module-tile > div:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    gap: 0.65rem !important;
    flex-wrap: wrap !important;
}

/* Textový obsah: zobrazit pouze název kategorie, skrýt podnadpis s číslováním i dlouhý text */
.modules-list-view .module-tile-body {
    order: 1 !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
}
.modules-list-view .module-tile-body span {
    display: none !important;
}
.modules-list-view .module-tile-body h3 {
    margin-bottom: 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}
.modules-list-view .module-tile-body p {
    display: none !important;
}

/* Odznáček / pilulka (badge): umístěna hned za názvem na stejném řádku */
.modules-list-view .module-tile-icon-row {
    order: 2 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    gap: 0.5rem !important;
}
.modules-list-view .module-tile-icon-row > div:first-child:not(#news-tile-counter-wrap) {
    display: none !important;
}

/* Odznáčky a notifikace v řádkovém zobrazení */
.modules-list-view .module-tile-badge {
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 9999px !important;
}

/* Pravá strana: šipka k otevření modulu */
.modules-list-view .module-tile-footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
}
.modules-list-view .module-tile-footer > span:first-child {
    display: none !important;
}
.modules-list-view .module-tile-footer > span:last-child {
    width: 2rem !important;
    height: 2rem !important;
}

/* Mobilní zobrazení pro řádky (< 640px) */
@media (max-width: 639px) {
    .module-tile-body > div > span:first-child {
        display: none !important;
    }
    .modules-list-view {
        gap: 0.5rem !important;
    }
    .modules-list-view .module-tile {
        padding: 0.65rem 0.85rem !important;
        gap: 0.5rem !important;
    }
    .modules-list-view .module-tile > div:first-child {
        gap: 0.45rem !important;
    }
    .modules-list-view .module-tile-body h3 {
        font-size: 0.94rem !important;
    }
    .modules-list-view .module-tile-badge {
        font-size: 10px !important;
        padding: 0.18rem 0.5rem !important;
    }
    .modules-list-view .module-tile-footer > span:last-child {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }
}

/* Větší obrazovky (tablety a desktop) */
@media (min-width: 768px) {
    .modules-list-view {
        gap: 0.75rem !important;
    }
    .modules-list-view .module-tile {
        padding: 0.95rem 1.4rem !important;
        border-radius: 1.35rem !important;
    }
    .modules-list-view .module-tile > div:first-child {
        gap: 0.85rem !important;
    }
    .modules-list-view .module-tile-body h3 {
        font-size: 1.15rem !important;
    }
    .modules-list-view .module-tile-badge {
        font-size: 11px !important;
        padding: 0.25rem 0.75rem !important;
    }
    .modules-list-view .module-tile-footer > span:last-child {
        width: 2.15rem !important;
        height: 2.15rem !important;
    }
}

/* Vlastní grafické roletkové menu (Custom Glass Dropdown) */
.partner-dropdown-panel {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(254, 205, 211, 0.85);
    box-shadow:
        0 20px 45px -12px rgba(225, 29, 72, 0.16),
        0 8px 18px -6px rgba(0, 0, 0, 0.06);
}

.partner-custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.partner-custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.partner-custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(214, 211, 209, 0.8);
    border-radius: 9999px;
}

.partner-custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 63, 94, 0.55);
}

/* Odsazení plovoucí notifikace a toastu nad spodní mobilní lištou včetně iPhone safe-area */
@media (max-width: 1023px) {
    .partner-floating-bottom-alert {
        bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}


/* Wave 3 Mobile Anti-Zoom Input Fix */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }
}
