/*
 * tailwind_custom.css
 * Только чистый CSS, который не требует обработки Tailwind-компилятором.
 * @utility / @apply — перенесены в tailwind.src.css и компилируются в tailwind.css.
 */

/* ========== Мобильный touch fix ========== */
/* Убираем 300ms задержку click на iOS Safari и улучшаем tap-отзывчивость */
a, button, [onclick], [role="button"],
input[type="submit"], input[type="button"] {
    touch-action: manipulation;
}

/* ========== Анимации ========== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    /*animation: fadeIn 180ms ease-out both;*/
}

@keyframes backdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-backdrop-in {
    animation: backdropIn 150ms ease-out both;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-modal-in {
    animation: modalIn 200ms ease-out both;
}

/* ========== News content (BlockRenderer output) ========== */
.news-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

/* Параграфы */
.news-content p {
    margin-bottom: 1em;
}
.news-content p:last-child {
    margin-bottom: 0;
}
.news-content p:empty {
    display: none;
}

/* Заголовки */
.news-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.75em 0 0.6em;
    color: #111827;
}
.news-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1.5em 0 0.5em;
    color: #1f2937;
}
.news-content h2:first-child,
.news-content h3:first-child {
    margin-top: 0;
}

/* Anchor links on headings */
.news-content h2,
.news-content h3 {
    position: relative;
    scroll-margin-top: 1.5rem;
}
.news-content .heading-anchor {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4em;
    color: #d1d5db;
    text-decoration: none !important;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.news-content h2:hover .heading-anchor,
.news-content h3:hover .heading-anchor,
.news-content .heading-anchor:focus {
    opacity: 1;
}
.news-content .heading-anchor:hover {
    color: #e6007e;
}
.news-content .heading-anchor svg {
    display: block;
}

/* Списки */
.news-content ul,
.news-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.news-content ul { list-style-type: disc; }
.news-content ol { list-style-type: decimal; }
.news-content li {
    margin-bottom: 0.35em;
    line-height: 1.7;
    padding-left: 0.25em;
}
.news-content li:last-child {
    margin-bottom: 0;
}
.news-content li::marker {
    color: #e6007e;
}

/* Цитаты */
.news-content blockquote {
    border-left: 3px solid #e6007e;
    padding: 0.75em 0 0.75em 1.25em;
    margin: 1.5em 0;
    color: #4b5563;
    font-style: italic;
    background: #fdf2f8;
    border-radius: 0 0.5rem 0.5rem 0;
}
.news-content blockquote p {
    margin-bottom: 0.5em;
}
.news-content blockquote p:last-child {
    margin-bottom: 0;
}
.news-content blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-style: normal;
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Изображения */
.news-content figure.news-image {
    margin: 1.75em 0;
}
.news-content figure.news-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    display: block;
}
.news-content figure.news-image figcaption {
    text-align: center;
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(107, 114, 128, 0.8);
    margin-top: 0.5rem;
}

/* Ссылки */
.news-content a {
    color: #e6007e;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.news-content a:hover {
    color: #bf0069;
}

/* Инлайн-форматирование */
.news-content b,
.news-content strong {
    font-weight: 600;
    color: #111827;
}
.news-content s {
    text-decoration: line-through;
    color: #9ca3af;
}

/* Разделитель (если будет нужен) */
.news-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* CTA block */
.news-content .news-cta-block {
    margin: 2em 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce8f3 100%);
    border: 1px solid #f9c2e0;
    border-radius: 1rem;
    text-align: center;
}
.news-cta-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5em;
}
.news-cta-text {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 1em;
}
.news-content .news-cta-btn,
.news-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1.5rem;
    background: #e6007e;
    color: #fff !important;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none !important;
    transition: background 0.15s;
}
.news-content .news-cta-btn:hover,
.news-cta-btn:hover {
    background: #bf0069;
    color: #fff !important;
    text-decoration: none !important;
}

/* Code / Prompt block */
.news-content .news-code-block {
    margin: 1.5em 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #1e293b;
}
.news-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #334155;
    font-size: 0.75rem;
    color: #94a3b8;
}
.news-code-copy {
    padding: 0.2rem 0.6rem;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    background: transparent;
    color: #94a3b8;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}
.news-code-copy:hover {
    background: #475569;
    color: #e2e8f0;
}
.news-content .news-code-block pre {
    margin: 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
}
.news-content .news-code-block code {
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========== PRO blur (скрытие данных для не-PRO) ========== */
body.body_item_blur .item_blur {
    filter: blur(0.2rem);
}
