/* Styles specific to the Read Time Estimator Tool */

.estimator-container {
    max-width: 800px;
    margin: 1rem auto;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--preview-bg);
}

.estimator-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

/* Input Area */
.input-area {
    margin-bottom: 1.5rem;
}

.input-area label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--label-text);
}

#text-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    resize: vertical;
    min-height: 250px; /* Generous height */
    transition: border-color 0.2s ease;
}

#text-input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}
body.dark-mode #text-input:focus {
     box-shadow: 0 0 0 2px rgba(102, 191, 255, 0.25);
}

/* Settings Area */
.settings-area {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.settings-area label {
    font-weight: 500;
    color: var(--label-text);
    margin-bottom: 0; /* Reset margin for flex alignment */
}

#wpm-input {
    width: 80px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}
/* Hide number input arrows */
#wpm-input::-webkit-outer-spin-button,
#wpm-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#wpm-input {
    -moz-appearance: textfield;
}

/* Results Area */
#results-container {
    margin-top: 1.5rem;
    text-align: center;
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
     box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
body.dark-mode #results-container {
     box-shadow: 0 1px 3px rgba(255,255,255,0.05);
}

#results-container.hidden {
    display: none;
}

#results-container h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--label-text);
    font-weight: 600;
}

.result-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
body.dark-mode .result-value {
    color: var(--accent-color-dark);
}

.word-count-display {
    font-size: 0.9rem;
    color: var(--label-text);
    opacity: 0.8;
}
.word-count-display span {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .estimator-container {
         padding: 1rem 1.2rem;
    }
     #text-input {
        min-height: 200px;
     }
    .result-value {
        font-size: 1.9rem;
    }
}

/* Add these styles */

.settings-area {
    display: flex;
    align-items: center; /* Align items vertically */
    justify-content: center; /* Center items horizontally */
    gap: 1.5rem; /* Increase gap slightly */
    flex-wrap: wrap; /* Allow wrapping */
}

/* Style the new preset group */
.preset-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preset-group label,
.settings-area > label { /* Target direct label for WPM */
    margin-bottom: 0; /* Remove bottom margin for flex alignment */
    white-space: nowrap; /* Prevent label wrapping */
}

.preset-group select {
     padding: 0.5rem 0.8rem;
     border: 1px solid var(--border-color);
     border-radius: 4px;
     font-size: 0.95rem;
     background-color: var(--bg-color);
     color: var(--text-color);
     min-width: 200px; /* Give dropdown some width */
}

#wpm-input {
    /* Keep existing styles, ensure width is appropriate */
    width: 80px;
}

/* Adjustments for smaller screens if needed */
@media (max-width: 600px) {
    .settings-area {
        flex-direction: column; /* Stack items vertically */
        align-items: stretch; /* Stretch items full width */
        gap: 1rem;
    }
    .preset-group select,
    #wpm-input {
        width: 100%; /* Make inputs full width when stacked */
    }
}