/* V27.7.6 - inline header-only BETA control.
   The BETA button is now part of the normal header flow instead of a fixed
   overlay, so it cannot flash at the bottom or cover content while pages load. */

[data-rcm-drag-panel="1"] {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    z-index: 140;
}

[data-rcm-drag-panel="1"] .rcm-beta-tab {
    min-width: 80px;
    height: 34px;
    min-height: 34px;
    padding: 4px 10px;
    border: 2px solid #6b5200;
    border-radius: 9px;
    background: #ffd400;
    color: #171400;
    font: inherit;
    font-size: 11px;
    line-height: 1;
    font-weight: 1000;
    letter-spacing: 0.4px;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
}

[data-rcm-drag-panel="1"] .rcm-beta-tab-chevron {
    display: inline-block;
    margin-left: 5px;
    font-size: 12px;
    transform-origin: center;
    transition: transform 150ms ease-out;
}

[data-rcm-drag-panel="1"].is-expanded .rcm-beta-tab-chevron {
    transform: rotate(180deg);
}

[data-rcm-drag-panel="1"] .rcm-beta-panel-body {
    position: absolute;
    z-index: 145;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: min(220px, calc(100vw - 24px));
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: #ffd400;
    color: #2a2400;
    border: 0 solid #3a3000;
    border-radius: 10px;
    opacity: 0;
    transition: max-height 170ms ease-out, opacity 120ms ease-out, transform 170ms ease-out, padding 170ms ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1.22;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

[data-rcm-drag-panel="1"].is-expanded .rcm-beta-panel-body {
    pointer-events: auto;
    max-height: 190px;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    padding: 10px;
    border-width: 2px;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-copy {
    width: 100%;
    text-align: center;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-copy strong {
    color: #111000;
    font-weight: 1000;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-button {
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid #171400;
    border-radius: 7px;
    background: #171400;
    color: #ffd400;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 1000;
    text-align: center;
    cursor: pointer;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-button:hover,
[data-rcm-drag-panel="1"] .rcm-drag-beta-button:active {
    background: #302900;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-update-button {
    border-color: #60a5fa;
    background: #1d4ed8;
    color: #ffffff;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-update-button:hover,
[data-rcm-drag-panel="1"] .rcm-drag-beta-update-button:active {
    background: #2563eb;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-button:disabled {
    opacity: .65;
    cursor: wait;
}

.rcm-drag-panel-clearance {
    height: 0 !important;
    min-height: 0 !important;
    flex: 0 0 0 !important;
}

@media (max-width: 600px) {
    [data-rcm-drag-panel="1"] .rcm-beta-tab {
        min-width: 74px;
        height: 32px;
        min-height: 32px;
        padding: 3px 9px;
        font-size: 11px;
        -webkit-tap-highlight-color: rgba(23, 20, 0, 0.18);
    }

    [data-rcm-drag-panel="1"] .rcm-beta-panel-body {
        width: min(210px, calc(100vw - 20px));
        font-size: 11px;
    }

    [data-rcm-drag-panel="1"] .rcm-drag-beta-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

[data-rcm-drag-panel="1"] .rcm-drag-beta-button {
        min-height: 28px;
        font-size: 11px;
    }
}
