/* Video dei membri per FluentCommunity — Bunny Stream */

.fcbv-player {
    margin: 12px 0;
}

.fcbv-player__ratio {
    position: relative;
    width: 100%;
    /* Formato di partenza 16:9: l'aspetto reale del video lo imposta il
       JavaScript appena Bunny gli dice larghezza e altezza. */
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.fcbv-player__ratio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.fcbv-player__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .45;
}

.fcbv-player__notice {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    color: #fff;
    background: rgba(10, 14, 18, .55);
    font: 600 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.fcbv-player__notice .fcbv-card__spinner {
    border-color: rgba(255, 255, 255, .45);
    border-top-color: #fff;
}

/* Pulsante flottante */
.fcbv-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: #0e6e86;
    color: #fff;
    font: 600 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.fcbv-fab:hover {
    background: #0b5b6f;
}

.fcbv-fab__icon {
    font-size: 12px;
}

@media (max-width: 640px) {
    .fcbv-fab__label {
        display: none;
    }
    .fcbv-fab {
        padding: 14px;
    }
}

/* Pulsante dentro la barra del composer.
   Riusa le classi native (.el-button.is-text) per ereditare lo stile del tema:
   qui serve solo il minimo indispensabile per chi non le ha. */
.fcbv-composer-btn {
    cursor: pointer;
}

.fcbv-composer-btn:not(.el-button) {
    display: inline-flex;
    align-items: center;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: inherit;
}

/* Pulsante video nativo di FluentCommunity, sostituito da quello del plugin */
.fcbv-hidden {
    display: none !important;
}

.fcbv-composer-btn[disabled] {
    opacity: .5;
    cursor: default;
}

.fcbv-composer-btn .fcom_apps_icon,
.fcbv-composer-btn svg {
    width: 20px;
    height: 20px;
}

/* Stato dell'upload sotto al campo di testo */
.fcbv-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 2px;
    padding: 8px 10px;
    border: 1px solid rgba(127, 127, 127, .3);
    border-radius: 8px;
    font: 500 12.5px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.fcbv-chip__bar {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: rgba(127, 127, 127, .25);
    overflow: hidden;
}

.fcbv-chip__fill {
    width: 0;
    height: 100%;
    background: #0e6e86;
    transition: width .2s ease;
}

.fcbv-chip__text {
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scheda del video allegato, sotto al testo del composer */
.fcbv-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 2px;
    padding: 8px;
    border: 1px solid rgba(127, 127, 127, .3);
    border-radius: 10px;
    font: 400 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.fcbv-card * {
    box-sizing: border-box;
}

.fcbv-card__thumb {
    flex: none;
    width: 92px;
    height: 62px;
    border-radius: 6px;
    background: rgba(127, 127, 127, .2);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.fcbv-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fcbv-card__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(127, 127, 127, .45);
    border-top-color: #0e6e86;
    border-radius: 50%;
    animation: fcbv-spin .9s linear infinite;
}

@keyframes fcbv-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .fcbv-card__spinner { animation-duration: 3s; }
}

.fcbv-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.fcbv-card__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fcbv-card__meta {
    margin-top: 2px;
    font-size: 12px;
    color: #2a6f52;
}

.fcbv-card__meta--error {
    color: #b3392f;
}

.fcbv-card__remove {
    flex: none;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(127, 127, 127, .18);
    color: inherit;
    font: 600 16px/1 system-ui, sans-serif;
    cursor: pointer;
}

.fcbv-card__remove:hover {
    background: rgba(179, 57, 47, .18);
    color: #b3392f;
}

/* Telefono: spazi stretti, dita grosse. La scheda si compatta e il testo va a capo. */
@media (max-width: 640px) {
    .fcbv-card {
        gap: 10px;
        padding: 8px 6px;
        font-size: 12.5px;
    }

    .fcbv-card__thumb {
        width: 64px;
        height: 44px;
        border-radius: 5px;
    }

    .fcbv-card__name {
        white-space: normal;
        overflow-wrap: anywhere;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .fcbv-card__meta {
        font-size: 11.5px;
        white-space: normal;
    }

    /* Area di tocco piena senza rubare larghezza al testo. */
    .fcbv-card__remove {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .fcbv-chip {
        font-size: 11.5px;
        padding: 7px 8px;
    }

    .fcbv-composer-btn {
        padding: 6px;
    }
}

.fcbv-chip--ok .fcbv-chip__fill { background: #2a6f52; }
.fcbv-chip--ok .fcbv-chip__text { color: #2a6f52; }
.fcbv-chip--error .fcbv-chip__fill { background: #b3392f; }
.fcbv-chip--error .fcbv-chip__text { color: #b3392f; }
.fcbv-chip--work .fcbv-chip__fill { background: #9a6410; }

/* Modale */
.fcbv-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 12, 16, .6);
    backdrop-filter: blur(2px);
}

.fcbv-modal__box {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    color: #111a20;
    font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme: dark) {
    .fcbv-modal__box {
        background: #151e24;
        color: #e7eef2;
    }
}

.fcbv-modal__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
}

.fcbv-targets {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.fcbv-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fcbv-field {
    display: block;
    margin-bottom: 14px;
}

.fcbv-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: .8;
}

.fcbv-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(127, 127, 127, .4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.fcbv-textarea {
    resize: vertical;
    min-height: 70px;
}

.fcbv-file {
    width: 100%;
    font: inherit;
}

.fcbv-hint {
    margin: 0 0 12px;
    font-size: 13px;
    opacity: .7;
}

.fcbv-bar {
    height: 8px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(127, 127, 127, .25);
    overflow: hidden;
}

.fcbv-bar__fill {
    width: 0;
    height: 100%;
    background: #0e6e86;
    transition: width .2s ease;
}

.fcbv-status {
    margin: 0 0 12px;
    font-size: 13.5px;
    min-height: 20px;
}

.fcbv-status--error {
    color: #b3392f;
}

.fcbv-status--ok {
    color: #2a6f52;
}

.fcbv-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.fcbv-btn {
    padding: 10px 16px;
    border: 1px solid rgba(127, 127, 127, .4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: 600 14px/1 inherit;
    cursor: pointer;
}

.fcbv-btn--primary {
    border-color: #0e6e86;
    background: #0e6e86;
    color: #fff;
}

.fcbv-btn[disabled] {
    opacity: .6;
    cursor: default;
}
