/* ==========================================================================
   ShareDrop - Live Text & Code Snippet Sharing Styling
   ========================================================================== */

.text-editor-container {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.text-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: var(--bg-surface-sunken);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.toolbar-btn.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: rgba(79, 70, 229, 0.3);
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent);
    background-color: var(--color-accent-light);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.live-indicator-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.text-textarea-wrapper {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.text-share-textarea {
    width: 100%;
    min-height: 260px;
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.6;
    background-color: transparent;
    color: var(--text-primary);
    border: none;
    outline: none;
    resize: vertical;
}

.text-share-textarea::placeholder {
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.text-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background-color: var(--bg-surface-sunken);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stats-counter {
    display: flex;
    gap: 14px;
}

.stat-pill {
    font-weight: 500;
}

.stat-pill strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Formatted Text Viewer Display (when received) */
.received-text-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.code-snippet-box {
    background-color: var(--bg-surface-sunken);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    margin: 14px 0;
    max-height: 380px;
}
