/* X Thread Maker - Custom Styles */
/* 2026 feature: X-style thread preview cards */

#threadPreview {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #cfd9de;
    border-radius: 0.5rem;
    background: #ffffff;
    overflow: hidden;
}

.xtm-tweet {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eff3f4;
    position: relative;
}

.xtm-tweet:last-child {
    border-bottom: none;
}

.xtm-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.xtm-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d9bf0, #052c65);
    flex-shrink: 0;
    position: relative;
}

.xtm-avatar::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.xtm-connector {
    width: 2px;
    background: #cfd9de;
    flex-grow: 1;
    margin-top: 4px;
    min-height: 20px;
}

.xtm-body {
    flex: 1;
    min-width: 0;
}

.xtm-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.xtm-name {
    font-weight: 700;
    color: #0f1419;
}

.xtm-handle {
    color: #536471;
}

.xtm-dot {
    color: #536471;
}

.xtm-time {
    color: #536471;
    font-weight: 600;
}

.xtm-reply {
    font-size: 0.85rem;
    color: #536471;
    margin: 2px 0 4px;
}

.xtm-reply::before {
    content: "↳ ";
    color: #1d9bf0;
}

.xtm-content {
    color: #0f1419;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 4px 0 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.xtm-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #536471;
}

.xtm-chars {
    font-variant-numeric: tabular-nums;
}

/* Dark mode */
[data-bs-theme="dark"] #threadPreview {
    background: #15202b;
    border-color: #38444d;
}

[data-bs-theme="dark"] .xtm-tweet {
    border-bottom-color: #2f3336;
}

[data-bs-theme="dark"] .xtm-name {
    color: #e7e9ea;
}

[data-bs-theme="dark"] .xtm-handle,
[data-bs-theme="dark"] .xtm-dot,
[data-bs-theme="dark"] .xtm-time,
[data-bs-theme="dark"] .xtm-reply,
[data-bs-theme="dark"] .xtm-footer {
    color: #71767b;
}

[data-bs-theme="dark"] .xtm-content {
    color: #e7e9ea;
}

[data-bs-theme="dark"] .xtm-connector {
    background: #38444d;
}

/* Live input counter */
#inputLiveCounter {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

#inputLiveCounter #inputCharCount,
#inputLiveCounter #inputTweetEstimate {
    color: #052c65;
    font-weight: 700;
}

[data-bs-theme="dark"] #inputLiveCounter #inputCharCount,
[data-bs-theme="dark"] #inputLiveCounter #inputTweetEstimate {
    color: #6ea8fe;
}
