/* ============================================================
   Brand HTML Widget — Frontend CSS v7
   Mobile-first, responsive, smooth collapse animation
   ============================================================ */

.bhw-outer {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 10px 0;
}

.bhw-content {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.bhw-content * {
    max-width: 100%;
    box-sizing: border-box;
}

.bhw-content img {
    height: auto;
    display: block;
}

.bhw-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bhw-content iframe,
.bhw-content video,
.bhw-content embed,
.bhw-content object {
    max-width: 100%;
    height: auto;
}

.bhw-content--full {
    /* Bez ograničenja */
}

.bhw-collapse {
    position: relative;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.bhw-collapse.is-collapsed {
    max-height: 260px;
}

@media (min-width: 769px) {
    .bhw-collapse.is-collapsed {
        max-height: 400px;
    }
}

.bhw-collapse.is-expanded {
    max-height: 9999px;
}

/* ── Fade — 20px, jedva primetno ── */
.bhw-fade {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

.bhw-collapse.is-collapsed .bhw-fade {
    display: block;
}

/* ── Bounce animacija strelice ── */
@keyframes bhw-bounce-down {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(3px); }
}

@keyframes bhw-bounce-up {
    0%, 100% { transform: rotate(180deg) translateY(0); }
    50%       { transform: rotate(180deg) translateY(3px); }
}

/* ── Dugme — svetlo siva pozadina, bez glow ── */
.bhw-toggle {
    display: none;
    width: 100% !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 !important;
    padding: 11px 16px !important;
    background: #f9f9f9 !important;
    border: none !important;
    border-top: 1px solid #ebebeb !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #555 !important;
    text-align: center !important;
    letter-spacing: 0.01em !important;
    line-height: 1 !important;
    font-family: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.bhw-toggle:hover {
    background: #f2f2f2 !important;
    color: #333 !important;
    box-shadow: none !important;
    outline: none !important;
}

.bhw-toggle:focus,
.bhw-toggle:focus-visible,
.bhw-toggle:active {
    background: #f9f9f9 !important;
    color: #555 !important;
    box-shadow: none !important;
    outline: none !important;
    border-top: 1px solid #ebebeb !important;
}

/* ── Strelica — siva, bounce ── */
.bhw-toggle-arrow {
    display: inline-flex !important;
    align-items: center !important;
    color: #bbb !important;
    flex-shrink: 0 !important;
    animation: bhw-bounce-down 1.8s ease-in-out infinite !important;
}

.bhw-toggle.is-expanded .bhw-toggle-arrow {
    animation: bhw-bounce-up 1.8s ease-in-out infinite !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .bhw-outer { padding: 10px 0; }
    .bhw-toggle { font-size: 13px !important; padding: 11px 16px !important; }
    .bhw-content table { font-size: 13px; }
}

@media (max-width: 400px) {
    .bhw-toggle { font-size: 12px !important; padding: 10px 12px !important; }
}
