/* ==========================================================================
   Fixes for TBR-8782 … TBR-8786.

   Loaded after responsive.css, so desktop-only rules are wrapped in a
   min-width query to stay out of the mobile layer's way.

   Site palette, taken from style.css:
     menu blue   #15375c / #184367
     accent gold #F4BB16
   ========================================================================== */

/* --------------------------------------------------------------------------
   TBR-8782 — the Login item wrapped onto a second row.

   Nine items need 1121px of a 1090px bar. The items are laid out with
   float:left, so the ninth dropped below the bar and onto the slider. A
   single flex row with slightly tighter padding fits them with room to
   spare, and a tenth item would squeeze rather than wrap.
   -------------------------------------------------------------------------- */
@media (min-width: 1110px) {

    /* The blue strip is part of the header background image, and the theme
       never gave the menu a height of its own — it came out of the items'
       line-height and padding, which added up to more than the strip. Pin it
       to the strip's height so nothing hangs below it. */
    .meni {
        height: 40px;
    }

    .meni ul {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: space-between;
        height: 40px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* The theme's line-height and padding added up to more than the strip, and
       the 2px top margin pushed that down further — so the labels sat low and
       the hover/active background spilled onto the slider below. Letting each
       item fill the bar and centring the label keeps both inside it.
       TBR-8803: the bar is 40px rather than 60px, which lifts the search
       band below it into place. */
    .meni ul li {
        float: none !important;
        flex: 0 1 auto;
        display: flex;
        position: relative;
        height: 40px;
        margin-top: 0 !important;
        line-height: normal;
    }

    /* The divider is the item's own border-right, so making the item fill the
       bar turned a short tick into a full-height rule. Draw it instead as a
       centred line of the height it used to have. */
    .meni ul li {
        border-right: none !important;
    }

    .meni ul li:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        width: 1px;
        height: 20px;
        margin-top: -10px;
        background: #184367;
    }

    .meni ul li a {
        display: flex;
        align-items: center;
        height: 40px;
        padding: 0 17px;
        line-height: 1.2;
        white-space: nowrap;
        box-sizing: border-box;
    }
}

/* --------------------------------------------------------------------------
   TBR-8783 — sidebar poll.

   The missing stylesheet is restored by mu-plugins/02-wp-polls-assets.php;
   what is left here is the presentation the client asked for: the answers
   centred as a row, and a button that looks like part of the site instead of
   a browser default.
   -------------------------------------------------------------------------- */
.wp-polls .wp-polls-ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 10px 0 14px 0;
    padding: 0;
    list-style: none;
}

.wp-polls .wp-polls-ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wp-polls .wp-polls-ul li input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.wp-polls .wp-polls-ul li label {
    margin: 0;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

/* The results view reuses the same list, where the rows must stay stacked */
.wp-polls .wp-polls-ans .wp-polls-ul li:has(.wp-polls-bar) {
    display: block;
    width: 100%;
    text-align: left;
}

.wp-polls .wp-polls-ans:has(.wp-polls-bar) .wp-polls-ul {
    display: block;
}

/* Shared button look, also used by the Gravity Forms buttons below */
.wp-polls input[name="vote"],
.wp-polls .Buttons,
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"],
.gform_wrapper button[type="submit"] {
    display: inline-block;
    background: #15375c;
    color: #fff;
    border: 1px solid #15375c;
    border-radius: 3px;
    padding: 9px 22px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.wp-polls input[name="vote"]:hover,
.wp-polls .Buttons:hover,
.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover,
.gform_wrapper button[type="submit"]:hover {
    background: #184367;
    color: #F4BB16;
}

.wp-polls input[name="vote"]:focus-visible,
.gform_wrapper .gform_button:focus-visible,
.gform_wrapper input[type="submit"]:focus-visible {
    outline: 2px solid #F4BB16;
    outline-offset: 2px;
}

/* "View Results" / "Vote" links under the poll */
.wp-polls p a {
    font-size: 12px;
    color: #15375c;
    text-decoration: underline;
}

.wp-polls p a:hover {
    color: #184367;
}

/* --------------------------------------------------------------------------
   TBR-8784 — the "Pišite nam" form in the footer.

   The theme styles `li` with list-style:square, which Gravity Forms' field
   wrappers inherit, so every field had a black square beside it.
   -------------------------------------------------------------------------- */
.gform_wrapper ul.gform_fields,
.gform_wrapper .gform_fields {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gform_wrapper ul.gform_fields > li,
.gform_wrapper .gform_fields > .gfield,
.gform_wrapper li.gfield {
    list-style: none !important;
    list-style-type: none !important;
    margin-left: 0;
    padding-left: 0;
    background-image: none;
}

.gform_wrapper ul.gform_fields > li::marker,
.gform_wrapper li.gfield::marker {
    content: none;
}

.gform_wrapper .gform_footer {
    padding-left: 0;
    margin-left: 0;
}

/* Fields themselves: readable boxes rather than bare browser defaults */
.gform_wrapper .gfield input[type="text"],
.gform_wrapper .gfield input[type="email"],
.gform_wrapper .gfield input[type="tel"],
.gform_wrapper .gfield input[type="number"],
.gform_wrapper .gfield select,
.gform_wrapper .gfield textarea {
    border: 1px solid #c9d2db;
    border-radius: 3px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.gform_wrapper .gfield input[type="text"]:focus,
.gform_wrapper .gfield input[type="email"]:focus,
.gform_wrapper .gfield textarea:focus {
    border-color: #15375c;
    outline: none;
}

/* --------------------------------------------------------------------------
   TBR-8785 — galleries restored by mu-plugins/01-widgetkit-shortcode.php
   -------------------------------------------------------------------------- */
.sossnbs-gal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin: 0 0 28px 0;
}

.sossnbs-gal__item {
    margin: 0;
}

.sossnbs-gal__item a {
    display: block;
    overflow: hidden;
    border-radius: 3px;
    background: #eef1f4;
}

.sossnbs-gal__item img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform .25s ease;
}

.sossnbs-gal__item a:hover img {
    transform: scale(1.04);
}

.sossnbs-gal__item figcaption {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.35;
    color: #55606b;
}

@media (max-width: 767px) {

    .sossnbs-gal {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
        gap: 8px;
    }

    .sossnbs-gal__item img {
        height: 110px;
    }
}

/* The restored accordion sits in a narrow sidebar */
.sossnbs-acc .toggler {
    cursor: pointer;
}

.sossnbs-acc .wk-content img {
    max-width: 100%;
    height: auto;
}

.sossnbs-acc .wk-content table {
    width: 100% !important;
    max-width: 100%;
}
