/* Video cue overlay — opt-in; code-panel premium hattı ile hizalı */

.ra-videoCue {
    position: relative;
    margin: 28px 0 32px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(148deg, rgba(74, 222, 128, 0.06) 0%, transparent 38%),
        linear-gradient(328deg, rgba(167, 139, 250, 0.05) 0%, transparent 44%),
        linear-gradient(180deg, rgba(10, 10, 16, 0.98) 0%, rgba(4, 4, 10, 0.99) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.ra-videoCue::before {
    display: none;
}

.ra-videoCue__toolbar::before,
.ra-videoCue__player::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
            rgba(74, 222, 128, 0.75) 0%,
            rgba(34, 211, 238, 0.55) 45%,
            rgba(167, 139, 250, 0.35) 100%);
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
}

.ra-videoCue::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.11) 0%,
            rgba(255, 255, 255, 0.03) 42%,
            transparent 72%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.ra-videoCue__toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px 16px;
    flex-wrap: wrap;
    padding: 12px 18px 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0.28) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ra-videoCue__dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ra-videoCue__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.ra-videoCue__dot--red {
    background: #f87171;
}

.ra-videoCue__dot--amber {
    background: #fbbf24;
}

.ra-videoCue__dot--green {
    background: #4ade80;
}

.ra-videoCue__toolbarMain {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.ra-videoCue__statusDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
    flex-shrink: 0;
    animation: ra-videoCue-pulse 2.4s ease-in-out infinite;
}

@keyframes ra-videoCue-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.72;
        transform: scale(0.92);
    }
}

.ra-videoCue__label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ra-videoCue__badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.ra-videoCue__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.ra-videoCue__badge--mute {
    color: rgba(253, 224, 71, 0.92);
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.24);
}

.ra-videoCue__badge--cue {
    color: rgba(196, 181, 253, 0.92);
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.28);
}

.ra-videoCue__player {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 14px 14px 12px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34, 211, 238, 0.06) 0%, transparent 55%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.82) 100%);
}

.ra-videoCue__frame {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.015) 0,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 24px),
        repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.015) 0,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 24px),
        radial-gradient(ellipse at center, rgba(18, 18, 28, 0.95) 0%, rgba(6, 6, 10, 1) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 16px 40px rgba(0, 0, 0, 0.45);
}

.ra-videoCue__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.12) 0%,
            transparent 18%,
            transparent 82%,
            rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.ra-videoCue__video {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #050508;
}

.ra-videoCue__card {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    width: min(100% - 28px, 360px);
    max-height: calc(100% - 28px);
    overflow: hidden;
    padding: 10px 11px 9px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 12, 18, 0.9);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition:
        opacity 0.24s ease,
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.ra-videoCue__card.is-placed {
    right: auto;
    bottom: auto;
}

.ra-videoCue__card.is-dragging {
    cursor: grabbing;
    transition: none;
    box-shadow:
        0 28px 56px rgba(0, 0, 0, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.ra-videoCue__card.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ra-videoCue__card.is-dismissed {
    opacity: 0;
    pointer-events: none;
}

.ra-videoCue__cardHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.ra-videoCue__card.is-dragging .ra-videoCue__cardHead {
    cursor: grabbing;
}

.ra-videoCue__cardActions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ra-videoCue__fs,
.ra-videoCue__frameFs {
    appearance: none;
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    background:
        linear-gradient(168deg, rgba(24, 24, 32, 0.96) 0%, rgba(10, 10, 16, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -2px 0 rgba(0, 0, 0, 0.38),
        0 2px 8px rgba(0, 0, 0, 0.32);
    color: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.ra-videoCue__fs::before,
.ra-videoCue__frameFs::before {
    content: "";
    width: 14px;
    height: 14px;
    background: center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b8c0cc' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6V3h3M13 6V3h-3M3 10v3h3M13 10v3h-3'/%3E%3C/svg%3E");
    opacity: 0.88;
    transition: opacity 0.18s ease;
}

.ra-videoCue__fs.is-active::before,
.ra-videoCue__frameFs.is-active::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2386efac' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3H3v3M10 3h3v3M6 13H3v-3M10 13h3v-3'/%3E%3C/svg%3E");
    opacity: 1;
}

.ra-videoCue__fs:hover,
.ra-videoCue__frameFs:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(168deg, rgba(30, 30, 40, 0.98) 0%, rgba(14, 14, 22, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -2px 0 rgba(0, 0, 0, 0.42),
        0 4px 12px rgba(0, 0, 0, 0.38);
    transform: translateY(-1px);
}

.ra-videoCue__fs:hover::before,
.ra-videoCue__frameFs:hover::before {
    opacity: 1;
}

.ra-videoCue__fs:active,
.ra-videoCue__frameFs:active {
    transform: translateY(0);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.45),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.ra-videoCue__fs.is-active,
.ra-videoCue__frameFs.is-active {
    border-color: rgba(74, 222, 128, 0.26);
    background:
        linear-gradient(168deg, rgba(14, 22, 18, 0.98) 0%, rgba(8, 12, 10, 1) 100%);
    box-shadow:
        inset 0 1px 0 rgba(134, 239, 172, 0.08),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(74, 222, 128, 0.06);
}

.ra-videoCue__fs:focus-visible,
.ra-videoCue__frameFs:focus-visible,
.ra-videoCue__close:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.65);
    outline-offset: 2px;
}

.ra-videoCue__frameFs {
    position: absolute;
    right: 10px;
    /* Native video kontrol çubuğunun (⋮ menü) üstünde sabit */
    bottom: 80px;
    z-index: 4;
    opacity: 0.78;
    pointer-events: auto;
    transition:
        opacity 0.18s ease,
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.ra-videoCue__frame:hover .ra-videoCue__frameFs,
.ra-videoCue__frame:focus-within .ra-videoCue__frameFs,
.ra-videoCue__frame.is-fullscreen .ra-videoCue__frameFs {
    opacity: 1;
}

/* Tam ekran giriş/çıkışta aynı köşe — offset değişmez */
.ra-videoCue__frame:fullscreen .ra-videoCue__frameFs,
.ra-videoCue__frame:-webkit-full-screen .ra-videoCue__frameFs {
    right: 10px;
    bottom: 80px;
}

.ra-videoCue__time {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(134, 239, 172, 0.96);
    background: rgba(74, 222, 128, 0.11);
    border: 1px solid rgba(74, 222, 128, 0.26);
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.08);
}

.ra-videoCue__close {
    appearance: none;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.ra-videoCue__close:hover {
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
}

/* ra-prose h3 margin (34px) kart içinde devre dışı */
.ra-videoCue__card .ra-videoCue__title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    margin: 0 0 4px;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
}

.ra-videoCue__card .ra-videoCue__title::before {
    font-size: 0.72em;
}

.ra-videoCue__body {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* ~3 cümle görünür — taşan içerik scroll */
    height: 180px;
    max-height: 180px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 1px;
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 139, 250, 0.38) transparent;
}

.ra-videoCue__body::-webkit-scrollbar {
    width: 4px;
}

.ra-videoCue__body::-webkit-scrollbar-track {
    background: transparent;
}

.ra-videoCue__body::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(167, 139, 250, 0.38);
}

.ra-videoCue__body::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 181, 253, 0.52);
}

/* ra-prose › ve sol çizgi burada devre dışı — sade premium satır */
.ra-videoCue__body p {
    position: relative;
    margin: 0;
    padding: 6px 9px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    font-size: 12px;
    line-height: 1.52;
    color: rgba(255, 255, 255, 0.82);
    flex-shrink: 0;
}

.ra-prose .ra-videoCue__body p::before {
    content: none !important;
    display: none !important;
}

.ra-videoCue__frame:fullscreen,
.ra-videoCue__frame:-webkit-full-screen {
    aspect-ratio: unset;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
    background: #000;
}

.ra-videoCue__frame:fullscreen .ra-videoCue__video,
.ra-videoCue__frame:-webkit-full-screen .ra-videoCue__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ra-videoCue__frame:fullscreen .ra-videoCue__card,
.ra-videoCue__frame:-webkit-full-screen .ra-videoCue__card {
    max-height: min(46vh, calc(100% - 28px));
}

.ra-videoCue__frame:fullscreen .ra-videoCue__body,
.ra-videoCue__frame:-webkit-full-screen .ra-videoCue__body {
    height: 180px;
    max-height: 180px;
}

.ra-videoCue__foot {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 11px 20px 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.48);
    background: rgba(0, 0, 0, 0.22);
}

/* ra-prose p › işareti ve sol indent — foot devre dışı */
.ra-prose .ra-videoCue__foot {
    margin: 0;
    padding: 11px 20px 13px;
}

.ra-prose .ra-videoCue__foot::before {
    content: none !important;
    display: none !important;
}

.ra-videoCue__foot strong {
    color: rgba(255, 255, 255, 0.76);
    font-weight: 600;
}

.ra-videoCue__foot code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(196, 181, 253, 0.88);
}

.ra-videoCue.is-error .ra-videoCue__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 24px;
}

.ra-videoCue__error {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(251, 191, 36, 0.88);
    text-align: center;
}

@media (max-width: 640px) {
    .ra-videoCue__toolbar {
        padding-left: 18px;
    }

    .ra-videoCue__dots {
        display: none;
    }

    .ra-videoCue__badges {
        margin-left: 0;
        width: 100%;
    }

    .ra-videoCue__player {
        padding: 10px;
    }

    .ra-videoCue__card:not(.is-placed) {
        top: auto;
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-height: 42%;
    }

    .ra-videoCue__card.is-placed {
        width: min(calc(100% - 20px), 400px);
    }

    .ra-videoCue__body {
        height: 168px;
        max-height: 168px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ra-videoCue__statusDot {
        animation: none;
    }

    .ra-videoCue__card {
        transition: opacity 0.15s ease;
        transform: none;
    }

    .ra-videoCue__card.is-visible {
        transform: none;
    }
}