/* =================================================================
   Fan Pulse Section Styling (Fixed Alignment & Stars)
   ================================================================= */

/* 1. Main Container */
.fan-pulse-wrapper {
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    margin: 30px 0;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 2. Header */
.fp-header-bar {
    background: #2b2b2b;
    padding: 10px 15px;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.fp-title .fp-heading {
    color: #ffffff;
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}
.fp-title span { color: #ff2a6d; }

.fp-reactions-mini { display: flex; gap: 5px; }
.mini-react-btn {
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}
.mini-react-btn:hover { background: #333; border-color: #ff2a6d; color: #fff; }
.mini-react-btn.voted { background: #2a0f16; border-color: #ff2a6d; color: #ff2a6d; }

/* 3. Chat Window */
.fp-comments-window {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: #252525;
    scrollbar-width: thin;
    scrollbar-color: #555 #252525;
}
.loading-spinner, .fp-empty { text-align: center; color: #999; font-size: 13px; padding: 40px 20px; }

/* --- CHAT BUBBLES --- */
.fp-thread-wrapper { margin-bottom: 10px; }

.fp-chat-bubble {
    background: #333333;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    border-left: 3px solid #555;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* User Meta */
.fp-user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.fp-author { color: #fff; font-size: 13px; font-weight: 700; }
.fp-badge-pill {
    background: #444; color: #fff; font-size: 9px; padding: 1px 6px;
    border-radius: 4px; text-transform: uppercase; font-weight: 600; border: 1px solid #555;
}
.fp-stars { color: #FFD700; font-size: 10px; letter-spacing: 1px; }

/* Message Body */
.fp-body {
    font-size: 14px; color: #e6e6e6; line-height: 1.3; margin-bottom: 4px;
}

/* Footer */
.fp-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 0; padding-top: 0; border-top: none; opacity: 0.8;
}
.fp-time { font-size: 10px; color: #b0b0b0; }
.fp-actions { display: flex; align-items: center; gap: 10px; }

.vote-wrapper {
    background: rgba(0,0,0,0.2); border-radius: 4px; padding: 0 4px;
    border: 1px solid #444; display: flex; align-items: center; height: 20px;
}
.vote-btn { background: none; border: none; color: #888; cursor: pointer; padding: 0 4px; font-size: 10px; }
.vote-btn:hover { color: #fff; }
.vote-btn.active { color: #ff2a6d; }
.vote-count { color: #fff; font-weight: bold; font-size: 11px; min-width: 10px; text-align: center; }

.reply-btn, .fp-view-replies { background: none; border: none; color: #b0b0b0; font-size: 10px; cursor: pointer; }
.reply-btn:hover, .fp-view-replies:hover { color: #ff2a6d; text-decoration: underline; }
.fp-view-replies { color: #ff2a6d; font-weight: bold; margin-left: 10px; margin-bottom: 5px; display: block; font-size: 11px; }

/* Admin Card */
.fp-chat-bubble.is-admin {
    background: linear-gradient(135deg, #1e1e1e 0%, #291015 100%);
    border: 1px solid #ff2a6d;
    box-shadow: 0 2px 10px rgba(255, 42, 109, 0.1);
    padding: 0; overflow: hidden; margin-top: 5px; border-left: none;
}
.admin-content-wrap { padding: 8px 12px; }

.verified-tick {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #ff2a6d; width: 14px; height: 14px;
    border-radius: 50%; margin-left: 4px; vertical-align: middle;
}
.verified-tick svg { width: 10px; height: 10px; fill: #ff2a6d; }

.fp-chat-bubble.is-admin .fp-body {
    color: #f0f0f0; font-size: 13px; line-height: 1.3;
    border-left: 2px solid rgba(255, 42, 109, 0.3); padding-left: 8px; margin-left: 0;
}
.fp-chat-bubble.is-admin .fp-footer { border-top: none; margin-top: 4px; padding-top: 0; }
.fp-chat-bubble.is-reply { margin-left: 20px; margin-top: 2px; border-left: 2px solid #444; background: #2a2a2a; }
.fp-chat-header { margin-bottom: 2px; }

/* 4. Input Dock (FIXED ALIGNMENT) */
.fp-input-dock { background: #2b2b2b; padding: 10px 15px; border-top: 1px solid #3a3a3a; }

/* Tools Row (Stars & Badge) */
.fp-tools-row {
    display: flex; align-items: center; gap: 15px; margin-bottom: 8px;
}
.fp-tool-group { display: flex; align-items: center; gap: 5px; }
.fp-label { font-size: 10px; color: #cccccc; font-weight: 700; text-transform: uppercase; }

/* --- STARS FIX (Hide Radio Buttons) --- */
.mini-stars {
    display: inline-flex;
    flex-direction: row-reverse; /* Right to left for hover effect */
    align-items: center;
}
.mini-stars input {
    display: none !important; /* Force hide circles */
    appearance: none;
    -webkit-appearance: none;
}
.mini-stars label {
    color: #666;
    cursor: pointer;
    font-size: 16px; /* Star size */
    padding: 0 2px;
    line-height: 1;
}
.mini-stars input:checked ~ label,
.mini-stars label:hover,
.mini-stars label:hover ~ label {
    color: #FFD700; /* Gold color on hover/select */
}

.fp-select { padding: 2px 5px; font-size: 11px; height: 26px; border-radius: 4px; border: 1px solid #444; background: #1a1a1a; color: #fff; }
.fp-select option {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 10px;
    border: none;
}

/* --- INPUTS & BUTTON HEIGHT FIX --- */
.fp-text-area {
    display: flex;
    align-items: center; /* Vertically center items */
    gap: 8px;
}

.fp-nick, .fp-msg {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    padding: 0 12px; /* Horizontal padding only */
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    height: 30px !important; /* Fixed Height */
    line-height: 30px; /* Vertically center text */
    box-sizing: border-box;
    margin: 0;
}
.fp-nick { width: 25%; }
.fp-msg { flex-grow: 1; }
.fp-nick:focus, .fp-msg:focus { border-color: #ff2a6d; background: #111; }

.fp-send-btn {
    width: 38px !important;
    height: 38px !important; /* Matches Input Height */
    background: #ff2a6d;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.fp-send-btn svg { width: 18px; height: 18px; }
.fp-send-btn:hover { background: #ff457f; }

@media (max-width: 600px) {
    .fp-header-bar { flex-direction: column; align-items: flex-start; }
    .fp-tools-row { flex-wrap: wrap; gap: 10px; }
    .fp-nick { display: none; }
    .fp-msg { width: 100%; }
}