/**
 * Стили вирусной смарт-карточки Наставника ПочеркПро (ViralHandwritingCard)
 */

.viral-coach-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    width: 100vw;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 14, 26, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000200 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.viral-coach-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.viral-card-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.2);
    border-radius: 28px;
    padding: 28px 24px 24px;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transform: scale(0.92) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.viral-coach-overlay.active .viral-card-box {
    transform: scale(1) translateY(0);
}

/* Кнопка закрытия */
.viral-close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.viral-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.08);
}

/* Состояние загрузки */
.viral-card-box--loading {
    text-align: center;
    padding: 44px 24px;
}

.viral-loading-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 18px;
    color: #f1f5f9;
}

.viral-loading-sub {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 6px;
}

.viral-loading-bar {
    width: 100%;
    max-width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 24px auto 0;
    overflow: hidden;
    position: relative;
}

.viral-loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    border-radius: 4px;
    animation: viralProgress 1.4s ease-in-out infinite alternate;
}

@keyframes viralProgress {
    0% { left: 0%; width: 20%; }
    100% { left: 70%; width: 30%; }
}

/* Хедер с аватаром и речью */
.viral-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.viral-avatar-wrap {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 40%, rgba(99, 102, 241, 0.3) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.viral-avatar-wrap--pulse {
    margin: 0 auto;
    width: 110px;
    height: 110px;
    animation: viralFloat 3s ease-in-out infinite alternate;
}

.viral-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viral-avatar-img--pop {
    animation: viralPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes viralPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes viralFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* Спич-бабл наставника */
.viral-speech-bubble {
    position: relative;
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px 18px;
    backdrop-filter: blur(10px);
}

.viral-coach-name {
    font-size: 13px;
    font-weight: 600;
    color: #818cf8;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.viral-punchline {
    font-size: 16px;
    line-height: 1.45;
    color: #f8fafc;
    font-weight: 500;
}

/* Мета-строка: распознанный текст + читаемость */
.viral-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 10px 14px;
    border-radius: 16px;
}

.viral-recognized-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #cbd5e1;
}

.viral-chip-word {
    color: #38bdf8;
    font-weight: 700;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viral-chip-edit {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.viral-chip-edit:hover {
    opacity: 1;
}

.viral-legibility-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.viral-badge--high {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.viral-badge--med {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.viral-badge--low {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Графологическая заметка */
.viral-graphology-note {
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #6366f1;
    padding: 10px 14px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 20px;
}

/* Кнопки действий */
.viral-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.viral-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.viral-btn--share {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.5);
}

.viral-btn--share:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.6);
}

.viral-btn--duel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.viral-btn--duel:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

/* Второстепенные ссылки */
.viral-secondary-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.viral-link-btn {
    background: none;
    border: none;
    color: #818cf8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.viral-link-btn--primary {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.viral-link-btn--primary:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: #818cf8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
}

.viral-details-hint {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
    max-width: 380px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.viral-link-btn:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.1);
}

.viral-link-btn--subtle {
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
}

.viral-link-btn--subtle:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
}

/* Тост-уведомление */
.viral-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10030;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.viral-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Модалка прямого шеринга для Рунета (Telegram, MAX, VK, OK, WhatsApp) */
.viral-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 12, 22, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1000250 !important;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.viral-share-dialog {
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 24px;
    padding: 32px 36px 28px;
    max-width: 660px;
    width: 100%;
    text-align: center;
    color: #fff;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(99, 102, 241, 0.2);
    box-sizing: border-box;
    margin: auto;
}

.viral-share-close-x {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.viral-share-close-x:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.08);
}

.viral-share-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.3px;
}

.viral-share-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 20px;
    line-height: 1.45;
}

/* Превью открытки */
.viral-share-preview-wrap {
    width: 100%;
    max-height: 230px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: #080c16;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.viral-share-preview-img {
    width: 100%;
    height: auto;
    max-height: 230px;
    object-fit: contain;
    display: block;
}

/* Сетка соцсетей */
.viral-share-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.viral-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    min-height: 74px;
}

.viral-share-item.tg {
    background: linear-gradient(145deg, #2AABEE 0%, #229ED9 100%);
    border-color: rgba(42, 171, 238, 0.6);
    box-shadow: 0 6px 18px rgba(34, 158, 217, 0.4);
}

.viral-share-item.vk {
    background: linear-gradient(145deg, #1C84FF 0%, #0077FF 100%);
    border-color: rgba(28, 132, 255, 0.6);
    box-shadow: 0 6px 18px rgba(0, 119, 255, 0.4);
}

.viral-share-item.ok {
    background: linear-gradient(145deg, #F98D10 0%, #EE8208 100%);
    border-color: rgba(249, 141, 16, 0.6);
    box-shadow: 0 6px 18px rgba(238, 130, 8, 0.4);
}

.viral-share-item.wa {
    background: linear-gradient(145deg, #2CE26E 0%, #25D366 100%);
    border-color: rgba(44, 226, 110, 0.6);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

.viral-share-item.max {
    background: linear-gradient(145deg, #8B5CF6 0%, #6D28D9 100%);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.4);
}

.viral-share-item:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.viral-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 1;
    color: #ffffff;
}

.viral-share-icon svg {
    width: 26px;
    height: 26px;
    display: block;
    fill: #ffffff;
}

.viral-share-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Стили для дуэльного окна */
.viral-duel-header-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.viral-duel-callout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 16px;
    line-height: 1.4;
}

.viral-arena-direct-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s ease, filter 0.2s ease;
    box-sizing: border-box;
}

.viral-arena-direct-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Блок копирования ссылки */
.viral-copy-section {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    text-align: left;
}

.viral-copy-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viral-copy-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    padding: 4px 6px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.viral-copy-input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #e2e8f0 !important;
    font-size: 12px !important;
    font-family: inherit !important;
    outline: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    user-select: all !important;
    box-sizing: border-box !important;
    padding: 4px 6px !important;
}

.viral-copy-btn {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    background: #6366f1 !important;
    border: none !important;
    color: #fff !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.viral-copy-btn:hover {
    background: #4f46e5 !important;
}

.viral-copy-btn.copied {
    background: #10b981 !important;
}

/* Кнопка скачивания открытки */
.viral-download-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 11px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.viral-download-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.viral-share-cancel {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    transition: color 0.2s;
}

.viral-share-cancel:hover {
    color: #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════
 * 📱 ГЛАВНАЯ КНОПКА: ОТПРАВИТЬ ЖИВУЮ КАРТИНКУ В МЕССЕНДЖЕР
 * ═══════════════════════════════════════════════════════════════ */
.viral-image-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
    transition: transform 0.2s ease, filter 0.2s ease;
    box-sizing: border-box;
}

.viral-image-send-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ═══════════════════════════════════════════════════════════════
 * 🤫 КАРТОЧКА ИНСАЙДА «ТССС... ПО СЕКРЕТУ» (WIN-WIN ВИРАЛКА)
 * ═══════════════════════════════════════════════════════════════ */
.viral-whisper-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 18px;
    padding: 16px;
    margin-top: 14px;
    margin-bottom: 12px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.1);
    position: relative;
    box-sizing: border-box;
}

.viral-whisper-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.viral-whisper-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.viral-whisper-text {
    font-size: 13px;
    line-height: 1.45;
    color: #e2e8f0;
    margin-bottom: 12px;
}

.viral-whisper-phrase-box {
    background: rgba(15, 23, 42, 0.85);
    border: 1px dashed rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    position: relative;
}

.viral-whisper-phrase {
    font-size: 12px;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 8px;
}

.viral-whisper-copy-btn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.viral-whisper-copy-btn:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

.viral-whisper-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Кнопка мгновенного выкупа со скидкой 300 ₽ для самого автора */
.viral-winwin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease, filter 0.2s ease;
    box-sizing: border-box;
}

.viral-winwin-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ═══════════════════════════════════════════════════════════════
 * 🚫 СКРЫТИЕ ПЕРЕГРУЖАЮЩИХ ПЛАШЕК И ЧАТА ПРИ ОТКРЫТИИ МОДАЛОК
 * ═══════════════════════════════════════════════════════════════
 * Убирает нижнюю продающую плашку тарифов и круглый виджет чата,
 * устраняя визуальный мусор и преждевременную агрессивную продажу.
 */
body.has-viral-modal-open,
body:has(.viral-coach-overlay.active) {
    overflow: hidden !important;
    touch-action: none;
}

body.has-viral-modal-open .floating-purchase-bar,
body.has-viral-modal-open .bottom-sticky-bar,
body.has-viral-modal-open .floating-cta-bar,
body.has-viral-modal-open .sticky-buy-footer,
body.has-viral-modal-open .v2-coach-chat,
body.has-viral-modal-open .v2-coach-chat__toggle,
body.has-viral-modal-open #v2-coach-chat,
body.has-viral-modal-open #coach-chat-toggle,
body.has-viral-modal-open .ai-coach-bubble,
body:has(.viral-coach-overlay.active) .floating-purchase-bar,
body:has(.viral-coach-overlay.active) .bottom-sticky-bar,
body:has(.viral-coach-overlay.active) .floating-cta-bar,
body:has(.viral-coach-overlay.active) .sticky-buy-footer,
body:has(.viral-coach-overlay.active) .v2-coach-chat,
body:has(.viral-coach-overlay.active) .v2-coach-chat__toggle,
body:has(.viral-coach-overlay.active) #v2-coach-chat,
body:has(.viral-coach-overlay.active) #coach-chat-toggle,
body:has(.viral-share-modal) .floating-purchase-bar,
body:has(.viral-share-modal) .bottom-sticky-bar,
body:has(.viral-share-modal) .floating-cta-bar,
body:has(.viral-share-modal) .sticky-buy-footer,
body:has(.viral-share-modal) .v2-coach-chat,
body:has(.viral-share-modal) .v2-coach-chat__toggle,
body:has(.viral-share-modal) #v2-coach-chat,
body:has(.viral-share-modal) #coach-chat-toggle {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(120%) !important;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .viral-card-box {
        padding: 20px 14px 16px;
        border-radius: 22px;
        max-height: 94vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .viral-header {
        gap: 10px;
        margin-bottom: 14px;
    }
    .viral-avatar-wrap {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }
    .viral-punchline {
        font-size: 14px;
        line-height: 1.4;
    }
    .viral-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
    .viral-btn {
        padding: 12px 14px;
        font-size: 14px;
    }
    .viral-share-dialog {
        padding: 22px 14px 18px;
        border-radius: 20px;
        max-width: 100%;
        margin: auto;
    }
    .viral-share-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-bottom: 16px;
    }
    .viral-share-item {
        padding: 10px 4px;
        min-height: 60px;
        border-radius: 12px;
    }
    .viral-share-icon {
        width: 24px;
        height: 24px;
    }
    .viral-share-icon svg {
        width: 22px;
        height: 22px;
    }
    .viral-share-name {
        font-size: 11px;
    }
    .viral-copy-section {
        padding: 10px 12px;
    }
    .viral-copy-input {
        font-size: 12px;
    }
    .viral-copy-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
}

/* ═══════════════════════════════════════════════════════════
   🎁 Стили заслуженной скидки за репост и рекомендации друга
   ═══════════════════════════════════════════════════════════ */

.offer-pricing-shared-old {
    display: inline-block !important;
    font-size: 0.52em !important;
    font-weight: 700 !important;
    text-decoration: line-through !important;
    color: rgba(255, 255, 255, 0.45) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.45) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    filter: none !important;
    margin-right: 12px !important;
    vertical-align: middle !important;
}

.reward-discount-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(59, 130, 246, 0.22) 100%) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.65) !important;
    border-radius: 9999px !important;
    padding: 10px 22px !important;
    margin: 0 auto 20px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.28) !important;
    animation: pulseRewardBadge 2.5s ease-in-out infinite !important;
    max-width: 95% !important;
}

.reward-discount-badge .badge-icon {
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
}

.reward-discount-badge .badge-text {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@keyframes pulseRewardBadge {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
        border-color: rgba(52, 211, 153, 0.55);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 26px rgba(16, 185, 129, 0.45);
        border-color: rgba(52, 211, 153, 0.95);
        transform: scale(1.02);
    }
}

/* Toast-уведомление при разблокировке скидки */
.shared-reward-toast {
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-30px) !important;
    z-index: 1000300 !important;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.75) !important;
    border-radius: 16px !important;
    padding: 14px 22px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.35) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    max-width: calc(100% - 32px) !important;
    box-sizing: border-box !important;
}

.shared-reward-toast.visible {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

.shared-reward-toast .toast-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #f8fafc !important;
    font-size: 0.95rem !important;
    font-weight: 650 !important;
    line-height: 1.4 !important;
}

.shared-reward-toast .toast-icon {
    font-size: 1.4rem !important;
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .reward-discount-badge {
        font-size: 0.88rem !important;
        padding: 8px 16px !important;
        margin-bottom: 14px !important;
    }
    .offer-pricing-shared-old {
        font-size: 0.6em !important;
        margin-right: 8px !important;
    }
}

