/* =============================================================
   Live News Ticker — Public Styles
   ============================================================= */

/* ── Wrap ────────────────────────────────────────────────── */
.lnt-wrap {
    font-family: inherit;
    margin: 24px 0;
    max-width: 100%;
}

/* ── Header bar ─────────────────────────────────────────── */
.lnt-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    flex-wrap: wrap;
}

.lnt-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.lnt-badge-on {
    background: #e53e3e;
    color: #fff;
    animation: lnt-pulse 1.8s infinite;
}

.lnt-badge-off {
    background: #718096;
    color: #fff;
}

@keyframes lnt-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .65; }
}

.lnt-update-count {
    color: #555;
}

.lnt-new-indicator {
    margin-left: auto;
    background: #2b6cb0;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    animation: lnt-bounce .6s ease infinite alternate;
}

@keyframes lnt-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-3px); }
}

/* ── Feed ────────────────────────────────────────────────── */
.lnt-feed {
    border: 1px solid #e2e2e2;
    border-radius: 0 0 6px 6px;
    background: #fff;
    overflow: hidden;
}

.lnt-empty {
    padding: 32px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* ── Individual update ───────────────────────────────────── */
.lnt-update {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    transition: background .25s;
    position: relative;
}

.lnt-update:last-child {
    border-bottom: none;
}

.lnt-update.lnt-update-new {
    background: #ebf8ff;
    animation: lnt-highlight 2.5s forwards;
}

@keyframes lnt-highlight {
    0%   { background: #bee3f8; }
    100% { background: transparent; }
}

.lnt-update-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.lnt-time {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.lnt-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.lnt-update-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a202c;
}

.lnt-update-content {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
}

.lnt-update-content p:last-child {
    margin-bottom: 0;
}

/* ── Front-end Editor Panel ─────────────────────────────── */
.lnt-editor-panel {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.lnt-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #2d3748;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.lnt-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* Toggle switch */
.lnt-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}
.lnt-switch input { display: none; }
.lnt-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #4a5568;
    border-radius: 22px;
    transition: .3s;
}
.lnt-slider:before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}
.lnt-switch input:checked + .lnt-slider { background: #e53e3e; }
.lnt-switch input:checked + .lnt-slider:before { transform: translateX(20px); }

.lnt-live-status-text {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .06em;
    min-width: 30px;
}

.lnt-editor-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lnt-editor-row {
    display: flex;
    gap: 10px;
}

.lnt-editor-panel .lnt-input-title,
.lnt-editor-panel .lnt-input-content,
.lnt-editor-panel .lnt-input-badge {
    background: #2d3748 !important;
    background-color: #2d3748 !important;
    border: 1px solid #4a5568 !important;
    color: #e2e8f0 !important;
    border-radius: 5px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color .2s !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.lnt-editor-panel .lnt-input-title::placeholder,
.lnt-editor-panel .lnt-input-content::placeholder {
    color: #718096 !important;
    opacity: 1 !important;
}

.lnt-editor-panel .lnt-input-title:focus,
.lnt-editor-panel .lnt-input-content:focus {
    border-color: #63b3ed !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.lnt-editor-panel .lnt-input-title {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

.lnt-editor-panel .lnt-input-content {
    width: 100% !important;
    resize: vertical !important;
    display: block !important;
    box-sizing: border-box !important;
    min-height: 80px !important;
}

.lnt-editor-panel .lnt-input-badge {
    min-width: 130px !important;
    cursor: pointer !important;
    color: #e2e8f0 !important;
    background: #2d3748 !important;
}

.lnt-editor-panel .lnt-input-badge option {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
}

.lnt-btn-post {
    background: #e53e3e;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}

.lnt-btn-post:hover {
    background: #c53030;
}

.lnt-btn-post:disabled {
    background: #4a5568;
    cursor: not-allowed;
}

.lnt-editor-msg {
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 13px;
}

.lnt-editor-msg.lnt-msg-success {
    background: #276749;
    color: #c6f6d5;
}

.lnt-editor-msg.lnt-msg-error {
    background: #742a2a;
    color: #fed7d7;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .lnt-editor-actions {
        flex-wrap: wrap;
    }
    .lnt-input-badge,
    .lnt-btn-post {
        width: 100%;
    }
    .lnt-header {
        font-size: 12px;
    }
}

/* ── Loading state ──────────────────────────────────────── */
.lnt-badge-loading {
    background: #718096;
    color: #fff;
}
.lnt-badge-error {
    background: #744210;
    color: #fefcbf;
}
.lnt-loading {
    padding: 28px;
    text-align: center;
    color: #888;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.lnt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: lnt-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes lnt-spin {
    to { transform: rotate(360deg); }
}
