.fgc {
    max-width: 100%;
    line-height: 1.5
}

.fgc * {
    box-sizing: border-box
}

.fgc-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin: 1rem 0
}

.fgc label {
    display: flex;
    flex-direction: column;
    gap: .35rem
}

/* Form controls use the active theme's Bootstrap form-control/form-select styles. */
.fgc-controls label {
    min-width: 0;
    max-width: 100%
}

.fgc button:where(:not(.btn)) {
    font: inherit;
    max-width: 100%;
    padding: .6rem
}

.fgc button {
    cursor: pointer
}

.fgc a:where(:not(.btn)) {
    text-decoration: underline
}

.fgc-table-wrap {
    overflow-x: auto;
    max-width: 100%;
    margin: 1rem 0
}

.fgc table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem
}

.fgc caption {
    text-align: left;
    padding: .75rem 0
}

.fgc th,
.fgc td {
    padding: .65rem;
    border-bottom: 1px solid #ccc;
    text-align: left;
    vertical-align: top
}

.fgc th {
    white-space: nowrap
}

.fgc .fgc-naziv {
    min-width: 12rem;
    font-weight: 600
}

.fgc .fgc-maloprodajna_cijena_eur {
    font-weight: 700;
    text-align: right;
}

.fgc-archive ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    list-style: none;
    padding: 0;
    max-height: 16rem;
    overflow: auto
}

.fgc [aria-current=date] {
    font-weight: 700
}

.fgc summary {
    cursor: pointer
}

.fgc :focus-visible:not(.form-control):not(.form-select):not(.btn) {
    outline: 3px solid #1264a3;
    outline-offset: 3px
}

.fgc-upload-shell {
    max-width: 42rem;
    margin: 3rem auto;
    padding: 1rem;
    font-family: system-ui, sans-serif
}

.fgc-upload-shell input:not([type=checkbox]) {
    display: block;
    width: 100%
}

.fgc-upload-shell form {
    display: grid;
    gap: 1rem
}

.fgc-upload-shell button {
    justify-self: start
}

@media(max-width:600px) {
    .fgc-controls {
        display: grid;
        grid-template-columns: 1fr
    }

    .fgc-controls label {
        width: 100%
    }

    .fgc th,
    .fgc td {
        padding: .5rem
    }

    .fgc-upload-shell {
        margin: 1rem auto
    }
}

.fgc-calendar {
    width: 100%;
    max-width: 32rem;
}

.fgc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.fgc-actions .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Compact overview; full variant fields are available in the details dialog. */
.fgc .fgc-compact-table {
    table-layout: fixed
}

.fgc .fgc-compact-table th {
    white-space: normal;
    overflow-wrap: anywhere
}

.fgc-compact-table th:first-child {
    width: 34%
}

.fgc-compact-table td {
    overflow-wrap: anywhere
}

.fgc-product strong {
    display: block
}

.fgc small {
    display: block;
    font-size: 80%;
    font-weight: 400;
    margin: .3rem 0;
    color: inherit;
    opacity: .75
}

.fgc-clickable {
    cursor: pointer
}

.fgc-clickable:hover,
.fgc-clickable:focus-within {
    background: rgba(0, 0, 0, .045)
}

.fgc [hidden] {
    display: none !important
}

.fgc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

.fgc-dialog {
    box-sizing: border-box;
    width: min(42rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    max-height: 85vh;
    max-height: 85dvh;
    overflow: auto;
    overscroll-behavior: contain;
    margin: auto;
    padding: 1.5rem;
    border: 1px solid #ccc;
    border-radius: .65rem;
    background: #fff;
    color: #222;
    box-shadow: 0 1rem 4rem #0004;
    text-align: left
}

.fgc-dialog::backdrop {
    background: rgba(0, 0, 0, .55)
}

.fgc .fgc-dialog-close {
    display: block;
    margin: 0;
    border: none;
    border-radius: .3rem;
    background: #fff;
    color: #999;
    padding: .3rem .1rem .3rem;
    font-size: 2rem;
    line-height: 2rem;
}

.fgc-detail-content h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -.02rem;
    overflow-wrap: anywhere;
    color: #00A0DF;
}

.fgc-detail-content dl {
    margin: 1rem 0 0
}

.fgc-detail-content dl>div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid #ddd
}

.fgc-detail-content dl>div:last-child {
    border-bottom: none
}

.fgc-detail-content dt {
    font-weight: 600
}

.fgc-detail-content dd {
    margin: 0;
    overflow-wrap: anywhere
}

.fgc-modal-open {
    overflow: hidden
}

@media(max-width:760px) {

    .fgc .fgc-compact-table,
    .fgc-compact-table tbody {
        display: block;
        width: 100%
    }

    .fgc-compact-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0)
    }

    .fgc-compact-table tr {
        display: block;
        margin-bottom: 1rem;
        padding: .75rem;
        border: 1px solid #ccc;
        border-radius: .4rem
    }

    .fgc .fgc-compact-table td {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: .75rem;
        padding: .45rem 0;
        border: 0
    }

    .fgc-compact-table td::before {
        content: attr(data-label);
        font-weight: 600
    }

    .fgc .fgc-compact-table .fgc-product {
        display: block;
        margin-bottom: .5rem
    }

    .fgc-compact-table .fgc-product::before {
        display: none
    }

    .fgc-dialog {
        padding: 1rem
    }

    .fgc-detail-content dl>div {
        grid-template-columns: 1fr;
        gap: .15rem
    }
}

@media(max-width:760px) {
    .fgc-compact-table caption {
        display: block;
        width: 100%;
        max-width: 100%
    }
}

.fgc-reference-price>span {
    display: block
}
.fgc-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fgc-dialog-header .fgc-dialog-close {
    flex-shrink: 0;
}

/* The expanded archive sits below the action row. */
.fgc-archive-content {
    min-width: 0;
}
