/* Word Plugin Styles */

/* --- Layout --- */
.hl-page {
    max-width: 900px;
    margin: 0 auto;
}

.hl-layout {
    min-height: 500px;
}

/* --- Location pills --- */
.hl-location-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px 8px;
    background: #f7f8fa;
    border-bottom: 1px solid #e0e4ea;
}

.hl-location-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #555;
    background: #e8ecf1;
    white-space: nowrap;
}

.hl-location-pill:hover {
    background: #d0d6e0;
    color: #333;
}

.hl-location-pill.hl-active {
    background: #4a90d9;
    color: #fff;
}

.hl-location-pill.hl-location-primary {
    font-weight: 700;
}

/* --- Channel bar --- */
.hl-channel-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e0e4ea;
    padding-bottom: 6px;
}

.hl-channel-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.hl-channel-tab {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.hl-channel-tab:hover {
    background: #e8ecf1;
    color: #333;
}

.hl-channel-tab.hl-active {
    background: #4a90d9;
    color: #fff;
}

.hl-channel-add-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 20px;
    color: #888;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.hl-channel-add-btn:hover {
    background: #e8ecf1;
    color: #333;
}

.hl-channel-create {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.hl-channel-create .hl-input {
    flex: 1;
    font-size: 12px;
    padding: 4px 8px;
}

.hl-channel-create .hl-send-btn {
    font-size: 12px;
    padding: 4px 10px;
}

/* --- Main chat area --- */
.hl-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e4ea;
    overflow: hidden;
}

.hl-chat-header {
    padding: 10px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid #e0e4ea;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hl-chat-location {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

/* --- Messages --- */
.hl-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.hl-messages-widget {
    max-height: 300px;
}

.hl-messages-page {
    min-height: 350px;
    max-height: 60vh;
}

/* --- Threads --- */
.hl-thread-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 300px;
    max-height: 60vh;
}

.hl-thread-list-widget {
    max-height: 280px;
}

.hl-thread-card {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f0f3f7;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    animation: hl-fadein 0.2s ease;
}

.hl-thread-card:hover {
    background: #e4e9f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hl-thread-visitor {
    background: #fef9e7;
    border-left: 3px solid #f0c040;
}

.hl-thread-visitor:hover {
    background: #fdf3d0;
}

.hl-thread-op-card {
    cursor: default;
    border-left: 3px solid #4a90d9;
}

.hl-thread-op-card:hover {
    background: #f0f3f7;
    box-shadow: none;
}

.hl-thread-meta {
    margin-bottom: 4px;
}

.hl-thread-body {
    font-size: 14px;
    color: #222;
    line-height: 1.5;
    word-break: break-word;
    margin-bottom: 6px;
}

.hl-thread-footer {
    font-size: 12px;
    color: #888;
}

.hl-reply-count {
    font-weight: 500;
}

/* --- Thread detail --- */
.hl-thread-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hl-thread-back {
    padding: 8px 16px;
    border-bottom: 1px solid #e0e4ea;
}

.hl-thread-back a {
    color: #4a90d9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.hl-thread-back a:hover {
    text-decoration: underline;
}

.hl-thread-op {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e4ea;
}

.hl-replies {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    max-height: 45vh;
}

.hl-reply {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f7f8fa;
    animation: hl-fadein 0.2s ease;
}

.hl-reply-visitor {
    background: #fef9e7;
    border-left: 2px solid #f0c040;
}

.hl-compose-thread {
    border-top: none;
}

.hl-empty {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-size: 14px;
}

.hl-msg {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f3f7;
    animation: hl-fadein 0.2s ease;
}

.hl-msg-visitor {
    background: #fef9e7;
    border-left: 3px solid #f0c040;
}

.hl-msg-name {
    font-weight: 600;
    font-size: 13px;
    color: #4a90d9;
    text-decoration: none;
    margin-right: 8px;
}

.hl-msg-name:hover {
    text-decoration: underline;
}

.hl-visitor-name {
    color: #b08c20;
    font-style: italic;
}

.hl-op-name {
    color: #2e7d32;
    font-weight: 700;
    font-style: normal;
}

.hl-show-more {
    text-align: center;
    padding: 10px;
    color: #4a90d9;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-top: 1px solid #e0e4ea;
    margin-top: 4px;
}

.hl-show-more:hover {
    color: #2a6cb8;
    background: #f0f4f9;
    border-radius: 0 0 8px 8px;
}

/* --- Voting --- */
.hl-vote {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    vertical-align: middle;
}

.hl-vote button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    color: #999;
    padding: 1px 4px;
    line-height: 1;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}

.hl-vote button:hover {
    background: #e8ecf1;
    color: #555;
}

.hl-vote button.hl-vote-active.hl-vote-up {
    color: #2e7d32;
}

.hl-vote button.hl-vote-active.hl-vote-down {
    color: #c0392b;
}

.hl-vote-score {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    min-width: 14px;
    text-align: center;
}

.hl-score-pos {
    color: #2e7d32;
}

.hl-score-neg {
    color: #c0392b;
}

.hl-reply-footer {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.hl-op-voted {
    font-size: 10px;
    font-weight: 700;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
}

.hl-msg-time {
    font-size: 11px;
    color: #aaa;
}

.hl-msg-body {
    margin-top: 3px;
    font-size: 14px;
    color: #222;
    line-height: 1.45;
    word-break: break-word;
}

/* --- Compose --- */
.hl-compose {
    display: flex;
    padding: 10px 12px;
    border-top: 1px solid #e0e4ea;
    background: #fafbfc;
    gap: 8px;
}

.hl-input {
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}

.hl-input:focus {
    border-color: #4a90d9;
}

.hl-input-full {
    flex: 1;
}

.hl-send-btn {
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}

.hl-send-btn:hover {
    background: #3a7bc8;
}

.hl-btn {
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.hl-btn-sm {
    font-size: 11px;
    padding: 4px 8px;
}

/* --- Misc --- */
.hl-location-badge {
    display: inline-block;
    background: #4a90d9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hl-visitor-notice {
    padding: 6px 12px;
    font-size: 12px;
    color: #888;
    background: #fef9e7;
    text-align: center;
    border-top: 1px solid #f0e6c0;
}

.hl-visitor-notice a {
    color: #4a90d9;
    font-weight: 600;
}

.hl-anon-toggle {
    padding: 4px 12px;
    font-size: 12px;
    color: #888;
    text-align: right;
}

.hl-anon-toggle label {
    cursor: pointer;
    user-select: none;
}

.hl-anon-toggle input[type="checkbox"] {
    margin-right: 4px;
    vertical-align: middle;
}

.hl-loading {
    text-align: center;
    color: #aaa;
    padding: 30px;
    font-size: 13px;
}

.hl-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hl-expand-link {
    font-size: 18px;
    color: #4a90d9;
    text-decoration: none;
}

.hl-expand-link:hover {
    color: #3a7bc8;
}

/* --- Widget thread detail --- */
.hl-widget-detail-header {
    margin-bottom: 8px;
}

.hl-back-btn {
    font-size: 13px;
    color: #4a90d9;
    text-decoration: none;
    cursor: pointer;
}

.hl-back-btn:hover {
    color: #3a7bc8;
    text-decoration: underline;
}

.hl-widget-replies {
    max-height: 250px;
    overflow-y: auto;
    margin: 8px 0;
    padding: 4px 0;
    border-top: 1px solid #eee;
}

.hl-widget-replies .hl-reply {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.hl-widget-replies .hl-reply:last-child {
    border-bottom: none;
}

@keyframes hl-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
