/* Barvy vycházejí z přihlašovací stránky (Login Page) */
.admin-sidebar {
    min-height: 100vh;
    background-color: #0f172a;
    background-image: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(15, 23, 42, .25);
}

.admin-content {
    margin-left: 250px;
    min-height: 100vh;
}

.admin-topbar {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.admin-topbar h1 {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -.01em;
}

.sidebar-nav {
    padding: .75rem .5rem;
}

.sidebar-nav .nav-link {
    color: #e2e8f0;
    padding: 0.65rem 1rem;
    margin-bottom: 2px;
    border-radius: .6rem;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .08);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}

.sidebar-nav .nav-link.active:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 1rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.01em;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

/* ========= Mobilní menu (off-canvas) ========= */

.admin-topbar-title {
    min-width: 0;
}

.admin-hamburger,
.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: .6rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease;
}

.admin-hamburger {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
    margin-right: 0.75rem;
}

.sidebar-close {
    color: #e2e8f0;
    background: transparent;
    font-size: 1.1rem;
}

.sidebar-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .08);
}

.admin-sidebar-backdrop {
    display: none;
}

@media (max-width: 599.98px) {
    .admin-hamburger,
    .sidebar-close {
        display: inline-flex;
    }
    
    .sidebar-brand {
        padding: 1.1rem 1rem;
    }
    
    /* sidebar vyjíždí zleva */
    .admin-sidebar {
        width: min(280px, 85vw);
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow-y: hidden;
        transform: translateX(-100%);
        transition: transform .3s ease;
        box-shadow: none;
        z-index: 1045;
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(15, 23, 42, .35);
    }

    .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(15, 23, 42, .55);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s ease;
    }

    body.admin-sidebar-open .admin-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.admin-sidebar-open {
        overflow: hidden;
    }

    /* obsah přes celou šířku */
    .admin-content {
        margin-left: 0;
    }

    .admin-topbar {
        padding: .75rem 1rem;
    }

    .admin-topbar h1.h4 {
        font-size: 1.4rem;
    }

    /* u uživatele jen ikona */
    .admin-topbar .admin-username {
        display: none;
    }

    .admin-main {
        padding: 1rem !important;
    }

    /* --- Hlavičky stránek: nadpis a tlačítka pod sebou --- */
    .admin-main > .d-flex.justify-content-between.mb-4 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .admin-main > .d-flex.justify-content-between.mb-4 h2 {
        font-size: 1.4rem;
    }

    /* --- Svislé mezery mezi kartami poskládanými pod sebe --- */
    .admin-main .row:has(> [class*="col"] > .card) {
        --bs-gutter-y: 1rem;
    }

    /* jedno tlačítko přes celou šířku */
    .admin-main > .d-flex.justify-content-between.mb-4 > .btn {
        width: 100%;
    }

    /* skupina tlačítek: zalamují se a dělí si šířku */
    .admin-main > .d-flex.justify-content-between.mb-4 > div:last-child:not(:first-child) {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .admin-main > .d-flex.justify-content-between.mb-4 > div:last-child:not(:first-child) > .btn {
        flex: 1 1 auto;
        margin: 0 !important;
    }

    /* --- Větší dotykové plochy (min. 40px) --- */
    .admin-content .btn-sm,
    .admin-content .btn-group-sm > .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
    }

    .admin-content .page-link {
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .admin-content .form-control,
    .admin-content .form-select {
        min-height: 44px;
    }

    .admin-content .form-control-sm,
    .admin-content .form-select-sm {
        min-height: 40px;
    }

    .admin-content .form-check-input {
        width: 1.35em;
        height: 1.35em;
    }

    .admin-content .form-switch .form-check-input {
        width: 2.4em;
    }

    .admin-topbar .dropdown-toggle {
        min-height: 40px;
    }

    .admin-topbar .dropdown-item {
        padding-top: .65rem;
        padding-bottom: .65rem;
    }

    .sidebar-nav .nav-link {
        padding-top: .8rem;
        padding-bottom: .8rem;
    }
}

.nav.flex-column.ps-3 .nav-item{
    width: 100%;    
}

.input-group {
    flex-wrap: nowrap;
}

.input-group input.form-control{
    margin-bottom: 0;
}

.sidebar-nav{
    height: calc(100vh - 73px);
    overflow: auto;
}

/* Úzký posuvník menu v barvách administrace (na mobilu se posouvá celý .admin-sidebar) */
.sidebar-nav,
.admin-sidebar {
    scrollbar-width: thin;                                   /* Firefox, Chrome 121+, Edge */
    scrollbar-color: rgba(124, 58, 237, .7) transparent;     /* jezdec #7c3aed, dráha průhledná */
}

/* Safari a starší Chrome */
.sidebar-nav::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track,
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.admin-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover,
.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4338ca, #6d28d9);
}

/* Tabulky popisek–hodnota (informace o souboru, detail formuláře): dlouhé hodnoty se zalamují */
.table-key-value td:last-child {
    overflow-wrap: anywhere;
}

.table-key-value td:first-child {
    white-space: nowrap;
}

/* ========= Jednotný vizuál administrace ========= */
/* Paleta odvozená z levého menu a přihlašovací stránky */
:root {
    --adm-navy: #0f172a;
    --adm-indigo-950: #1e1b4b;
    --adm-indigo-900: #312e81;
    --adm-indigo-800: #3730a3;
    --adm-indigo-700: #4338ca;
    --adm-accent: #4f46e5;
    --adm-violet: #7c3aed;
    --adm-surface: #f1f5f9;
    --adm-border: #e2e8f0;
}

.admin-content {
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-info: #3730a3;
    --bs-info-rgb: 55, 48, 163;
    --bs-dark: #0f172a;
    --bs-dark-rgb: 15, 23, 42;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-link-hover-color-rgb: 67, 56, 202;
}

/* Karty */
.admin-content .card {
    --bs-card-border-color: var(--adm-border);
    --bs-card-border-radius: .9rem;
    --bs-card-inner-border-radius: calc(.9rem - 1px);
    --bs-card-cap-bg: var(--adm-surface);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.admin-content .card-header {
    border-bottom-color: var(--adm-border);
}

.admin-content .card-header .card-title {
    color: var(--adm-navy);
    font-weight: 600;
}

/* Statistické karty na dashboardu - odstíny levého menu */
.admin-content .stat-card {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--stat-from), var(--stat-to));
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    transition: transform .15s ease, box-shadow .15s ease;
}

.admin-content .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .25);
}

.admin-content .stat-card i {
    opacity: .55;
}

.stat-card-1 { --stat-from: #0f172a; --stat-to: #1e1b4b; }
.stat-card-2 { --stat-from: #1e1b4b; --stat-to: #312e81; }
.stat-card-3 { --stat-from: #312e81; --stat-to: #3730a3; }
.stat-card-4 { --stat-from: #3730a3; --stat-to: #4338ca; }
.stat-card-5 { --stat-from: #4338ca; --stat-to: #6d28d9; }

.admin-content .stat-card .stat-card-label {
    color: rgba(255, 255, 255, .75);
}

/* Kolečka posledních aktivit na dashboardu */
.activity-dot {
    background: linear-gradient(135deg, var(--stat-from), var(--stat-to));
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

.activity-dot-dark      { --stat-from: #0f172a; --stat-to: #1e1b4b; }
.activity-dot-secondary { --stat-from: #1e1b4b; --stat-to: #312e81; }
.activity-dot-success   { --stat-from: #312e81; --stat-to: #3730a3; }
.activity-dot-info      { --stat-from: #3730a3; --stat-to: #4338ca; }
.activity-dot-warning   { --stat-from: #4338ca; --stat-to: #6d28d9; }
.activity-dot-primary   { --stat-from: #4f46e5; --stat-to: #7c3aed; }

/* Tlačítka */
.admin-content .btn {
    --bs-btn-font-weight: 500;
    --bs-btn-border-radius: .6rem;
    --bs-btn-focus-shadow-rgb: 79, 70, 229;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.admin-content .btn-sm {
    --bs-btn-border-radius: .5rem;
}

.admin-content .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4f46e5;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4338ca;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3730a3;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: #818cf8;
    --bs-btn-disabled-border-color: transparent;
    background-image: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .25);
}

.admin-content .btn-primary:hover,
.admin-content .btn-primary:focus-visible {
    background-image: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}

.admin-content .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1e1b4b;
    --bs-btn-border-color: #1e1b4b;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #312e81;
    --bs-btn-hover-border-color: #312e81;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0f172a;
    --bs-btn-active-border-color: #0f172a;
    --bs-btn-disabled-bg: #475569;
    --bs-btn-disabled-border-color: #475569;
}

.admin-content .btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3730a3;
    --bs-btn-border-color: #3730a3;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #312e81;
    --bs-btn-hover-border-color: #312e81;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1e1b4b;
    --bs-btn-active-border-color: #1e1b4b;
}

.admin-content .btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: #0f172a;
    --bs-btn-border-color: #0f172a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1e1b4b;
    --bs-btn-hover-border-color: #1e1b4b;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1e1b4b;
    --bs-btn-active-border-color: #1e1b4b;
}

/* Sémantické barvy (uložit/smazat/upozornění) zůstávají, jen ztlumené do palety */
.admin-content .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: #047857;
    --bs-btn-border-color: #047857;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #065f46;
    --bs-btn-hover-border-color: #065f46;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #064e3b;
    --bs-btn-active-border-color: #064e3b;
}

.admin-content .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: #b91c1c;
    --bs-btn-border-color: #b91c1c;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #991b1b;
    --bs-btn-hover-border-color: #991b1b;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #7f1d1d;
    --bs-btn-active-border-color: #7f1d1d;
}

.admin-content .btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: #b45309;
    --bs-btn-border-color: #b45309;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #92400e;
    --bs-btn-hover-border-color: #92400e;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #78350f;
    --bs-btn-active-border-color: #78350f;
}

.admin-content .btn-outline-primary {
    --bs-btn-color: #4f46e5;
    --bs-btn-border-color: #c7d2fe;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4f46e5;
    --bs-btn-hover-border-color: #4f46e5;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4338ca;
    --bs-btn-active-border-color: #4338ca;
}

.admin-content .btn-outline-secondary {
    --bs-btn-color: #475569;
    --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1e1b4b;
    --bs-btn-hover-border-color: #1e1b4b;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0f172a;
    --bs-btn-active-border-color: #0f172a;
}

.admin-content .btn-outline-info {
    --bs-btn-color: #3730a3;
    --bs-btn-border-color: #c7d2fe;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #3730a3;
    --bs-btn-hover-border-color: #3730a3;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #312e81;
    --bs-btn-active-border-color: #312e81;
}

.admin-content .btn-outline-success {
    --bs-btn-color: #047857;
    --bs-btn-border-color: #a7f3d0;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #047857;
    --bs-btn-hover-border-color: #047857;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #065f46;
    --bs-btn-active-border-color: #065f46;
}

.admin-content .btn-outline-danger {
    --bs-btn-color: #b91c1c;
    --bs-btn-border-color: #fecaca;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #b91c1c;
    --bs-btn-hover-border-color: #b91c1c;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #991b1b;
    --bs-btn-active-border-color: #991b1b;
}

.admin-content .btn-outline-warning {
    --bs-btn-color: #b45309;
    --bs-btn-border-color: #fde68a;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #b45309;
    --bs-btn-hover-border-color: #b45309;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #92400e;
    --bs-btn-active-border-color: #92400e;
}

.admin-content .btn-link {
    --bs-btn-color: #4f46e5;
    --bs-btn-hover-color: #4338ca;
    --bs-btn-active-color: #3730a3;
}

/* Tmavé hlavičky tabulek (table-dark) v barvě levého menu */
.admin-content .table-dark {
    --bs-table-color: #fff;
    --bs-table-bg: #1e1b4b;
    --bs-table-border-color: #312e81;
    --bs-table-striped-bg: #25215a;
    --bs-table-striped-color: #fff;
    --bs-table-active-bg: #312e81;
    --bs-table-active-color: #fff;
    --bs-table-hover-bg: #2a2566;
    --bs-table-hover-color: #fff;
    color: #fff;
    border-color: #312e81;
}

.admin-content .table-dark th {
    font-weight: 600;
}

.admin-content .table-dark a {
    color: #fff;
}

/* Formulářové prvky, stránkování a záložky v barvách palety */
.admin-content .form-control:focus,
.admin-content .form-select:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .15);
}

.admin-content .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.admin-content .form-check-input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .15);
}

.admin-content .pagination {
    --bs-pagination-color: #4f46e5;
    --bs-pagination-hover-color: #4338ca;
    --bs-pagination-focus-color: #4338ca;
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .15);
    --bs-pagination-active-bg: #4f46e5;
    --bs-pagination-active-border-color: #4f46e5;
}

.admin-content .nav-tabs,
.admin-content .nav-pills {
    --bs-nav-link-color: #475569;
    --bs-nav-link-hover-color: #4f46e5;
    --bs-nav-pills-link-active-bg: #4f46e5;
}

/* Uživatelské menu vpravo v hlavičce */
.admin-topbar .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: .75rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
    transition: transform .15s ease, box-shadow .15s ease;
}

.admin-topbar .dropdown-toggle:hover,
.admin-topbar .dropdown-toggle:focus,
.admin-topbar .dropdown-toggle.show {
    color: #fff;
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 10px 22px rgba(79, 70, 229, .4);
    transform: translateY(-1px);
}

.admin-topbar .dropdown-menu {
    min-width: 13rem;
    margin-top: .5rem !important;
    padding: .5rem;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .18);
}

.admin-topbar .dropdown-item {
    padding: .55rem .75rem;
    border-radius: .6rem;
    color: #334155;
    font-weight: 500;
}

.admin-topbar .dropdown-item i {
    color: #6366f1;
}

.admin-topbar .dropdown-item:hover,
.admin-topbar .dropdown-item:focus {
    color: #4f46e5;
    background-color: #eef2ff;
}

.admin-topbar .dropdown-item-logout:hover,
.admin-topbar .dropdown-item-logout:focus {
    color: #b91c1c;
    background-color: #fef2f2;
}

.admin-topbar .dropdown-item-logout:hover i {
    color: #b91c1c;
}

.admin-topbar .dropdown-divider {
    margin: .35rem 0;
    border-color: #e2e8f0;
}

#menu-items .drag-handle{
    left: 8px;
    bottom: 8px;
}

#menu-items .btn-group{
    position: relative;
    z-index: 11;
}

/* ========= Admin Gallery Masonry Styles ========= */

.admin-masonry-gallery {
    position: relative;
    width: 100%;
}

.admin-masonry-item {
    padding: 7.5px; /* Half gap for total 15px between items */
    box-sizing: border-box;
    break-inside: avoid;
}

.gallery-admin-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: grab;
    position: relative;
}

.gallery-admin-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.sorting-active .gallery-admin-card {
    cursor: grabbing;
}

.image-container {
    position: relative;
    overflow: hidden;
}

.gallery-admin-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 460px;
}

.drag-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.gallery-admin-card:hover .drag-handle {
    opacity: 1;
}

.sorting-active .drag-handle {
    cursor: grabbing;
}

.sort-order-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #0d6efd;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    z-index: 10;
}

.image-info {
    padding: 12px;
}

.image-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #212529;
}

.image-description {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.3;
}

.image-dimensions {
    color: #adb5bd;
    font-size: 11px;
}

/* Sortable states */
.sortable-ghost {
    opacity: 0.5;
    transform: scale(0.95);
}

.sortable-chosen {
    transform: scale(1.02);
    z-index: 999;
}

.sortable-drag {
    transform: rotate(3deg);
}

/* Responsive adjustments for admin masonry */
@media (max-width: 1199px) {
    .admin-masonry-item {
        padding: 5px; /* Smaller gap on tablets */
    }
}

@media (max-width: 767px) {
    .admin-masonry-item {
        padding: 3px; /* Even smaller gap on mobile */
    }

    .image-info {
        padding: 8px;
    }

    .image-title {
        font-size: 13px;
    }

    .image-description {
        font-size: 11px;
    }

    .drag-handle {
        padding: 4px 6px;
        font-size: 12px;
    }

    .sort-order-badge {
        padding: 2px 6px;
        font-size: 11px;
    }
}

@media (max-width: 575px) {
    .admin-masonry-item {
        padding: 2px; /* Minimal gap on very small screens */
    }

    .image-info {
        padding: 6px;
    }
}

/* Formuláře - univerzální styly */
.admin-content form {
    margin-bottom: 1.5rem;
}

.admin-content form table {
    width: 100%;
    table-layout: fixed;
}

.admin-content form table td,
.admin-content form table th {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.admin-content form table th{
    width: 20%;
    text-align: left;
}

.admin-content form table td:last-child {
    width: auto;
}

.admin-content form label {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0;
    font-weight: 500;
    color: #495057;
}

.admin-content form input,
.admin-content form textarea,
.admin-content form select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

.admin-content form table input,
.admin-content form table textarea,
.admin-content form table select {
    margin-bottom: 0;
}

.admin-content form table th label {
    margin-right: 0;
    margin-bottom: 0;
    font-weight: 600;
}

.admin-content form input[type="checkbox"],
.admin-content form input[type="radio"] {
    width: 1em !important;
    max-width: none !important;
    margin-right: 0.5rem;
    margin-bottom: 0;
    display: inline-block;
}

.admin-content form .form-check {
    margin-bottom: 1.5rem;
}

.admin-content form .form-check input {
    margin-bottom: 0;
}

.admin-content form .form-check label {
    margin-bottom: 0;
    margin-right: 0;
    min-width: auto;
    font-weight: normal;
}

.admin-content form button,
.admin-content form input[type="submit"] {
    width: auto !important;
    margin-bottom: 0;
}

/* TinyMCE Editor Styles */
.tox-tinymce {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

.tox-toolbar-overlord {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.tox-editor-header {
    border-bottom: 1px solid #dee2e6 !important;
}

.tox-edit-area {
    border: none !important;
}

.tox-statusbar {
    border-top: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
}

/* Skryt původní textarea když je TinyMCE aktivní */
.wysiwyg-editor.tox-target {
    display: none !important;
}

/* Responsive TinyMCE */
@media (max-width: 768px) {
    .tox-tinymce {
        width: 100% !important;
    }
}

/* Media Picker Modal - vyšší z-index než TinyMCE */
#mediaPickerModal {
    z-index: 70000 !important;
}

#mediaPickerModal .modal-backdrop {
    z-index: 69999 !important;
}

.media-picker-modal {
    z-index: 70000 !important;
}

/* Page Revisions Styles */
.content-preview {
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.9em;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.content-preview img {
    max-width: 100%;
    height: auto;
}

.content-preview p {
    margin-bottom: 0.5rem;
}

.content-preview h1,
.content-preview h2,
.content-preview h3,
.content-preview h4,
.content-preview h5,
.content-preview h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Revision comparison styles */
.revision-diff-old {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.revision-diff-new {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.revision-badge {
    font-size: 0.8em;
    padding: 0.25rem 0.5rem;
}

/* Revision timeline */
.revision-timeline {
    position: relative;
    padding-left: 2rem;
}

.revision-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.revision-timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.revision-timeline-item::before {
    content: '';
    position: absolute;
    left: -2.25rem;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #6c757d;
    border: 2px solid #fff;
}

.revision-timeline-item.current::before {
    background-color: #198754;
}

.revision-timeline-item.selected::before {
    background-color: #0d6efd;
}

/* Revision action buttons */
.revision-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

tr:hover .revision-actions {
    opacity: 1;
}

/* Revision preview modal */
.revision-preview-content {
    max-height: 60vh;
    overflow-y: auto;
}

.revision-preview-content img {
    max-width: 100%;
    height: auto;
}

/* Revision comparison grid */
.revision-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .revision-comparison {
        grid-template-columns: 1fr;
    }

    .content-preview {
        max-height: 200px;
    }
}

/* Status badges for revisions */
.revision-status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

/* Enhanced dropdown for revision actions */
.revision-dropdown .dropdown-menu {
    min-width: 200px;
}

.revision-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.revision-dropdown .dropdown-item i {
    width: 1.2rem;
}

/* Revision statistics card */
.revision-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.revision-stats .card-body {
    position: relative;
    z-index: 2;
}

.revision-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    border-radius: inherit;
    z-index: 1;
}

/* ==========================================================================
   Page Builder Styles
   ========================================================================== */

/* Page Builder Block Library */
.page-blocks-container {
    min-height: 400px;
    padding: 1rem;
    overflow: hidden;
}

.page-block-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.page-block-wrapper:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.page-block-wrapper.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

/* Block Controls */
.page-block-controls {
    position: absolute;
    top: -15px;
    right: 5px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 0.375rem;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.page-block-controls.column{
    right: auto;
    left: 5px;
    z-index: 11;
    top: -40px;
}

.page-block-wrapper:hover .page-block-controls {
    opacity: 1;
    transform: translateY(0);
}

.page-block-controls .btn {
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.page-block-controls .btn:hover {
    transform: translateY(-1px);
}

.drag-handle {
    cursor: grab;
    padding: 0.25rem;
    color: #6c757d;
    border-radius: 0.25rem;
}

.drag-handle:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.drag-handle:active {
    cursor: grabbing;
}

.block-info {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0 0.5rem;
    white-space: nowrap;
}

/* Block Content */
.page-block-content {
    min-height: 50px;
    padding: 1rem;
    border-radius: 0.375rem;
    position: relative;
}

.page-block-content.block-hidden {
    opacity: 0.5;
    position: relative;
}

.page-block-content.block-hidden::after {
    content: 'Skryto';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
}

/* Empty State */
.empty-state {
    color: #6c757d;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.empty-state:hover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.05);
}

/* Page builder - náhled bloků je v .template (styly a písmo webu, viz styles.css),
   prvky administrace uvnitř náhledu si ale drží písmo a nadpisy administrace */
.page-blocks-container.template :is(.page-block-controls, .empty-state, .column-placeholder, .module-placeholder),
.page-blocks-container.template :is(.page-block-controls, .empty-state, .column-placeholder, .module-placeholder) :is(p, h1, h2, h3, h4, h5, h6) {
    font-family: var(--bs-body-font-family);
    letter-spacing: normal;
}

.page-blocks-container.template :is(.empty-state, .column-placeholder, .module-placeholder) :is(h1, h2, h3, h4, h5, h6) {
    margin-bottom: .5rem;
    padding-bottom: 0;
    font-weight: 500;
    line-height: 1.2;
}

/* tlačítka akcí bloku - vlastní bílé pozadí, barvy Bootstrapu (styly webu je nepřebarví) */
.page-blocks-container.template .page-block-controls .btn {
    --bs-btn-bg: #fff;
    color: var(--bs-btn-color);
    background-color: var(--bs-btn-bg);
    border-color: var(--bs-btn-border-color);
}

.page-blocks-container.template .page-block-controls .btn:hover {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
}

/* odkazy ve světlých prvcích administrace (zástupná karta modulu apod.) - barva administrace, ne webu */
.page-blocks-container.template :is(.empty-state, .column-placeholder, .module-placeholder) a {
    color: #0d6efd;
    text-decoration: underline;
}

.page-blocks-container.template :is(.empty-state, .column-placeholder, .module-placeholder) a:hover {
    color: #0a58ca;
}

/* Blok „Vložit modul“ - živý náhled (obsah je inert, nejde na něj kliknout) */
.module-preview {
    pointer-events: none;
    user-select: none;
}

/* Blok „Vložit modul“ - zástupná karta (modul nevybraný, vypnutý nebo bez obsahu) */
.module-placeholder {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: #6c757d;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
}

.module-placeholder strong {
    color: #212529;
    font-weight: 600;
}

.module-placeholder-icon {
    flex-shrink: 0;
    font-size: 2rem;
    color: #0d6efd;
}

.page-blocks-container.template .module-placeholder .module-placeholder-text {
    margin: .25rem 0 0;
    font-size: .875rem;
}

/* Sortable.js Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #e9ecef;
    border: 2px dashed #6c757d;
}

.sortable-chosen {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.sortable-drag {
    transform: rotate(5deg) !important;
    opacity: 0.8 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
    z-index: 9999 !important;
}

/* Block Types in Library */
.block-type-btn {
    text-align: left;
    border: 1px solid #dee2e6;
    background: white;
    color: #333;
    transition: all 0.2s ease;
}

.block-type-btn:hover {
    border-color: #0d6efd;
    color: #555;
    background: rgba(13, 110, 253, 0.05);
    transform: translateX(2px);
}

.accordion-button {
    font-weight: 600;
    font-size: 0.9rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
}

/* Block Edit Modal */
#blockEditModal .modal-dialog {
    max-width: 800px;
}

#blockEditModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Special Form Elements in Block Editor */
.list-item-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.list-item {
    margin-bottom: 0.5rem;
}

/* Range Slider Styling */
.form-range {
    margin-bottom: 0.5rem;
}

/* Block Templates Specific Styles */
.spacer-block {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(0,0,0,.1) 5px,
        rgba(0,0,0,.1) 10px
    );
    border: 1px dashed #dee2e6;
    position: relative;
}

.spacer-block::after {
    content: 'Mezera';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Block Images - obecné styly pro obrázky v blocích */
.page-block-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.page-block-content img[style*="float: left"] {
    margin: 0 1rem 1rem 0;
    max-width: 50%;
}

.page-block-content img[style*="float: right"] {
    margin: 0 0 1rem 1rem;
    max-width: 50%;
}

.page-block-content img[style*="display: block"] {
    margin: 0 auto 1rem;
}

/* Clearfix pro float obrázky */
.page-block-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Paragraph block s obrázky */
.paragraph-block {
    overflow: hidden; /* Obsahuje float elementy */
}

.paragraph-block img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.paragraph-block p {
    overflow: hidden; /* Zabrání přetečení kolem float obrázků */
}

/* Image block styly */
.block-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.block-image.align-left {
    float: left;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.block-image.align-right {
    float: right;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.block-image.align-center {
    display: block;
    margin: 0 auto 1rem;
}

.image-caption {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* TinyMCE specifické styly pro obrázky */
.page-block-content .mce-content-body img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
}

/* Responzivní obrázky v TinyMCE */
.page-block-content figure {
    margin: 1rem 0;
    text-align: center;
}

.page-block-content figure img {
    margin: 0 auto;
}

.page-block-content figcaption {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Block Library Sticky */
.sticky-top {
    top: 1rem !important;
}

/* Notifications */
.page-builder-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.page-builder-loading {
    position: relative;
    pointer-events: none;
}

.page-builder-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 10;
}

.page-builder-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0d6efd;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Media Picker Integration */
.media-picker-thumb {
    max-width: 100px;
    max-height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 991px) {
    .page-block-controls {
        position: static;
        opacity: 1;
        transform: none;
        justify-content: center;
        margin-bottom: 0.5rem;
        box-shadow: none;
        background: transparent;
    }

    .page-block-wrapper {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .page-blocks-container {
        padding: 0.5rem;
    }

    .page-block-controls .btn {
        font-size: 0.75rem;
        padding: 0.25rem;
    }

    .block-info {
        display: none;
    }

    #blockEditModal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
}

/* Page Builder Modal Styles */
#blockEditModal .modal-body {
    padding: 1.5rem;
    overflow: visible;
}

#blockEditModal .modal-dialog {
    max-width: 90vw;
    max-height: 95vh;
    margin: 1rem auto;
}

#blockEditModal .modal-content {
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

#blockEditModal .modal-body {
    flex: 1;
    overflow: visible;
}

#blockEditModal img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* TinyMCE v modalech - prevence horizontálního scrollování */
#blockEditModal .tox-tinymce {
    max-width: 100% !important;
    box-sizing: border-box;
    height: 500px !important;
    overflow: visible;
}

#blockEditModal .tox-editor-container {
    max-width: 100% !important;
    box-sizing: border-box;
    height: 100%;
}

#blockEditModal .tox-edit-area {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible;
}

/* Padding pro obsah editoru */
#blockEditModal .tox-edit-area iframe {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Obsah TinyMCE - padding */
#blockEditModal .mce-content-body {
    padding: 15px !important;
    margin: 0 !important;
}

#blockEditModal .tox-edit-area iframe {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Všechny obrázky v modalu budou responzivní */
#blockEditModal img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

/* TinyMCE obsah - responzivní obrázky */
#blockEditModal .tox-edit-area iframe {
    width: 100% !important;
}

/* Prevence overflow v celém modalu */
#blockEditModal * {
    box-sizing: border-box;
    max-width: 100%;
}

#blockEditModal table {
    table-layout: fixed;
    width: 100%;
}

#blockEditModal table td,
#blockEditModal table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#form-fields-list{
    overflow: auto;
    max-height: 282px;
}

.collapse-content .when-expanded {
    display: none;
}

.collapse-content .collapsed .when-expanded {
    display: none;
}

.collapse-content .collapsed .when-collapsed {
    display: inline;
}

/* Responsive úpravy pro menší obrazovky */
@media (max-width: 1200px) {
    #blockEditModal .modal-dialog {
        max-width: 95vw;
        margin: 0.5rem;
    }
}

@media (max-width: 768px) {
    #blockEditModal .modal-dialog {
        max-width: 100vw;
        margin: 0;
        height: 100vh;
    }

    #blockEditModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    #blockEditModal .modal-body {
        max-height: calc(100vh - 120px);
        flex: 1;
    }
}

.menu-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    border-left-color: #007bff;
    background-color: #f8f9fa;
}

.menu-item.sortable-ghost {
    opacity: 0.5;
    background-color: #e9ecef;
}

.menu-item.sortable-chosen {
    background-color: #e7f3ff;
    border-left-color: #007bff;
}

.drag-handle:hover {
    color: #007bff !important;
}

.sortable-list {
    min-height: 10px;
}

.save-order-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* Print Styles */
@media print {
    .page-block-controls,
    .drag-handle,
    .block-info {
        display: none !important;
    }

    .page-block-wrapper {
        border: none !important;
        margin-bottom: 1rem;
    }

    .page-block-content {
        background: transparent !important;
        padding: 0;
    }
}

.setting-item {
    transition: all 0.2s ease;
}

.setting-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.setting-input {
    transition: border-color 0.2s ease;
}     

#gallery-images{
    max-height: 282px;
    overflow: auto;
}

/* Page Builder Nested Drag & Drop Styles */

/* Dropzone placeholders for empty sections and columns */
.dropzone-placeholder {
    padding: 2rem;
    margin: 0.5rem 0;
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    text-align: center;
    color: #6c757d;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone-placeholder:hover {
    border-color: #007bff;
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dropzone-content i {
    font-size: 1.5rem;
    opacity: 0.6;
}

.dropzone-content span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Visual indicators for valid drop zones during dragging */
.dragging-block .valid-dropzone {
    position: relative;
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.dragging-block .valid-dropzone::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 0.375rem;
    pointer-events: none;
    z-index: 1;
}

/* Section specific drop zone styling */
.dragging-block [data-section-row].valid-dropzone {
    min-height: 60px;
    padding: 0.5rem;
}

/* Column specific drop zone styling */
.dragging-block .column-content.valid-dropzone {
    min-height: 100px;
    padding: 0.5rem;
}

/* Main page blocks container during dragging */
.dragging-block #page-blocks.valid-dropzone {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.dragging-block #page-blocks.valid-dropzone::after {
    background: rgba(40, 167, 69, 0.1);
}

/* Sortable ghost and drag styles for nested items */
.sortable-ghost {
    opacity: 0.5;
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
}

.sortable-chosen {
    transform: rotate(2deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.sortable-drag {
    transform: rotate(5deg);
    opacity: 0.8;
}

/* Enhanced page block wrapper for nested functionality */
.page-block-wrapper {
    position: relative;
}

.page-block-wrapper.sortable-chosen {
    z-index: 1000;
}

/* Section and column containers */
[data-section-row] {
    min-height: 100px;
    padding: 1rem;
    border: 2px dashed transparent;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

[data-section-row]:hover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.column-content {
    min-height: 120px;
    padding: 1rem;
    border: 2px dashed transparent;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background-color: rgba(248, 249, 250, 0.5);
}

.column-content:hover {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

/* Nested structure visual indicators */
.page-block-wrapper[data-parent-type="section"] {
    border-left: 3px solid #007bff;
    margin-left: 0.5rem;
}

.page-block-wrapper[data-parent-type="column"] {
    border-left: 3px solid #28a745;
    margin-left: 1rem;
}

/* Loading state for drag operations */
.page-builder-loading .page-block-wrapper {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments for nested blocks */
@media (max-width: 768px) {
    .dropzone-placeholder {
        padding: 1rem;
        min-height: 60px;
    }

    .page-block-wrapper[data-parent-type="section"],
    .page-block-wrapper[data-parent-type="column"] {
        margin-left: 0.25rem;
        border-left-width: 2px;
    }
}

/* Animation for newly added blocks */
.page-block-wrapper.newly-added {
    animation: slideInFade 0.3s ease-out;
}

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


/* Banner Block Styles */
.banner-block{
    height: 100%;
    margin-bottom: 20px;
}

@media (min-width: 768px){
    .banner-block {
        margin-bottom: 0;
    }
    
    .col-md-6:not(.section-full-text) .column-content{
        height: 100%;
    }
}

.banner-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.banner-link:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.banner-container {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.banner-link:hover .banner-container {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.banner-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.banner-link:hover .banner-image {
    transform: scale(1.05);
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    color: white;
    padding: 2rem;
    transform: translateY(0);
    transition: transform 0.3s ease, padding 0.3s ease;
}

.banner-link:hover .banner-content {
    padding: 2.5rem 2rem;
}

.banner-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-text {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.4;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.banner-button {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-link:hover .banner-button {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.banner-button i {
    transition: transform 0.3s ease;
}

.banner-link:hover .banner-button i {
    transform: translateX(3px);
}

/* Responsive banner styles */
@media (max-width: 768px) {
    .banner-content {
        padding: 1.5rem;
    }

    .banner-link:hover .banner-content {
        padding: 1.75rem 1.5rem;
    }

    .banner-title {
        font-size: 1.25rem;
    }

    .banner-text {
        font-size: 0.9rem;
    }

    .banner-button {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .banner-content {
        padding: 1rem;
    }

    .banner-link:hover .banner-content {
        padding: 1.25rem 1rem;
    }

    .banner-title {
        font-size: 1.1rem;
    }

    .banner-text {
        font-size: 0.85rem;
    }

    .banner-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========= Admin Heading Sizes ========= */
.admin-content h1 { font-size: 1.75rem; padding:0; }
.admin-content h2 { font-size: 1.6rem; }
.admin-content h3 { font-size: 1.4rem; }
.admin-content h4 { font-size: 1.25rem; }
.admin-content h5 { font-size: 1.1rem; }
.admin-content h6 { font-size: 1rem; }
/* ========= Login Page ========= */
body.login-page {
    min-height: 100vh;
    margin: 0;
    background-color: #0f172a;
    background-image: var(--login-background);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Ztmavení pozadí pro lepší čitelnost */
body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, .78) 0%, rgba(30, 27, 75, .5) 100%);
    z-index: 0;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
}

.login-brand {
    color: #fff;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -.02em;
    text-align: center;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .4);
    margin: 0 0 1.5rem;
}

.login-flashes {
    width: 100%;
    max-width: 420px;
}

.login-flashes .alert {
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

/* Box vycentrovaný ve zbylém prostoru */
.login-center {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem 2rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 1.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
}

.login-card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .4);
}

.login-card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .25rem;
}

.login-card-header p {
    color: #64748b;
    font-size: .9rem;
    margin: 0;
}

.login-form .form-floating > .form-control {
    border-radius: .75rem;
    border-color: #e2e8f0;
}

.login-form .form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .15);
}

.login-form .form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.login-errors {
    list-style: none;
    padding: .75rem 1rem;
    margin: 0 0 1rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: .75rem;
    font-size: .9rem;
}

.login-submit {
    width: 100%;
    padding: .8rem 1rem;
    font-weight: 600;
    border: 0;
    border-radius: .75rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 8px 20px rgba(79, 70, 229, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}

.login-submit:hover,
.login-submit:focus {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 12px 26px rgba(79, 70, 229, .45);
}

/* Otevírací doba - tabulka týdne se na úzkém displeji posouvá do strany */
.opening-hours-admin-table {
    min-width: 560px;
}

.opening-hours-admin-table input[type="time"] {
    min-width: 130px;
}

.admin-content .text-muted{
    color: var(--bs-secondary-color) !important;
}   