/* ==========================================================================
   Email Validator Tool
   ========================================================================== */

/* ── Tool layout ─────────────────────────────────────────────────────────── */
.ev-tool {
    padding: 3em 0;
}

.ev-tool__layout {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

@media only screen and (min-width: 900px) {
    .ev-tool__layout {
        display: grid;
        grid-template-columns: 400px 1fr;
        gap: 2.5em;
        align-items: start;
    }
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.ev-tool__form-wrap {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.ev-tool__form-title {
    font-size: 1.2rem;
    margin: 0;
    color: #272727;
}

.ev-input-row {
    display: flex;
    gap: 0.5em;
}

.ev-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;
}

.ev-input:focus {
    outline: none;
    border-color: #ffde00;
    box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.2);
}

.ev-input--error {
    border-color: #e74c3c;
    animation: evShake 0.3s ease;
}

@keyframes evShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

.ev-submit {
    flex-shrink: 0;
    padding: 0.7em 1.5em;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ev-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Captcha ─────────────────────────────────────────────────────────────── */
.ev-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;
}

.ev-captcha-wrap--hidden {
    max-height: 0;
    min-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.ev-hint {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* ── Results panel ───────────────────────────────────────────────────────── */
.ev-results {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.ev-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85em 1.25em;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.ev-results__title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
}

/* Status badge */
.ev-results__status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.8em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ev-results__status--running {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
    animation: evPulse 1.4s ease-in-out infinite;
}
.ev-results__status--valid {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}
.ev-results__status--risky {
    background: rgba(243, 156, 18, 0.15);
    color: #e67e22;
}
.ev-results__status--unknown {
    background: rgba(149, 165, 166, 0.2);
    color: #7f8c8d;
}
.ev-results__status--invalid,
.ev-results__status--error {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

@keyframes evPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── Check rows ──────────────────────────────────────────────────────────── */
.ev-checks {
    padding: 0.5em 0;
}

/* Demo-режим: показывает пример строк результата, пока пользователь не запустил проверку */
.ev-results--demo .ev-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;
}

.ev-results--demo .ev-results__header {
    opacity: 0.65;
}

/* Нейтральная «ожидающая» иконка для демо-строк */
.ev-check-row--skeleton .ev-check-icon {
    background: #ececec;
    color: transparent;
}
.ev-check-row--skeleton .ev-check-label {
    color: #888;
}

/* Skeleton-плейсхолдер с мягкой анимацией shimmer */
.ev-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: evSkeletonShimmer 1.8s ease-in-out infinite;
}
.ev-skeleton--sm       { width: 70px;  }
.ev-skeleton--md       { width: 120px; }
.ev-skeleton--lg       { width: 170px; }
.ev-skeleton--label    { width: 110px; height: 0.9em; }
.ev-skeleton--label-sm { width: 80px;  height: 0.9em; }

@keyframes evSkeletonShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.ev-check-row {
    display: grid;
    grid-template-columns: 28px minmax(0, auto) minmax(0, 1fr);
    align-items: start;
    padding: 0.6em 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) {
    .ev-check-row {
        grid-template-columns: 28px 1fr;
    }
    .ev-check-row .ev-check-text {
        grid-column: 2 / 3;
        text-align: left;
    }
}

.ev-check-row:last-child {
    border-bottom: none;
}

/* Animate in */
.ev-check-row--new {
    opacity: 0;
    transform: translateX(-6px);
}

.ev-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;
}

.ev-check-row--ok    .ev-check-icon { background: #e8f8ef; color: #27ae60; }
.ev-check-row--error .ev-check-icon { background: #fdecea; color: #c0392b; }
.ev-check-row--warn  .ev-check-icon { background: #fef9e7; color: #e67e22; }
.ev-check-row--info  .ev-check-icon { background: #eaf4fb; color: #2980b9; }
.ev-check-row--running .ev-check-icon { background: #eaf4fb; color: #2980b9; animation: evPulse 1.2s infinite; }

.ev-check-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #444;
}

.ev-check-text {
    font-size: 0.82rem;
    color: #777;
    text-align: right;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
}

.ev-check-row--error .ev-check-text { color: #c0392b; }
.ev-check-row--warn  .ev-check-text { color: #e67e22; }
.ev-check-row--ok    .ev-check-text { color: #27ae60; }

/* ── Verdict block ───────────────────────────────────────────────────────── */
.ev-verdict-wrap {
    padding: 1.5em 1.25em 1.25em;
    border-top: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1.5em;
    flex-wrap: wrap;
}

.ev-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25em;
    flex-shrink: 0;
}

.ev-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;
}

.ev-score-circle--valid   { border-color: #27ae60; }
.ev-score-circle--risky   { border-color: #e67e22; }
.ev-score-circle--unknown { border-color: #95a5a6; }
.ev-score-circle--invalid { border-color: #c0392b; }

.ev-score-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #272727;
    line-height: 1;
}

.ev-score-max {
    display: none;
}

.ev-score-label {
    font-size: 0.72rem;
    color: #aaa;
    text-align: center;
}

.ev-verdict {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
}

.ev-verdict--valid   { color: #27ae60; }
.ev-verdict--risky   { color: #e67e22; }
.ev-verdict--unknown { color: #7f8c8d; }
.ev-verdict--invalid { color: #c0392b; }

/* ── Share ───────────────────────────────────────────────────────────────── */
.ev-share {
    width: 100%;
    margin-top: 0.25em;
}

.ev-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;
}

.ev-share-btn:hover {
    border-color: #ffde00;
    color: #272727;
    background: #fffdf0;
}

/* ==========================================================================
   Result page (result.php)
   ========================================================================== */
.ev-result-section {
    padding: 3em 0;
    max-width: 640px;
    margin: 0 auto;
}

.ev-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;
}

.ev-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;
}

.ev-saved-email {
    font-size: 1.1rem;
    font-weight: 600;
    color: #272727;
    font-family: monospace;
}

.ev-verdict-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3em 0.9em;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ev-verdict-badge--valid   { background: #e8f8ef; color: #27ae60; }
.ev-verdict-badge--risky   { background: #fef9e7; color: #e67e22; }
.ev-verdict-badge--unknown { background: #f2f3f4; color: #7f8c8d; }
.ev-verdict-badge--invalid { background: #fdecea; color: #c0392b; }

.ev-score-row {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.25em;
    border-bottom: 1px solid #f0f0f0;
}

.ev-checks-list {
    padding: 0.5em 0;
}

/* Reuse ev-check-row styles from tool */
.ev-saved-date {
    font-size: 0.78rem;
    color: #bbb;
    padding: 0.75em 1.25em;
    margin: 0;
    border-top: 1px solid #f0f0f0;
}

.ev-result-actions {
    text-align: center;
}

.ev-not-found {
    text-align: center;
    padding: 3em 1em;
}

.ev-not-found-icon {
    font-size: 3rem;
    margin-bottom: 1em;
}

.ev-not-found h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
    color: #272727;
}

.ev-not-found p {
    color: #777;
    margin-bottom: 1.5em;
}

/* ==========================================================================
   Shared tool styles (from other tools — FAQ, How it works, Features)
   — already defined in smtp-tester.css, duplicated here for standalone use
   ========================================================================== */

.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;
}
