/* ==========================================================================
   RSS Validator Tool
   ========================================================================== */

/* ── Tool layout ─────────────────────────────────────────────────────────── */
.rssv-tool {
    padding: 3em 0;
}

.rssv-tool__layout {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

@media only screen and (min-width: 900px) {
    .rssv-tool__layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        gap: 2.5em;
        align-items: start;
    }
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.rssv-tool__form-wrap {
    display: flex;
    flex-direction: column;
    gap: 1em;
    position: sticky;
    top: 1em;
}

.rssv-tool__form-title {
    font-size: 1.2rem;
    margin: 0;
    color: #272727;
}

/* Вкладки «по адресу» / «вставить XML» */
.rssv-tabs {
    display: flex;
    gap: 0.35em;
    border-bottom: 2px solid #f0f0f0;
}

.rssv-tab {
    padding: 0.55em 1em;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-family: inherit;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.rssv-tab:hover { color: #444; }

.rssv-tab--active {
    color: #272727;
    font-weight: 600;
    border-bottom-color: #ffde00;
}

.rssv-input-row {
    display: flex;
    gap: 0.5em;
}

.rssv-input {
    flex: 1;
    min-width: 0;
    padding: 0.7em 1em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #272727;
    background: #fff;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.rssv-textarea {
    width: 100%;
    min-height: 180px;
    padding: 0.7em 1em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #272727;
    background: #fff;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.rssv-input:focus,
.rssv-textarea:focus {
    outline: none;
    border-color: #ffde00;
    box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.2);
}

.rssv-input--error {
    border-color: #e74c3c;
    animation: rssvShake 0.3s ease;
}

@keyframes rssvShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

.rssv-submit {
    width: 100%;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rssv-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Captcha ─────────────────────────────────────────────────────────────── */
.rssv-captcha-wrap {
    min-height: 84px;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
    overflow: hidden;
    max-height: 120px;
    opacity: 1;
}

.rssv-captcha-wrap--hidden {
    max-height: 0;
    min-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.rssv-hint {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* ── Results panel ───────────────────────────────────────────────────────── */
.rssv-results {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.rssv-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85em 1.25em;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.rssv-results__title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
}

.rssv-results__status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.8em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rssv-results__status--running {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
    animation: rssvPulse 1.4s ease-in-out infinite;
}
.rssv-results__status--valid      { background: rgba(39, 174, 96, 0.12);  color: #27ae60; }
.rssv-results__status--valid_warn { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.rssv-results__status--invalid,
.rssv-results__status--error      { background: rgba(231, 76, 60, 0.12);  color: #c0392b; }

@keyframes rssvPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* ── Группы проверок ─────────────────────────────────────────────────────── */
.rssv-checks {
    padding: 0.25em 0;
    max-height: 640px;
    overflow-y: auto;
}

.rssv-results--demo .rssv-checks {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0,0,0,0.35) 70%, rgba(0,0,0,0) 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0,0,0,0.35) 70%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    user-select: none;
    max-height: none;
    overflow: hidden;
}

.rssv-results--demo .rssv-results__header { opacity: 0.65; }

.rssv-group__title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaa;
    padding: 1em 1.25em 0.4em;
}

.rssv-group:first-child .rssv-group__title { padding-top: 0.75em; }

/* ── Строки проверок ─────────────────────────────────────────────────────── */
.rssv-check-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    padding: 0.5em 1.25em;
    gap: 0.75em;
    border-bottom: 1px solid #f5f5f5;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.rssv-check-row:last-child { border-bottom: none; }

.rssv-check-row--new {
    opacity: 0;
    transform: translateX(-6px);
}

.rssv-check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.rssv-check-row--ok    .rssv-check-icon { background: #e8f8ef; color: #27ae60; }
.rssv-check-row--error .rssv-check-icon { background: #fdecea; color: #c0392b; }
.rssv-check-row--warn  .rssv-check-icon { background: #fef9e7; color: #e67e22; }
.rssv-check-row--info  .rssv-check-icon { background: #eaf4fb; color: #2980b9; }

.rssv-check-body {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    min-width: 0;
}

.rssv-check-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.rssv-check-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rssv-check-row--error .rssv-check-text { color: #c0392b; }
.rssv-check-row--warn  .rssv-check-text { color: #b9651a; }

/* ── Превью записей ──────────────────────────────────────────────────────── */
.rssv-preview-wrap,
.rssv-macros-wrap {
    border-top: 2px solid #f0f0f0;
    padding: 1.25em;
}

.rssv-block-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaa;
    margin: 0 0 0.9em;
}

.rssv-preview-item {
    display: flex;
    gap: 0.85em;
    padding: 0.65em 0;
    border-bottom: 1px solid #f5f5f5;
}

.rssv-preview-item:last-child { border-bottom: none; }

.rssv-preview-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f5f5f5;
}

.rssv-preview-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.rssv-preview-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.rssv-preview-title a {
    color: #272727;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 222, 0, 0.8);
}

.rssv-preview-title a:hover { color: #000; }

.rssv-preview-date {
    font-size: 0.76rem;
    color: #aaa;
}

.rssv-preview-excerpt {
    font-size: 0.83rem;
    color: #777;
    line-height: 1.45;
}

/* ── Макросы рассылки ────────────────────────────────────────────────────── */
.rssv-macro {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    padding: 0.35em 0;
    flex-wrap: wrap;
}

.rssv-macro-icon {
    font-size: 0.75rem;
    font-weight: 700;
    width: 1em;
    flex-shrink: 0;
}

.rssv-macro--ok .rssv-macro-icon { color: #27ae60; }
.rssv-macro--no .rssv-macro-icon { color: #c0392b; }

.rssv-macro-name {
    font-size: 0.82rem;
    background: #f5f5f5;
    padding: 2px 7px;
    border-radius: 5px;
    color: #272727;
    white-space: nowrap;
}

.rssv-macro--no .rssv-macro-name {
    color: #999;
    text-decoration: line-through;
}

.rssv-macro-desc {
    font-size: 0.82rem;
    color: #888;
}

/* ── Вердикт ─────────────────────────────────────────────────────────────── */
.rssv-verdict-wrap {
    padding: 1.5em 1.25em 1.25em;
    border-top: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1.25em;
    flex-wrap: wrap;
}

.rssv-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
    flex-shrink: 0;
}

.rssv-score-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.4s ease;
}

.rssv-score-circle--valid      { border-color: #27ae60; }
.rssv-score-circle--valid_warn { border-color: #e67e22; }
.rssv-score-circle--invalid    { border-color: #c0392b; }
.rssv-score-circle--error      { border-color: #95a5a6; }

.rssv-score-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #272727;
    line-height: 1;
}

.rssv-score-label {
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
}

.rssv-verdict-info {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    align-items: flex-start;
}

.rssv-verdict {
    font-size: 1.3rem;
    font-weight: 700;
}

.rssv-verdict--valid      { color: #27ae60; }
.rssv-verdict--valid_warn { color: #e67e22; }
.rssv-verdict--invalid    { color: #c0392b; }
.rssv-verdict--error      { color: #7f8c8d; }

.rssv-summary {
    font-size: 0.85rem;
    color: #777;
    overflow-wrap: anywhere;
}

.rssv-esp-badge {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.28em 0.85em;
    border-radius: 20px;
}

.rssv-esp-badge--ready     { background: #e8f8ef; color: #27ae60; }
.rssv-esp-badge--partial   { background: #fef9e7; color: #e67e22; }
.rssv-esp-badge--not_ready { background: #fdecea; color: #c0392b; }
.rssv-esp-badge--unknown   { display: none; }

/* ── Share ───────────────────────────────────────────────────────────────── */
.rssv-share {
    width: 100%;
    margin-top: 0.25em;
}

.rssv-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5em 1em;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.rssv-share-btn:hover {
    border-color: #ffde00;
    color: #272727;
    background: #fffdf0;
}

/* ── Демо-скелет ─────────────────────────────────────────────────────────── */
.rssv-check-row--skeleton .rssv-check-icon {
    background: #ececec;
    color: transparent;
}

.rssv-skeleton {
    display: inline-block;
    height: 0.85em;
    vertical-align: middle;
    border-radius: 4px;
    background: linear-gradient(90deg, #ececec 0%, #f5f5f5 50%, #ececec 100%);
    background-size: 200% 100%;
    animation: rssvSkeletonShimmer 1.8s ease-in-out infinite;
}
.rssv-skeleton--sm { width: 90px;  }
.rssv-skeleton--md { width: 170px; }
.rssv-skeleton--lg { width: 240px; }

@keyframes rssvSkeletonShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ==========================================================================
   Result page (result.php)
   ========================================================================== */
.rssv-result-section {
    padding: 3em 0;
    max-width: 880px;
    margin: 0 auto;
}

.rssv-saved-result {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    margin-bottom: 1.5em;
}

.rssv-saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.25em;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 0.5em;
}

.rssv-saved-target {
    font-size: 0.95rem;
    font-weight: 600;
    color: #272727;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.rssv-verdict-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3em 0.9em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rssv-verdict-badge--valid      { background: #e8f8ef; color: #27ae60; }
.rssv-verdict-badge--valid_warn { background: #fef9e7; color: #e67e22; }
.rssv-verdict-badge--invalid    { background: #fdecea; color: #c0392b; }
.rssv-verdict-badge--error      { background: #f2f3f4; color: #7f8c8d; }

.rssv-score-row {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.rssv-saved-summary {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    min-width: 200px;
    line-height: 1.55;
}

.rssv-saved-summary strong { color: #272727; }
.rssv-saved-summary code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    word-break: break-all;
}

.rssv-saved-date {
    font-size: 0.78rem;
    color: #bbb;
    padding: 0.75em 1.25em;
    margin: 0;
    border-top: 1px solid #f0f0f0;
}

.rssv-result-actions { text-align: center; }

.rssv-not-found {
    text-align: center;
    padding: 3em 1em;
}

.rssv-not-found-icon {
    font-size: 3rem;
    margin-bottom: 1em;
}

.rssv-not-found h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
    color: #272727;
}

.rssv-not-found p {
    color: #777;
    margin-bottom: 1.5em;
}

/* ==========================================================================
   Shared tool styles (How it works, Features, FAQ)
   — те же что в redirect-checker.css; продублированы для standalone-страницы.
   ========================================================================== */

.tool-features {
    padding: 3em 0;
    border-top: 1px solid #eee;
}
.tool-features_title {
    text-align: center;
    margin-bottom: 2em;
    font-size: 1.75rem;
}
.tool-feature {
    text-align: center;
    padding: 1.5em 1em;
}
.tool-feature_icon { margin-bottom: 1em; }
.tool-feature_heading {
    font-size: 1.05rem;
    margin-bottom: 0.5em;
    color: #272727;
}
.tool-feature_desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #666;
}

.tool-how-it-works {
    padding: 3em 0;
    border-top: 1px solid #eee;
}
.tool-how-it-works_title {
    text-align: center;
    margin-bottom: 2em;
    font-size: 1.75rem;
}
.tool-step {
    text-align: center;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.tool-step_number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffde00;
    color: #272727;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1em;
}
.tool-step_heading {
    font-size: 1.05rem;
    margin-bottom: 0.5em;
    color: #272727;
}
.tool-step_desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #666;
}

.tool-faq {
    padding: 3em 0;
    border-top: 1px solid #eee;
    max-width: 720px;
    margin: 0 auto;
}
.tool-faq_title {
    text-align: center;
    margin-bottom: 2em;
    font-size: 1.75rem;
}
.tool-faq_item { border-bottom: 1px solid #eee; }
.tool-faq_question {
    padding: 1.25em 2em 1.25em 0;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: #272727;
}
.tool-faq_question::-webkit-details-marker { display: none; }
.tool-faq_question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: #999;
    transition: transform 0.2s ease;
}
details[open] .tool-faq_question::after { content: '\2212'; }
.tool-faq_answer {
    padding: 0 0 1.25em;
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}
.tool-faq_answer p { margin: 0; }
