/* ==========================================================================
   Redirect Checker Tool
   ========================================================================== */

/* ── Tool layout ─────────────────────────────────────────────────────────── */
.rdc-tool {
    padding: 3em 0;
}

.rdc-tool__layout {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

@media only screen and (min-width: 900px) {
    .rdc-tool__layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        gap: 2.5em;
        align-items: start;
    }
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.rdc-tool__form-wrap {
    display: flex;
    flex-direction: column;
    gap: 1em;
    position: sticky;
    top: 1em;
}

.rdc-tool__form-title {
    font-size: 1.2rem;
    margin: 0;
    color: #272727;
}

.rdc-input-row {
    display: flex;
    gap: 0.5em;
}

.rdc-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;
}

.rdc-input:focus {
    outline: none;
    border-color: #ffde00;
    box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.2);
}

.rdc-input--error {
    border-color: #e74c3c;
    animation: rdcShake 0.3s ease;
}

@keyframes rdcShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

.rdc-submit {
    flex-shrink: 0;
    padding: 0.7em 1.5em;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rdc-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── User-Agent select ───────────────────────────────────────────────────── */
.rdc-ua-row {
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-size: 0.85rem;
    color: #555;
}

.rdc-ua-label {
    font-weight: 600;
    color: #444;
    flex-shrink: 0;
}

.rdc-ua-select {
    flex: 1;
    padding: 0.5em 0.8em;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #272727;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
}

.rdc-ua-select:focus {
    outline: none;
    border-color: #ffde00;
}

/* ── Captcha ─────────────────────────────────────────────────────────────── */
.rdc-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;
}

.rdc-captcha-wrap--hidden {
    max-height: 0;
    min-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.rdc-hint {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* ── Results panel ───────────────────────────────────────────────────────── */
.rdc-results {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.rdc-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85em 1.25em;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.rdc-results__title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
}

.rdc-results__status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.8em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rdc-results__status--running {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
    animation: rdcPulse 1.4s ease-in-out infinite;
}
.rdc-results__status--clean       { background: rgba(39, 174, 96, 0.12);   color: #27ae60; }
.rdc-results__status--ok          { background: rgba(39, 174, 96, 0.10);   color: #2ecc71; }
.rdc-results__status--caution     { background: rgba(243, 156, 18, 0.15);  color: #e67e22; }
.rdc-results__status--problematic { background: rgba(230, 126, 34, 0.18);  color: #d35400; }
.rdc-results__status--bad,
.rdc-results__status--loop,
.rdc-results__status--error       { background: rgba(231, 76, 60, 0.12);   color: #c0392b; }

@keyframes rdcPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* ── Check rows ──────────────────────────────────────────────────────────── */
.rdc-checks {
    padding: 0.5em 0;
    max-height: 580px;
    overflow-y: auto;
}

/* Demo-режим */
.rdc-results--demo .rdc-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;
}

.rdc-results--demo .rdc-results__header {
    opacity: 0.65;
}

/* Skeleton */
.rdc-check-row--skeleton .rdc-check-icon {
    background: #ececec;
    color: transparent;
}
.rdc-check-row--skeleton .rdc-check-label {
    color: #888;
}

.rdc-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: rdcSkeletonShimmer 1.8s ease-in-out infinite;
}
.rdc-skeleton--sm       { width: 70px;  }
.rdc-skeleton--md       { width: 140px; }
.rdc-skeleton--lg       { width: 200px; }
.rdc-skeleton--label    { width: 110px; height: 0.9em; }
.rdc-skeleton--label-sm { width: 80px;  height: 0.9em; }

@keyframes rdcSkeletonShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.rdc-check-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 150px) minmax(0, 1fr);
    align-items: start;
    padding: 0.55em 1.25em;
    gap: 0.25em 0.75em;
    border-bottom: 1px solid #f5f5f5;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media only screen and (max-width: 600px) {
    .rdc-check-row {
        grid-template-columns: 28px 1fr;
    }
    .rdc-check-row .rdc-check-text {
        grid-column: 2 / 3;
        text-align: left;
    }
}

.rdc-check-row:last-child {
    border-bottom: none;
}

.rdc-check-row--new {
    opacity: 0;
    transform: translateX(-6px);
}

.rdc-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;
}

.rdc-check-row--ok      .rdc-check-icon { background: #e8f8ef; color: #27ae60; }
.rdc-check-row--error   .rdc-check-icon { background: #fdecea; color: #c0392b; }
.rdc-check-row--warn    .rdc-check-icon { background: #fef9e7; color: #e67e22; }
.rdc-check-row--info    .rdc-check-icon { background: #eaf4fb; color: #2980b9; }
.rdc-check-row--running .rdc-check-icon { background: #eaf4fb; color: #2980b9; animation: rdcPulse 1.2s infinite; }

.rdc-check-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    word-break: break-word;
}

.rdc-check-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.rdc-check-row--error .rdc-check-text { color: #c0392b; }
.rdc-check-row--warn  .rdc-check-text { color: #b9651a; }
.rdc-check-row--ok    .rdc-check-text { color: #1e8449; }
.rdc-check-row--info  .rdc-check-text { color: #444; }

/* ── Verdict block ───────────────────────────────────────────────────────── */
.rdc-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;
}

.rdc-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
    flex-shrink: 0;
}

.rdc-score-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: border-color 0.4s ease;
}

.rdc-score-circle--clean       { border-color: #27ae60; }
.rdc-score-circle--ok          { border-color: #2ecc71; }
.rdc-score-circle--caution     { border-color: #e67e22; }
.rdc-score-circle--problematic { border-color: #d35400; }
.rdc-score-circle--bad         { border-color: #c0392b; }
.rdc-score-circle--loop        { border-color: #c0392b; }
.rdc-score-circle--error       { border-color: #95a5a6; }

.rdc-score-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #272727;
    line-height: 1;
}

.rdc-score-label {
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
}

.rdc-verdict-info {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.rdc-verdict {
    font-size: 1.3rem;
    font-weight: 700;
}

.rdc-verdict--clean       { color: #27ae60; }
.rdc-verdict--ok          { color: #2ecc71; }
.rdc-verdict--caution     { color: #e67e22; }
.rdc-verdict--problematic { color: #d35400; }
.rdc-verdict--bad         { color: #c0392b; }
.rdc-verdict--loop        { color: #c0392b; }
.rdc-verdict--error       { color: #7f8c8d; }

.rdc-summary {
    font-size: 0.85rem;
    color: #777;
    overflow-wrap: anywhere;
}

/* ── Share ───────────────────────────────────────────────────────────────── */
.rdc-share {
    width: 100%;
    margin-top: 0.25em;
}

.rdc-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;
}

.rdc-share-btn:hover {
    border-color: #ffde00;
    color: #272727;
    background: #fffdf0;
}

/* ==========================================================================
   Result page (result.php)
   ========================================================================== */
.rdc-result-section {
    padding: 3em 0;
    max-width: 880px;
    margin: 0 auto;
}

.rdc-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;
}

.rdc-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;
}

.rdc-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;
}

.rdc-verdict-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3em 0.9em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rdc-verdict-badge--clean       { background: #e8f8ef; color: #27ae60; }
.rdc-verdict-badge--ok          { background: #eafaf1; color: #2ecc71; }
.rdc-verdict-badge--caution     { background: #fef9e7; color: #e67e22; }
.rdc-verdict-badge--problematic { background: #fbe9d8; color: #d35400; }
.rdc-verdict-badge--bad         { background: #fdecea; color: #c0392b; }
.rdc-verdict-badge--loop        { background: #fdecea; color: #c0392b; }
.rdc-verdict-badge--error       { background: #f2f3f4; color: #7f8c8d; }

.rdc-score-row {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.rdc-saved-summary {
    font-size: 0.9rem;
    color: #555;
    flex: 1;
    min-width: 200px;
    line-height: 1.55;
}

.rdc-saved-summary strong { color: #272727; }
.rdc-saved-summary code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    word-break: break-all;
}

.rdc-checks-list {
    padding: 0.5em 0;
}

.rdc-saved-date {
    font-size: 0.78rem;
    color: #bbb;
    padding: 0.75em 1.25em;
    margin: 0;
    border-top: 1px solid #f0f0f0;
}

.rdc-result-actions {
    text-align: center;
}

/* Раскрываемые заголовки в сохранённой строке */
.rdc-hop-details {
    margin-top: 0.4em;
    font-size: 0.78rem;
}

.rdc-hop-details summary {
    cursor: pointer;
    color: #2980b9;
    list-style: none;
    user-select: none;
}
.rdc-hop-details summary::-webkit-details-marker { display: none; }
.rdc-hop-details summary::before { content: '▸ '; transition: transform 0.2s ease; }
.rdc-hop-details[open] summary::before { content: '▾ '; }

.rdc-hop-headers {
    margin-top: 0.5em;
    padding: 0.6em 0.8em;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.rdc-hop-header {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.2em;
    line-height: 1.4;
    word-break: break-all;
}

.rdc-hop-header:last-child { margin-bottom: 0; }

.rdc-hop-header-name {
    color: #999;
    flex-shrink: 0;
    font-weight: 600;
    text-transform: lowercase;
}

.rdc-hop-header-value {
    color: #444;
    overflow-wrap: anywhere;
}

/* Not found */
.rdc-not-found {
    text-align: center;
    padding: 3em 1em;
}

.rdc-not-found-icon {
    font-size: 3rem;
    margin-bottom: 1em;
}

.rdc-not-found h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
    color: #272727;
}

.rdc-not-found p {
    color: #777;
    margin-bottom: 1.5em;
}

/* ==========================================================================
   Shared tool styles (How it works, Features, FAQ)
   — те же что в email-validator.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; }
