:root {
    --hol-aa-border: #d9dde2;
    --hol-aa-text: #252b32;
    --hol-aa-icon: #68727d;
    --hol-aa-bg: #ffffff;
    --hol-aa-hover: #f7f8f9;
    --hol-aa-active: #eef2f5;
}

.hol-aa {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-style: normal;
    font-variant: normal;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 18px;
    padding: 6px 0;
    box-sizing: border-box;
    background: transparent;
    color: var(--hol-aa-text);
}

.hol-aa button {
    -webkit-appearance: none;
    appearance: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.hol-aa__left,
.hol-aa__right {
    display: flex;
    align-items: center;
}

.hol-aa__right {
    gap: 7px;
    margin-left: auto;
}

.hol-aa__listen {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.hol-aa__round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid var(--hol-aa-border);
    border-radius: 999px;
    background: var(--hol-aa-bg);
    box-sizing: border-box;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.hol-aa__round svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #111;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hol-aa__listen-text {
    font-size: 12.5px;
    line-height: 1.2;
    font-weight: 400;
    color: var(--hol-aa-text);
    white-space: nowrap;
}

.hol-aa__icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--hol-aa-border);
    border-radius: 999px;
    background: var(--hol-aa-bg);
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
    vertical-align: middle;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.hol-aa__icon {
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--hol-aa-icon);
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill .18s ease, stroke .18s ease;
}

.hol-aa__icon--bookmark {
    width: 17px;
    height: 18px;
}

.hol-aa__icon--share {
    width: 18px;
    height: 18px;
    transform: translateY(-0.25px);
}

.hol-aa__listen:hover .hol-aa__round,
.hol-aa__icon-button:hover,
.hol-aa__listen:focus-visible .hol-aa__round,
.hol-aa__icon-button:focus-visible {
    background: var(--hol-aa-hover);
    border-color: #cbd1d7;
}

.hol-aa__listen:active .hol-aa__round,
.hol-aa__icon-button:active {
    transform: scale(.97);
}

.hol-aa__listen:focus-visible,
.hol-aa__icon-button:focus-visible,
.hol-aa__dialog button:focus-visible {
    outline: 2px solid rgba(40, 100, 180, .28);
    outline-offset: 2px;
}

.hol-aa__icon-button.is-saved .hol-aa__icon--bookmark {
    fill: var(--hol-aa-icon);
}

.hol-aa__listen.is-speaking .hol-aa__round,
.hol-aa__listen.is-paused .hol-aa__round,
.hol-aa__listen.is-starting .hol-aa__round {
    background: var(--hol-aa-active);
}

.hol-aa__toast {
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 10001;
    max-width: min(320px, 90vw);
    padding: 7px 9px;
    border: 1px solid var(--hol-aa-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    color: #3b434c;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    pointer-events: none;
}

.hol-aa__toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hol-aa__payload {
    display: none !important;
}

.hol-aa__dialog[hidden],
.hol-aa__dialog[aria-hidden="true"] {
    display: none !important;
}

.hol-aa__dialog {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}

.hol-aa__dialog-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(20, 24, 28, .30);
    cursor: default;
}

.hol-aa__dialog-card {
    position: relative;
    z-index: 1;
    width: min(390px, calc(100vw - 36px));
    padding: 16px;
    border: 1px solid #e0e3e7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
    box-sizing: border-box;
}

.hol-aa__dialog-title {
    margin: 0 0 12px;
    color: #252b32;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}

.hol-aa__dialog-actions {
    display: grid;
    gap: 8px;
}

.hol-aa__dialog-option {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e1e4e7;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.hol-aa__dialog-option:hover,
.hol-aa__dialog-option:active {
    background: #f7f8f9;
}

.hol-aa__dialog-option strong,
.hol-aa__dialog-option span {
    display: block;
}

.hol-aa__dialog-option strong {
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 600;
}

.hol-aa__dialog-option span {
    color: #6f7780;
    font-size: 11.5px;
    line-height: 1.35;
}

.hol-aa__dialog-cancel {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #6b737c;
    font-size: 12px;
    cursor: pointer;
}

/* Shortcode [hol_zapamceno] */
.hol-aa-saved {
    margin: 18px 0;
}

.hol-aa-saved__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hol-aa-saved__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eceff2;
}

.hol-aa-saved__link {
    color: inherit;
    text-decoration: none;
}

.hol-aa-saved__link:hover {
    text-decoration: underline;
}

.hol-aa-saved__remove {
    border: 1px solid var(--hol-aa-border);
    border-radius: 999px;
    background: #fff;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}

.hol-aa-saved__empty {
    color: #747d87;
}

@media (max-width: 640px) {
    .hol-aa {
        gap: 8px;
        margin-bottom: 15px;
        padding: 5px 0;
    }

    .hol-aa__listen {
        gap: 6px;
    }

    .hol-aa__round {
        width: 32px;
        height: 32px;
    }

    .hol-aa__round svg {
        width: 17px;
        height: 17px;
    }

    .hol-aa__listen-text {
        font-size: 12px;
    }

    .hol-aa__right {
        gap: 6px;
    }

    .hol-aa__icon-button {
        flex-basis: 54px;
        width: 54px;
        min-width: 54px;
        max-width: 54px;
        height: 34px;
        min-height: 34px;
    }

    .hol-aa__icon {
        width: 17px;
        height: 17px;
    }

    .hol-aa__icon--bookmark {
        width: 16px;
        height: 17px;
    }
}

@media (max-width: 390px) {
    .hol-aa__listen-text {
        font-size: 11.5px;
    }

    .hol-aa__icon-button {
        flex-basis: 52px;
        width: 52px;
        min-width: 52px;
        max-width: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hol-aa *,
    .hol-aa *::before,
    .hol-aa *::after {
        transition: none !important;
    }
}


/* 1.2.3: desktop share fallback. Na mobilnom se i dalje koristi sistemski Share meni. */
.hol-aa__dialog-card--share {
    width: min(410px, calc(100vw - 36px));
}

@media (min-width: 700px) {
    .hol-aa__share-actions {
        grid-template-columns: 1fr 1fr;
    }

    .hol-aa__share-option {
        min-height: 74px;
    }
}
