/* ==========================================================================
   HTML to Text Converter Tool
   ========================================================================== */

/* Converter Tool */
.converter-tool {
    padding: 3em 0;
}

.converter-tool_grid {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

@media only screen and (min-width: 885px) {
    .converter-tool_grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1.5em;
        row-gap: 1em;
        align-items: stretch;
    }
}

.converter-tool_panel {
    display: flex;
    flex-direction: column;
}

.converter-tool_panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}

.converter-tool_panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin: 0;
}

.converter-tool_textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 350px;
    padding: 1.25em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: #fff;
    color: #272727;
    flex: 1;
}

.converter-tool_textarea:focus {
    outline: none;
    border-color: #ffde00;
    box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.2);
}

.converter-tool_textarea--output {
    background: #fafafa;
    cursor: default;
}

.converter-tool_textarea--output:focus {
    border-color: #ccc;
    box-shadow: none;
}

.converter-tool_actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1em;
    padding: 0.5em 0;
    position: relative;
    z-index: 2;
}

@media only screen and (min-width: 885px) {
    .converter-tool_actions {
        grid-column: 1 / -1;
        padding: 0.5em 0;
    }
}

.converter-tool_convert-btn {
    white-space: nowrap;
    padding: 0.75em 1.5em !important;
    font-size: 1rem !important;
}

.converter-tool_btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.4em 0.8em;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.converter-tool_btn:hover {
    border-color: #999;
    color: #272727;
    background: #f5f5f5;
}

.converter-tool_btn--clear {
    border: none;
    color: #999;
    font-size: 0.8rem;
}

.converter-tool_btn--clear:hover {
    color: #e74c3c;
    background: none;
}

.converter-tool_btn--copied,
.converter-tool_btn--pasted {
    border-color: #27ae60 !important;
    color: #27ae60 !important;
    background: #f0faf0 !important;
}

/* Illustration */
.converter-illustration {
    display: flex;
    align-items: stretch;
    gap: 1.5em;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 2em;
    border: 1px solid #eee;
}

@media only screen and (max-width: 600px) {
    .converter-illustration {
        flex-direction: column;
        align-items: center;
    }
}

.converter-illustration_before,
.converter-illustration_after {
    flex: 1;
    min-width: 0;
}

.converter-illustration_label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.75em;
}

.converter-illustration_before .converter-illustration_label {
    background: #ffde00;
    color: #272727;
}

.converter-illustration_after .converter-illustration_label {
    background: #272727;
    color: #ffde00;
}

.converter-illustration_code {
    font-family: 'SFMono-Regular', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: #555;
}

.converter-illustration_text {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #272727;
}

.converter-illustration_arrow {
    display: flex;
    align-items: center;
    font-size: 2rem;
    color: #ccc;
    font-weight: 300;
}

/* Features */
.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.1rem;
    margin-bottom: 0.5em;
    color: #272727;
}

.tool-feature_desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* How it works */
.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;
}

.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.1rem;
    margin-bottom: 0.5em;
    color: #272727;
}

.tool-step_desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* FAQ */
.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 0;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2em;
    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: '−';
}

.tool-faq_answer {
    padding: 0 0 1.25em;
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

.tool-faq_answer p {
    margin: 0;
}

/* CTA */
.tool-cta {
    text-align: center;
    padding: 3em 0;
    border-top: 1px solid #eee;
}

.tool-cta_title {
    font-size: 1.75rem;
    margin-bottom: 0.5em;
}

.tool-cta_desc {
    font-size: 1.05rem;
    color: #666;
    max-width: 560px;
    margin: 0 auto 1.5em;
    line-height: 1.6;
}
