/**
 * BBT Fan Discussions & Opinions Suite Styles
 */

/* ==========================================================================
   1. FLOATING ACTION BUTTON (EVERY PAGE)
   ========================================================================== */
.bbt-disc-fab-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99980;
    pointer-events: auto;
}

.bbt-disc-fab-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    user-select: none;
}

.bbt-disc-fab-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.55), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bbt-disc-fab-btn:active {
    transform: translateY(1px) scale(0.98);
}

.bbt-disc-fab-icon {
    font-size: 18px;
    line-height: 1;
}

.bbt-disc-fab-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: bbtFabPulse 2s infinite;
}

@keyframes bbtFabPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Header button in main navbar */
.bbt-btn-header-discussion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
    border: 1px solid rgba(234, 88, 12, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbt-btn-header-discussion:hover {
    background: #ea580c;
    color: #ffffff;
    border-color: #ea580c;
}

/* ==========================================================================
   2. SLIDE-OVER DRAWER & BACKDROP
   ========================================================================== */
.bbt-disc-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bbt-disc-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bbt-disc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99995;
    font-family: inherit;
}

.bbt-disc-backdrop.active .bbt-disc-drawer {
    transform: translateX(0);
}

/* Drawer Header */
.bbt-disc-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #0f172a;
    color: #ffffff;
    border-bottom: 1px solid #1e293b;
}

.bbt-disc-header-badge {
    display: inline-block;
    background: rgba(234, 88, 12, 0.25);
    color: #f97316;
    border: 1px solid rgba(234, 88, 12, 0.5);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.bbt-disc-header-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.bbt-disc-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bbt-disc-close-btn:hover {
    background: rgba(234, 88, 12, 0.8);
    transform: scale(1.05);
}

/* Tabs Bar */
.bbt-disc-tabs-bar {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 12px;
    gap: 8px;
}

.bbt-disc-tab {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bbt-disc-tab:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.bbt-disc-tab.active {
    background: #ffffff;
    color: #ea580c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tab Panes */
.bbt-disc-tab-pane {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

.bbt-disc-tab-pane.active {
    display: flex;
}

/* Policy banner */
.bbt-disc-policy-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    padding: 8px 16px;
    font-size: 11px;
    color: #9a3412;
    line-height: 1.4;
}

.bbt-disc-policy-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   STRICT FOUL LANGUAGE WARNING BANNERS (RED & BOLD)
   ========================================================================== */
.bbt-disc-foul-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fef2f2;
    border-bottom: 2px solid #ef4444;
    padding: 12px 18px;
    color: #991b1b;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.12);
}

.bbt-disc-foul-alert-icon {
    font-size: 22px;
    flex-shrink: 0;
    animation: bbtPulseWarning 2s infinite ease-in-out;
}

@keyframes bbtPulseWarning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.bbt-disc-foul-alert-body {
    flex: 1;
}

.bbt-disc-foul-alert-body strong,
.bbt-disc-foul-alert-body b {
    color: #dc2626 !important;
    font-weight: 900 !important;
    letter-spacing: 0.3px;
}

.bbt-disc-foul-alert-form-banner {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.1);
}

.bbt-disc-foul-alert-form-banner strong {
    color: #dc2626 !important;
    font-weight: 900 !important;
    font-size: 13.5px;
    line-height: 1.4;
    display: block;
    text-transform: uppercase;
}

/* ==========================================================================
   3. CHAT STREAM & MESSAGES
   ========================================================================== */
.bbt-disc-stream-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
}

.bbt-disc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #64748b;
    font-size: 13px;
}

.bbt-disc-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #ea580c;
    border-radius: 50%;
    animation: bbtSpin 0.8s linear infinite;
}

@keyframes bbtSpin {
    to { transform: rotate(360deg); }
}

.bbt-disc-msg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease;
}

.bbt-disc-msg-card.is-owner {
    border-color: #fed7aa;
    background: #fffdfa;
}

.bbt-disc-msg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bbt-disc-msg-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbt-disc-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.bbt-disc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bbt-disc-author-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.bbt-disc-time {
    font-size: 11px;
    color: #94a3b8;
}

.bbt-disc-msg-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: #334155;
    word-break: break-word;
    margin-bottom: 8px;
}

.bbt-disc-msg-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
}

.bbt-disc-like-btn, .bbt-disc-report-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.bbt-disc-like-btn:hover {
    color: #ea580c;
    background: #fff7ed;
}

.bbt-disc-like-btn.liked {
    color: #ea580c;
    font-weight: 700;
}

.bbt-disc-report-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ==========================================================================
   4. CHAT COMPOSER
   ========================================================================== */
.bbt-disc-composer-wrap {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.bbt-disc-composer-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 6px;
}

.bbt-disc-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.bbt-disc-textarea {
    flex: 1;
    height: 52px;
    min-height: 48px;
    max-height: 120px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13.5px;
    color: #0f172a;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbt-disc-textarea:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.bbt-disc-send-btn {
    width: 44px;
    height: 44px;
    background: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.bbt-disc-send-btn:hover {
    background: #c2410c;
    transform: scale(1.04);
}

.bbt-disc-send-btn:active {
    transform: scale(0.96);
}

.bbt-disc-guest-card {
    text-align: center;
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

.bbt-disc-guest-card p {
    margin: 0 0 10px 0;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
}

.bbt-disc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bbt-disc-btn-primary:hover {
    opacity: 0.92;
}

.bbt-disc-blocked-notice {
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 12.5px;
    color: #991b1b;
    line-height: 1.4;
}

.bbt-disc-error-alert {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #f87171;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
    animation: bbtShake 0.4s ease;
}

@keyframes bbtShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ==========================================================================
   5. OPINION TAB STYLES
   ========================================================================== */
#bbtPaneOpinion {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

#bbtPaneOpinion.active {
    display: flex;
}

#bbtPanePost {
    display: none;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

#bbtPanePost.active {
    display: flex;
}

.bbt-disc-cat-bar {
    padding: 10px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.bbt-disc-cat-bar-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbt-disc-opinion-intro {
    margin-bottom: 14px;
}

.bbt-disc-opinion-intro h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.bbt-disc-opinion-intro p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.bbt-disc-opinion-form-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 18px;
}

.bbt-disc-field {
    margin-bottom: 12px;
}

.bbt-disc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
}

.bbt-disc-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease;
}

.bbt-disc-select:focus {
    border-color: #ea580c;
}

.bbt-disc-sentiment-radios {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.bbt-disc-sentiment-item {
    display: block;
    cursor: pointer;
    position: relative;
}

.bbt-disc-sentiment-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bbt-disc-sentiment-item span {
    display: block;
    text-align: center;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s ease;
}

.bbt-disc-sentiment-item input:checked + span {
    background: #fff7ed;
    border-color: #ea580c;
    color: #ea580c;
    font-weight: 700;
}

.bbt-op-textarea {
    width: 100%;
    height: 80px;
    min-height: 70px;
}

.bbt-disc-btn-submit-op {
    width: 100%;
    padding: 10px;
    font-size: 13.5px;
    margin-top: 4px;
}

/* Community Opinion Wall */
.bbt-disc-opinions-feed-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.bbt-disc-opinions-feed-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.bbt-disc-cat-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bbt-disc-filter-pill {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.bbt-disc-filter-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.bbt-disc-filter-pill.active {
    background: #ea580c;
    color: #ffffff;
}

.bbt-op-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bbt-op-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.bbt-op-badge-cat {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.bbt-op-badge-target {
    background: #fef3c7;
    color: #b45309;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.bbt-op-badge-sentiment {
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   NESTED REPLIES STYLES
   ========================================================================== */
.bbt-disc-reply-btn {
    background: none;
    border: none;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.bbt-disc-reply-btn:hover {
    color: #ea580c;
    background: #fff7ed;
}

.bbt-op-replies-wrap {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.bbt-op-replies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    padding-left: 12px;
    border-left: 2px solid #fed7aa;
}

.bbt-op-reply-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 12px;
    transition: background 0.15s ease;
}

.bbt-op-reply-item.is-owner {
    background: #fffdfa;
    border-color: #ffedd5;
}

.bbt-op-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.bbt-op-reply-user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbt-op-reply-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.bbt-op-reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bbt-op-reply-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
}

.bbt-op-reply-time {
    font-size: 10px;
    color: #94a3b8;
}

.bbt-op-reply-content {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.45;
    word-break: break-word;
}

.bbt-op-reply-box {
    margin-top: 10px;
    padding: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
}

.bbt-reply-warning-red {
    font-size: 11.5px;
    color: #dc2626 !important;
    font-weight: 800 !important;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.35;
}

.bbt-reply-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 54px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 12.5px;
    color: #0f172a;
    background: #ffffff;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbt-reply-textarea:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.bbt-reply-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.bbt-reply-submit-btn {
    background: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.bbt-reply-submit-btn:hover {
    background: #c2410c;
    transform: translateY(-1px);
}

.bbt-reply-cancel-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 11.5px;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 6px;
}

.bbt-reply-cancel-btn:hover {
    color: #0f172a;
    text-decoration: underline;
}

.bbt-reply-char-cnt {
    font-size: 11px;
    color: #94a3b8;
}

.bbt-reply-err-msg {
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 700;
    margin-top: 6px;
    display: none;
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 600px) {
    .bbt-disc-drawer {
        width: 100vw;
    }
    
    .bbt-disc-fab-wrap {
        bottom: 16px;
        right: 16px;
    }

    .bbt-disc-fab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .bbt-disc-sentiment-radios {
        grid-template-columns: repeat(2, 1fr);
    }
}
