/* css/tools/fancy-text.css */

.tool-page-main {
    padding: 1.5rem 0 2.5rem 0;
    /* Top and bottom padding for the main content area */
}

.tool-article {
    /* Wrapper for all content on the tool page */
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .tool-article {
        padding: 2rem;
    }
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    /* Responsive font size */
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tool-header .tool-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-interactive-area {
    margin-bottom: 2.5rem;
}

.text-input-area {
    margin-bottom: 2rem;
    /* background-color: #f9f9f9; */
    /* Optional distinct background */
    /* padding: 1.5rem; */
    /* border-radius: var(--border-radius); */
    /* box-shadow: inset 0 1px 3px rgba(0,0,0,0.06); */
}

.text-input-area label.sr-only {
    /* For accessibility, hidden visually */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-input-area textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #ccd0d5;
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, .20);
}

.input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0 0.25rem;
}

.btn.btn-small {
    /* Smaller button variant */
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

#clearTextBtn {
    background-color: var(--secondary-color);
    color: #fff;
}

#clearTextBtn:hover {
    background-color: #545b62;
}

#charCount {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.output-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Responsive columns */
    gap: 1.25rem;
    /* Space between items */
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e0e0e0;
    /* Separator */
}

.output-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.output-item:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.output-item .style-name {
    font-size: 0.75rem;
    font-weight: 600;
    /* Semibold */
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.output-item .fancy-text-preview {
    font-size: 1.25rem;
    /* Default size, can be overridden by specific font styles if needed */
    background-color: #f8f9fa;
    /* Light background for preview */
    padding: 0.75rem;
    border-radius: calc(var(--border-radius) - 3px);
    margin-bottom: 0.75rem;
    overflow-wrap: break-word;
    word-break: break-all;
    min-height: 48px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    line-height: 1.4;
    /* Improved line height for fancy fonts */
    border: 1px solid #e9ecef;
}

.output-item .copy-fancy-text-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    align-self: flex-start;
}

.output-item .copy-fancy-text-btn:hover {
    background-color: #0056b3;
}

.output-item .copy-fancy-text-btn:active {
    transform: scale(0.97);
}

.output-item .copy-fancy-text-btn.copied {
    background-color: #28a745;
    cursor: default;
}

.output-item .copy-fancy-text-btn.copied:hover {
    background-color: #218838;
}


.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

/* Content Sections (How to Use, Why Best) Styling */
.content-section {
    padding: 2.5rem 0;
    /* border-top: 1px solid #dee2e6; */
    /* Using margin for separation */
    margin-top: 2rem;
}

.tool-interactive-area+.content-section {
    /* First content section after tool */
    margin-top: 3rem;
}


.content-section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.75rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 0.5rem;
}

/* Optional: Underline effect for H2 */
.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}


.alt-bg-tool {
    background-color: var(--section-alt-bg);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    /* For full-width background effect if container has padding: */
    /* margin-left: calc(-1 * (100vw - 100% + 30px) / 2); /* 30px is container's L+R padding */
    /* margin-right: calc(-1 * (100vw - 100% + 30px) / 2); */
    /* padding-left: calc((100vw - 100% + 30px) / 2); */
    /* padding-right: calc((100vw - 100% + 30px) / 2); */
    border-radius: var(--border-radius);
}

.steps-list,
.features-list {
    list-style: none;
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto;
}

.steps-list li {
    background-color: #fff;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid #e9ecef;
}

.steps-list li::before {
    /* Step counter */
    content: counter(step-counter);
    /* Assumes parent has counter-reset: step-counter; */
    counter-increment: step-counter;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.steps-list {
    counter-reset: step-counter;
}


.steps-list li strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.features-list li {
    background-color: #fff;
    padding: 1rem 1rem 1rem 2.5rem;
    /* Space for icon */
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid #e9ecef;
}

.features-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 1rem;
    top: 0.9rem;
    /* Adjust vertical alignment */
    font-size: 1.1rem;
}

.related-tools-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.related-tools-grid .card {
    /* Inherits styles from home.css via style.css cascade if .card is general enough */
    /* Or add specific overrides if needed */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .output-container {
        grid-template-columns: 1fr;
        /* Single column for output items on smaller screens */
    }

    .alt-bg-tool {
        /* Simplify full-width background for mobile */
        margin-left: -15px;
        /* Assuming container padding is 15px */
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .tool-header h1 {
        font-size: 1.6rem;
    }

    .tool-header .tool-subtitle {
        font-size: 0.95rem;
    }

    .content-section h2 {
        font-size: 1.4rem;
    }

    .output-item .fancy-text-preview {
        font-size: 1.15rem;
        /* Slightly smaller preview on very small screens */
    }
}