/**
 * БезШтрафа.рф — Общие стили инструментов
 */

/* ===========================================
   Tool Hero
   =========================================== */
.tool-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.tool-hero__title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #fff;
}

.tool-hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 680px;
    margin: 0;
    line-height: 1.6;
}

/* ===========================================
   Tool Form
   =========================================== */
.tool-form {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: -1.5rem auto 2.5rem;
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.tool-form__group {
    margin-bottom: 1.25rem;
}

.tool-form__label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.tool-form__input,
.tool-form__textarea,
.tool-form__select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
}

.tool-form__input:focus,
.tool-form__textarea:focus,
.tool-form__select:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
    background: #fff;
}

.tool-form__textarea {
    min-height: 120px;
    resize: vertical;
}

.tool-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: #e63946;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.tool-form__submit:hover {
    background: #d62828;
}

.tool-form__submit:active {
    transform: scale(0.98);
}

.tool-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tool-form__disclaimer {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 0.75rem;
}

/* ===========================================
   Tool Result
   =========================================== */
.tool-result {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    display: none;
}

.tool-result.active {
    display: block;
}

.tool-result__banner {
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.tool-result__banner--success {
    background: #f0faf8;
    border: 2px solid #2a9d8f;
    color: #1a6b60;
}

.tool-result__banner--warning {
    background: #fef9ec;
    border: 2px solid #e9c46a;
    color: #8a6d1b;
}

.tool-result__banner--error {
    background: #fef2f2;
    border: 2px solid #e63946;
    color: #c0392b;
}

.tool-result__banner-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-result__banner-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.tool-result__details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.tool-result__detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.tool-result__detail-row:last-child {
    border-bottom: none;
}

.tool-result__detail-label {
    color: #666;
    font-weight: 500;
}

.tool-result__detail-value {
    font-weight: 600;
    color: #333;
}

.tool-result__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}

.tool-result__option {
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    text-decoration: none;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
}

.tool-result__option:hover {
    border-color: #e63946;
    box-shadow: 0 2px 12px rgba(230, 57, 70, 0.1);
}

.tool-result__option-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.tool-result__option-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.tool-result__cta {
    text-align: center;
    margin-top: 1.5rem;
}

.tool-result__cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
   Tool Content (SEO sections)
   =========================================== */
.tool-content {
    padding: 3rem 0;
}

.tool-content--alt {
    background: #f8f9fa;
}

.tool-content__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 1.25rem;
    line-height: 1.3;
}

.tool-content__subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin: 2rem 0 0.75rem;
}

.tool-content__text {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;
    margin: 0 0 1rem;
    max-width: 800px;
}

.tool-content__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.tool-content__list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.tool-content__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e63946;
}

.tool-content__list--check li::before {
    content: '\2713';
    background: none;
    color: #2a9d8f;
    font-weight: 700;
    font-size: 1rem;
    top: 0.5rem;
    width: auto;
    height: auto;
}

/* ===========================================
   Tool Steps
   =========================================== */
.tool-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.tool-steps__item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #eee;
    position: relative;
}

.tool-steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.tool-steps__heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #1a1a2e;
}

.tool-steps__text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ===========================================
   Tool Table
   =========================================== */
.tool-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 10px;
    border: 1px solid #eee;
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tool-table th,
.tool-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tool-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
}

.tool-table tbody tr:hover {
    background: #fafafa;
}

.tool-table tbody tr:last-child td {
    border-bottom: none;
}


/* ===========================================
   Tool CTA
   =========================================== */
.tool-cta {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.tool-cta__title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
}

.tool-cta__text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.tool-cta .btn--primary {
    background: #e63946;
    color: #fff;
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.tool-cta .btn--primary:hover {
    background: #d62828;
}

/* ===========================================
   Tool TOC (Table of Contents)
   =========================================== */
.tool-toc {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.tool-toc__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #333;
}

.tool-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.tool-toc__list li {
    counter-increment: toc;
    margin-bottom: 0.5rem;
}

.tool-toc__list li a {
    color: #e63946;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.tool-toc__list li a::before {
    content: counter(toc) '. ';
    font-weight: 600;
}

.tool-toc__list li a:hover {
    color: #d62828;
    text-decoration: underline;
}

/* ===========================================
   Checklist
   =========================================== */
.tool-checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
}

.tool-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

.tool-checklist li::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-top: 1px;
    transition: all 0.2s;
}

.tool-checklist li.checked::before {
    background: #2a9d8f;
    border-color: #2a9d8f;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.485 3.515a1 1 0 010 1.414l-7.07 7.07a1 1 0 01-1.415 0l-3.535-3.535a1 1 0 011.414-1.414L5.707 9.879l6.364-6.364a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===========================================
   Visual Mockup (before/after)
   =========================================== */
.tool-mockup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.tool-mockup__item {
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.tool-mockup__item--before {
    background: #fef2f2;
    border: 2px solid #e63946;
}

.tool-mockup__item--after {
    background: #f0faf8;
    border: 2px solid #2a9d8f;
}

.tool-mockup__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.tool-mockup__item--before .tool-mockup__label {
    color: #e63946;
}

.tool-mockup__item--after .tool-mockup__label {
    color: #2a9d8f;
}

.tool-mockup__sign {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
}

.tool-mockup__sign small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ===========================================
   Calculator (soglasovanie)
   =========================================== */
.tool-calculator {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    max-width: 720px;
    margin: 2rem auto;
}

.tool-calculator__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: #1a1a2e;
}

.tool-calculator__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-calculator__result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f0faf8;
    border: 2px solid #2a9d8f;
    border-radius: 10px;
    display: none;
}

.tool-calculator__result.active {
    display: block;
}

.tool-calculator__result-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1a6b60;
    margin: 0 0 0.5rem;
}

.tool-calculator__result-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2a9d8f;
}

.tool-calculator__result-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

/* ===========================================
   Translation Result
   =========================================== */
.tool-translation {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #2a9d8f;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.tool-translation__label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2a9d8f;
    margin-bottom: 0.5rem;
}

.tool-translation__text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.tool-translation__format {
    font-size: 1rem;
    color: #555;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 0.75rem;
    font-family: monospace;
}

.tool-translation__variants {
    margin-top: 1rem;
}

.tool-translation__variant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.tool-translation__variant:last-child {
    border-bottom: none;
}

.tool-translation__rules {
    background: #fef9ec;
    border: 2px solid #e9c46a;
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.25rem;
}

.tool-translation__rules-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #8a6d1b;
    margin-bottom: 0.5rem;
}

.tool-translation__rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-translation__rules li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #5a4a0f;
    line-height: 1.5;
}

.tool-translation__rules li::before {
    content: '!';
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 18px;
    height: 18px;
    background: #e9c46a;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===========================================
   Partner badge
   =========================================== */
.tool-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #999;
    margin-left: 0.5rem;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
    .tool-hero {
        padding: 2rem 0 1.5rem;
    }

    .tool-hero__title {
        font-size: 1.6rem;
    }

    .tool-hero__subtitle {
        font-size: 1rem;
    }

    .tool-form {
        padding: 1.25rem;
        margin: -1rem 0.75rem 2rem;
        border-radius: 12px;
    }

    .tool-content__title {
        font-size: 1.4rem;
    }

    .tool-result__options {
        grid-template-columns: 1fr;
    }

    .tool-mockup {
        grid-template-columns: 1fr;
    }

    .tool-calculator__row {
        grid-template-columns: 1fr;
    }

    .tool-steps {
        grid-template-columns: 1fr;
    }

    .tool-cta__title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .tool-hero__title {
        font-size: 1.35rem;
    }

    .tool-form__submit {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .tool-content__title {
        font-size: 1.25rem;
    }

    .tool-table {
        font-size: 0.85rem;
    }

    .tool-table th,
    .tool-table td {
        padding: 0.625rem 0.75rem;
    }
}
