/* css/tools/text-to-emoji.css */

.tool-page-main {
    padding: 1.5rem 0 2.5rem 0;
}

.tool-article {
    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);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tool-header h1 .fas {
    margin-right: 0.5rem;
}

.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: 1.5rem;
}

.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: 80px;
    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;
}

#clearTextBtnEmoji {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

#clearTextBtnEmoji:hover {
    background-color: darken(var(--secondary-color), 10%);
}

/* Manual hex or SASS */
#charCountEmoji {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.emoji-converter-controls {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--light-color, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius);
}

.emoji-converter-controls fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.emoji-converter-controls legend {
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    width: 100%;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.emoji-converter-controls .control-group {
    display: flex;
    flex-direction: column;
    /* Default: Stack label and select */
    align-items: stretch;
    /* Make children (label, select) take full width of this flex item */
    margin-bottom: 1rem;
    /* Increased margin slightly */
}

.emoji-converter-controls .control-group:last-child {
    margin-bottom: 0;
}


.emoji-converter-controls label {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: block;
}

.emoji-converter-controls select {
    padding: 0.6rem 0.75rem;
    /* Slightly increased padding */
    border: 1px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background-color: var(--white-color);
    width: 100%;
    /* KEY: Make select take full width of its parent by default */
    max-width: 100%;
    /* KEY: Prevent it from exceeding its parent's width */
    box-sizing: border-box;
    /* KEY: Ensure padding and border are included in the width */
}

/* Special handling for checkbox alignment if it's in a .control-group */
.emoji-converter-controls .control-group label[for="emojiSpaceBetween"] {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    /* Reset margin if side-by-side with checkbox */
    width: auto;
    /* Allow label to size to its content */
}

.emoji-converter-controls input[type="checkbox"] {
    width: auto;
    height: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
    flex-shrink: 0;
    /* Prevent checkbox from shrinking */
}


/* Media query for wider screens */
@media (min-width: 576px) {
    .emoji-converter-controls .control-group {
        flex-direction: row;
        /* Label and select side-by-side */
        align-items: center;
        /* justify-content: space-between; /* This can sometimes cause issues if one item is very wide */
    }

    .emoji-converter-controls label {
        margin-bottom: 0;
        margin-right: 1rem;
        flex-shrink: 0;
        /* Prevent label from shrinking */
        /* Consider a max-width for labels if they can be very long */
        /* max-width: 150px; */
    }

    .emoji-converter-controls select {
        width: auto;
        /* Let flexbox determine the width */
        flex-grow: 1;
        /* Allow select to take available space */
        min-width: 0;
        /* KEY: Allows flex item to shrink below its content's minimum width */
    }

    .emoji-converter-controls .control-group label[for="emojiSpaceBetween"] {
        margin-right: 0.5rem;
        /* Adjust spacing for checkbox label */
    }
}



@media (min-width: 576px) {
    .emoji-converter-controls .control-group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .emoji-converter-controls label {
        margin-bottom: 0;
        margin-right: 1rem;
        flex-shrink: 0;
        /* Prevent label from shrinking too much */
    }

    .emoji-converter-controls select {
        flex-grow: 1;
        /* Allow select to take available space */
    }
}


.output-area-emoji {
    margin-top: 1.5rem;
}

.output-area-emoji .output-box-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

#emojiOutput {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.5rem;
    /* Emojis are often larger */
    border: 1px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius);
    background-color: var(--light-color, #f8f9fa);
    min-height: 100px;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    resize: vertical;
}

#copyEmojiTextBtn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 1rem auto 0 auto;
    font-size: 1.05rem;
}

#copyEmojiTextBtn .fas {
    margin-right: 0.5rem;
}

#copyEmojiTextBtn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: var(--white-color) !important;
}

#copyEmojiTextBtn:hover {
    background-color: #0056b3;
    /* Darker blue on hover */
}

.copy-status-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    min-height: 1.2em;
    text-align: center;
}

/* Content Sections Styling (can reuse general structure) */
.content-section {
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.tool-interactive-area+.content-section {
    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;
}

.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;
    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: var(--box-shadow-light);
    position: relative;
    border: 1px solid var(--border-color);
}

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

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

.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;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
    position: relative;
    border: 1px solid var(--border-color);
}

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

.info-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
    background-color: var(--white-color);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.related-tools-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}