/* Runaway Complaint Button v2 */

/* Wrap — just a placeholder so the page flow reserves space for the button */
.rcb-wrap {
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    /* No overflow hidden — button escapes to fixed position */
}

/* The button itself */
.rcb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #c0392b;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(192, 57, 43, .4);
    white-space: nowrap;
    pointer-events: auto;
    /* Smooth-ish movement */
    transition: background .15s, box-shadow .15s, transform .08s ease-out;
    user-select: none;
}

.rcb-btn.rcb-fleeing {
    background: #922b21;
    box-shadow: 0 6px 20px rgba(192, 57, 43, .6);
    transform: scale(1.04);
}

.rcb-icon {
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.rcb-label {
    pointer-events: none;
}

/* ── Speech bubble ───────────────────────────────────────────────────────── */

.rcb-bubble {
    position: fixed;
    z-index: 100000;
    max-width: 220px;
    padding: 10px 14px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-style: italic;
    font-family: inherit;
    line-height: 1.4;
    border: 1.5px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,.12);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    white-space: normal;
    word-break: break-word;
}

/* Tail pointing LEFT (bubble is to the right of the button) */
.rcb-bubble.rcb-bubble-right::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #ddd;
}
.rcb-bubble.rcb-bubble-right::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #fff;
}

/* Tail pointing RIGHT (bubble is to the left of the button) */
.rcb-bubble.rcb-bubble-left::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #ddd;
}
.rcb-bubble.rcb-bubble-left::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #fff;
}

/* Hidden state */
.rcb-bubble.rcb-bubble-hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* ── Caught modal ────────────────────────────────────────────────────────── */

.rcb-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: rcb-fadein .2s ease;
}

.rcb-modal.rcb-modal-hidden {
    display: none;
}

@keyframes rcb-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.rcb-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: rcb-popin .25s cubic-bezier(.34,1.56,.64,1);
}

@keyframes rcb-popin {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.rcb-modal-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 14px;
}

.rcb-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    line-height: 1.3;
}

.rcb-modal-body {
    font-size: 15px;
    color: #555;
    line-height: 1.65;
    margin: 0 0 24px;
}

.rcb-modal-close {
    display: inline-block;
    padding: 10px 22px;
    background: #c0392b;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.rcb-modal-close:hover {
    background: #a93226;
}
