/* Zaobljeni kutevi posvuda s overflow: hidden da unutrašnjost ne probija rubove */
.card {
    border-radius: 0.375rem !important;
    border: 1px solid #b0bec5 !important;
    overflow: hidden !important;
}

.card-body {
    border-radius: 0.375rem !important;
}

/* Stil za footer i glavni omotač menija */
.custom-footer {
    background-color: #52616b;
    border-radius: 0.375rem;
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: center;
}

.custom-navbar {
    background-color: #52616b;
    border-radius: 0.375rem;
    padding: 0;
    overflow: hidden;
}

.custom-navbar .navbar-nav {
    width: 100%;
}

.custom-navbar .nav-item {
    display: flex;
    align-items: stretch;
}

.custom-navbar .nav-link {
    color: #ffffff;
    padding: 1rem 20px !important;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border-radius: 0.375rem;
}

.custom-navbar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

/* Puna visina pozadine za aktivni menu */
.custom-navbar .nav-link.active,
.custom-navbar .show>.nav-link {
    background-color: #3e4a52 !important;
    color: #ffffff !important;
    border-radius: 0.375rem !important;
}

/* Okomite crte koje idu cijelom visinom */
.nav-separator {
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    align-self: stretch;
}

/* naslovnica zadnje */
.edicija-naslov {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    height: 2.4em;
    /* Fiksna visina za otprilike 2 reda teksta */
    line-height: 1.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Prikazuje maksimalno 2 reda, a višak reže */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin-top: 5px;
}

/* Stil za horizontalni scroll kontejner s uklonjenom trakom */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    gap: 15px;
    padding: 5px 40px;
    /* Ostavlja prostor za strelice sa strane */
}

.scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

/* Pozicioniranje strelica preko rubova */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.slider-btn {
    position: absolute;
    z-index: 10;
    background-color: #3e4a52;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.slider-btn:hover {
    background-color: #2c353b;
}

.slider-btn-prev {
    left: 0;
}

.slider-btn-next {
    right: 0;
}

/* Uklanjanje neželjenog zakrivljenja s vrha tijela kartice */
.card .card-body {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Uklanjanje bijeljenja / obruba linije prilikom klika na karticu ili elemente */
.card,
.card-header,
.card-body {
    outline: none !important;
    box-shadow: none !important;
}

.card:focus,
.card-header:focus,
.card-body:focus {
    outline: none !important;
    box-shadow: none !important;
}

.card .card-body {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.card,
.card-header,
.card-body {
    outline: none !important;
    box-shadow: none !important;
}

.card:focus,
.card-header:focus,
.card-body:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Stilovi za accordion unutar list-group-a da se uklopi u standardni dizajn */
.list-group-item-accordion {
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .125);
}

.list-group-item-accordion .accordion-button {
    padding: 0;
    background-color: transparent;
    color: #495057;
    box-shadow: none !important;
}

.list-group-item-accordion .accordion-button:not(.collapsed) {
    background-color: transparent;
    color: #0d6efd;
}

.list-group-item-accordion .accordion-body {
    padding: 0.5rem 0 0.5rem 90px;
    /* Uklanjamo lijevi padding i dodajemo točno 90px koliko širine zauzima sivi dio s brojem */
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, .125);
}

.sub-episode-item {
    display: block;
    padding: 0.25rem 1rem;
    /* Malo smanjujemo vertikalni razmak da ljepše izgleda */
    color: #495057;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.sub-episode-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* Stil grupnog prikaza u stilu paginacije (dva spojena dijela) */
.pagination-style-item {
    display: flex;
    align-items: stretch;
    padding: 0 !important;
    overflow: hidden;
}

.pagination-style-item .strip-broj {
    flex: 0 0 90px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0.75rem 0.5rem;
    border-right: 1px solid rgba(0, 0, 0, .125);
}

.pagination-style-item .strip-naziv {
    flex: 1;
    background-color: #fff;
    color: #495057;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.pagination-style-item.list-group-item-action:hover .strip-naziv {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.accordion-button .strip-naziv {
    background-color: transparent;
}

.accordion-button:not(.collapsed) .strip-naziv {
    color: #0d6efd;
}

.naslovnica_thumb {
    width: 109px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #b0bec5;
    box-sizing: border-box;
}

.naslovnica_thumb_nema {
    width: 109px;
    height: 150px;
    background-color: #e9ecef;
    border: 1px solid #b0bec5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}

.naslovnica_thumb_nema_text {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.naslovnica_okvir_zadnje_dodatno {
    flex: 0 0 109px;
    width: 109px;
    text-align: center;
}

/* Glavna klasa za tablicu */
.table-comic {
    background-color: transparent !important;
}

/* Stil za retke (isprekidana linija između redaka) */
.table-comic tbody tr {
    border-bottom: 1px dashed #ced4da;
}

/* Stil za prvi stupac (naziv / labela) */
.table-comic tbody td:first-child {
    font-weight: bold;
    color: #212529;
    /* text-dark ekvivalent */
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    white-space: nowrap;
    width: 32%;
    /* Ovdje lako promijeniš širinu po potrebi, npr. 30%, 40%... */
}

/* Stil za drugi stupac (vrijednost) */
.table-comic tbody td:nth-child(2) {
    color: #0d6efd;
    /* text-primary ekvivalent */
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* slova i brojke tzv abeceda */
/* Zajednički stil za gumbe i oznake slova */
.letter-box {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-sizing: border-box;
    text-decoration: none;
}

/* Klikabilno slovo (ima edicije) - standardno stanje */
.letter-box-active {
    background-color: #ffffff;
    color: #495057;
    border: 1px solid #b0bec5;
}

/* Trenutno aktivno/odabrano slovo */
.letter-box-current {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border: 1px solid #b0bec5;
}

/* Neaktivno slovo (nema edicije) */
.letter-box-disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    border: 1px solid #dee2e6;
    cursor: not-allowed;
}

/* usporedni popis */
.card .card-body {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}
.card, .card-header, .card-body {
    outline: none !important;
    box-shadow: none !important;
}
.card:focus, .card-header:focus, .card-body:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Fiksiranje boje teksta i pozadine gumba u svim stanjima (hover, focus, active) */
#toggleWidthBtn,
#toggleWidthBtn:hover,
#toggleWidthBtn:focus,
#toggleWidthBtn:active {
    background-color: #ffffff !important;
    color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Glavni kontejner ostaje centriran na 1200px */
.page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* Kada je aktivno proširenje, kartica se širi ali ostavlja 50px sa svake strane (ukupno 100px) */
.page-container.full-width-mode {
    max-width: calc(100vw - 100px) !important;
    padding-left: 0;
    padding-right: 0;
}

.page-container.full-width-mode .expandable-card {
    width: calc(100vw - 100px) !important;
    max-width: calc(100vw - 100px) !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: calc(-50vw + 50px) !important;
    margin-right: calc(-50vw + 50px) !important;
    border-radius: 0.375rem !important;
}

/* Omotač tablice prati širinu unutar okvira */
.table-custom-wrapper {
    background: #fff;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.125);
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.table-responsive {
    overflow: auto;
    flex: 1 1 auto;
    width: 100%;
}
.table-matrica {
    margin-bottom: 0;
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}
.table-matrica th, .table-matrica td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #edf2f7;
    border-right: 1px solid #edf2f7;
}
.table-matrica th {
    background-color: #e9ecef;
    color: #495057;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}
.table-matrica th.text-start-custom {
    text-align: left;
}

/* Fiksirani (sticky) prvi stupac - Originalni broj */
.table-matrica th:nth-child(1) {
    left: 0;
    z-index: 4;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}
.table-matrica td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #f8f9fa !important;
    font-weight: bold;
    text-align: center;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Fiksirani (sticky) drugi stupac - Originalni naziv */
.table-matrica th:nth-child(2) {
    left: 80px;
    z-index: 4;
    min-width: 250px;
}
.table-matrica td:nth-child(2) {
    position: sticky;
    left: 80px;
    z-index: 2;
    background-color: #ffffff !important;
    font-weight: 500;
    min-width: 250px;
    max-width: 350px;
    white-space: normal;
    box-shadow: 3px 0 5px -2px rgba(0,0,0,0.1);
}

.kolona-edicija {
    text-align: left;
    font-weight: 600;
    color: #084298;
    background-color: #fefefe;
    white-space: nowrap;
}
.celija-prazna {
    color: #cbd5e1;
    text-align: center;
    white-space: nowrap;
}