/* ============================================
   FREE SEO TOOLS - Stuttgart SEO
   Shared styles for /tools section
   ============================================ */

.tool-badge-free {
    display: inline-block;
    background: rgba(20, 122, 98, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Forms (shared with contact-style inputs) ---------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-family: 'Inter', sans-serif;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--anthracite);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--white);
    color: var(--anthracite);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(20, 122, 98, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ---------- Calculator panel ---------- */
.calculator-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
}

.slider-group {
    margin-bottom: 2rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.slider-label-row label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

.slider-value {
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.3rem 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}

.slider-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

input[type="range"].tool-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--light-gray);
    outline: none;
    cursor: pointer;
}

input[type="range"].tool-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"].tool-range::-webkit-slider-thumb:hover {
    background: var(--accent-light);
    transform: scale(1.1);
}

input[type="range"].tool-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}

input[type="range"].tool-range::-moz-range-progress {
    background: var(--accent);
    border-radius: 999px;
}

/* ---------- Results ---------- */
.roi-results {
    background: linear-gradient(135deg, var(--accent) 0%, #0f5c49 100%);
    border-radius: 16px;
    padding: 2.5rem;
    color: var(--white);
    text-align: center;
    position: sticky;
    top: 6.5rem;
}

.roi-results .result-label {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.roi-results .result-figure {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', sans-serif;
}

.roi-results .result-sub {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.75rem;
}

.roi-results .result-divider {
    height: 1px;
    background: rgba(255,255,255,0.25);
    margin: 1.75rem 0;
}

.roi-results .result-secondary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.roi-results .result-secondary > div {
    flex: 1;
}

.roi-results .result-secondary .num {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.roi-results .result-secondary .lbl {
    font-size: 0.8rem;
    opacity: 0.8;
}

.roi-results .btn {
    margin-top: 2rem;
    width: 100%;
    background: var(--white);
    color: var(--accent);
}

.roi-results .btn:hover {
    background: var(--bg-light);
}

/* ---------- Code output / copy ---------- */
.code-output-wrap {
    position: relative;
}

.code-output {
    background: #1c1e21;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    padding-top: 3.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 480px;
    overflow-y: auto;
}

.code-output-toolbar {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

.copy-btn.copied {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* ---------- SERP preview ---------- */
.serp-preview {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    font-family: arial, sans-serif;
}

.serp-preview .serp-favicon-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.serp-preview .serp-favicon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.serp-preview .serp-sitename {
    font-size: 0.85rem;
    color: #202124;
}

.serp-preview .serp-url {
    font-size: 0.8rem;
    color: #4d5156;
}

.serp-preview .serp-title {
    color: #1a0dab;
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0.2rem 0 0.35rem;
    overflow-wrap: anywhere;
    font-family: arial, sans-serif;
    font-weight: 400;
}

.serp-preview .serp-desc {
    color: #4d5156;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.char-counter {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.char-counter.warn {
    color: var(--accent);
}

.char-counter.danger {
    color: #dc2626;
}

/* ---------- Builder rows (robots.txt) ---------- */
.rule-row {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.rule-row select,
.rule-row input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.redirect-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 40px;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.redirect-row select,
.redirect-row input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.rule-remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.rule-remove-btn:hover {
    background: #fecaca;
}

.add-rule-btn {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--accent);
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.add-rule-btn:hover {
    border-color: var(--accent);
    background: rgba(20, 122, 98, 0.05);
}

.bot-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.bot-preset {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.bot-preset input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ---------- Repeatable field rows (hreflang, schema FAQ) ---------- */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr 40px;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.field-row input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

/* ---------- Stat row (content length checker) ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.stat-box .num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}

.stat-box .lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.guidance-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ---------- Plain checklist (no scoring) ---------- */
.checklist-progress {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.checklist-progress .progress-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
}

.checklist-progress .progress-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.checklist-group {
    margin-bottom: 2.5rem;
}

.checklist-group h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--accent);
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checklist-item:hover {
    border-color: var(--accent);
}

.checklist-item.checked {
    background: rgba(20, 122, 98, 0.06);
    border-color: var(--accent);
}

.checklist-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
    cursor: pointer;
}

.checklist-item .item-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.checklist-item .item-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- Two-column tool layout ---------- */
.tool-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

@media (max-width: 992px) {
    .tool-layout,
    .tool-layout.tool-layout-wide {
        grid-template-columns: 1fr;
    }

    .roi-results {
        position: static;
    }

    .bot-preset-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Related tools ---------- */
.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .rule-row,
    .field-row,
    .redirect-row {
        grid-template-columns: 1fr;
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
