.opp-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--opp-height, 30px);
    background-color: var(--opp-bg, #333333);
    color: var(--opp-text, #ffffff);
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1;
    overflow: visible;
    box-sizing: border-box;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
}

.opp-bar a {
    color: inherit;
    text-decoration: underline;
}

.opp-bar a:hover {
    opacity: 0.85;
}

.opp-bar img {
    max-height: 100%;
    width: auto;
    vertical-align: middle;
}

.opp-bar button,
.opp-bar .opp-btn {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}

.opp-bar button:hover,
.opp-bar .opp-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.opp-bar strong {
    font-weight: 700;
}

/* --- Share button --- */

.opp-share-wrap {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.opp-share-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #303030;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    animation: opp-label-slide 1.5s ease-out infinite;
}

.opp-share-arrow {
    display: inline-block;
    font-size: 15px;
}

@keyframes opp-label-slide {
    0%   { transform: translateX(0); }
    40%  { transform: translateX(-10px); }
    60%  { transform: translateX(0); }
    100% { transform: translateX(0); }
}

.opp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    border-radius: 0;
    padding: 0 !important;
    width: 22px;
    height: 22px;
    cursor: pointer;
    color: inherit;
    transition: background 0.2s;
    flex-shrink: 0;
    box-sizing: border-box;
}

.opp-share-btn:hover {
    background: none !important;
    opacity: 0.7;
}

.opp-share-btn svg {
    display: block;
}

/* --- Copy tag --- */

.opp-copy-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.opp-copy-btn {
    --_c: var(--opp-copy-color, currentColor);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--_c) 15%, transparent) !important;
    border: 1px solid var(--_c) !important;
    border-radius: 4px;
    padding: 3px !important;
    margin: 0 0 0 8px;
    cursor: pointer;
    color: var(--_c);
    transition: background 0.2s, opacity 0.2s;
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.opp-copy-btn:hover {
    background: color-mix(in srgb, var(--_c) 30%, transparent) !important;
}

/* Ikonki SVG */
.opp-copy-icon {
    display: block;
    transition: opacity 0.25s, transform 0.25s;
}

.opp-copy-icon--copy {
    opacity: 1;
    transform: scale(1);
}

.opp-copy-icon--check {
    position: absolute;
    opacity: 0;
    transform: scale(0.5);
}

/* Stan po skopiowaniu */
.opp-copy-btn--copied {
    --_c: #4caf50 !important;
    background: color-mix(in srgb, #4caf50 20%, transparent) !important;
    border-color: #4caf50 !important;
    color: #4caf50;
}

.opp-copy-btn--copied .opp-copy-icon--copy {
    opacity: 0;
    transform: scale(0.5);
}

.opp-copy-btn--copied .opp-copy-icon--check {
    opacity: 1;
    transform: scale(1);
    color: #4caf50;
    animation: opp-check-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes opp-check-pop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Modal kopiowania --- */

.opp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    will-change: opacity;
}

.opp-modal-content {
    position: relative;
    max-width: 420px;
    width: 90%;
    padding: 32px 28px 24px;
    text-align: center;
    color: #fff;
    background: rgba(11, 33, 64, 0.95);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: opp-modal-in 0.3s ease;
}

@keyframes opp-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.opp-modal-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.opp-modal-text strong {
    color: #fff;
    font-weight: 700;
}

.opp-modal-ok-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.opp-modal-ok-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.opp-modal-ok-btn:active {
    transform: scale(0.97);
}

/* --- Toast --- */

.opp-toast {
    position: fixed;
    bottom: calc(var(--opp-height, 30px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 33, 64, 0.92);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    z-index: 100002;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    animation: opp-toast-in 0.3s ease;
}

.opp-toast--out {
    animation: opp-toast-out 0.4s ease forwards;
}

@keyframes opp-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes opp-toast-out {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .opp-bar {
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 16px !important;
        gap: 4px;
        white-space: normal !important;
        text-align: center;
        line-height: 1.6;
        font-size: 12px;
    }

    .opp-bar > span {
        display: block;
        width: 100%;
        text-align: center;
    }

    .opp-share-wrap {
        position: static;
        transform: none;
        margin-top: 2px;
    }

    .opp-modal-content {
        width: 92%;
        padding: 28px 20px 20px;
    }
}
