/* Basic styling for the translator elements */
#translation-wrapper {
    margin-bottom: 0em;
    padding: 1em;
     */
    border: 0.1px solid #e5e7eb; /* Subtle border */
    border-radius: 0.75rem; /* Rounded corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Soft shadow */
    font-family: 'Inter', sans-serif; /* Inter font */
}

.translator-controls {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem; /* Space between elements */
    margin-bottom: 1.5rem;
    align-items: center;
}

.translator-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db; /* Light border */
    border-radius: 0.5rem; /* Rounded corners */
    background-color: #ffffff; /* White background */
    font-size: 1rem;
    line-height: 1.5;
    color: #374151; /* Dark gray text */
    appearance: none; /* Remove default select arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E"); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em;
    cursor: pointer;
    flex-grow: 1; /* Allow select to grow */
    max-width: 100%; /* Ensure it doesn't overflow */
}

.translator-select:focus {
    outline: none;
    border-color: #2563eb; /* Blue border on focus */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); /* Blue shadow on focus */
}

.translator-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    background-color: #2563eb; /* Blue background */
    color: #ffffff; /* White text */
    font-size: 1rem;
    font-weight: 600; /* Semi-bold */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Prevent button from shrinking */
}

.translator-button:hover {
    background-color: #1d4ed8; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.translator-button:disabled {
    background-color: #9ca3af; /* Gray when disabled */
    cursor: not-allowed;
    box-shadow: none;
}

.translator-output {
    margin-top: 1.5rem;
    
    
    
    min-height: 20px; /* Ensure some height even if empty */
    
    line-height: 1.6;
}


.translator-output p:last-child {
    margin-bottom: 0;
}

.translator-loading {
    color: #6b7280; /* Gray text for loading */
    font-style: italic;
    text-align: center;
}

.translator-placeholder {
    color: #9ca3af; /* Lighter gray for placeholder text */
    font-style: italic;
    text-align: center;
    padding: 1em;
}

.translator-notification {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.translator-error {
    background-color: #fee2e2; /* Light red background */
    border: 1px solid #ef4444; /* Red border */
    color: #be123c; /* Dark red text */
}

.translator-warning {
    background-color: #fffbcc; /* Light yellow background */
    border: 1px solid #f7e33d; /* Yellow border */
    color: #92400e; /* Dark orange text */
}

.translator-debug-glossary {
    background-color: #e0f2fe; /* Light blue for debug */
    border: 1px solid #38bdf8; /* Blue border */
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #0c4a6e; /* Dark blue text */
}

.translator-debug-glossary pre {
    white-space: pre-wrap; /* Preserve whitespace and wrap long lines */
    word-break: break-all; /* Break long words */
    margin-top: 0.5rem;
    background-color: #bfdbfe; /* Lighter blue for preformatted text */
    padding: 0.75rem;
    border-radius: 0.25rem;
    overflow-x: auto; /* Enable horizontal scrolling for very long lines */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .translator-controls {
        flex-direction: column; /* Stack elements vertically on small screens */
        align-items: stretch; /* Stretch items to full width */
    }

    .translator-select,
    .translator-button {
        width: 100%; /* Full width on small screens */
    }
}
