

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --copy-color: #17a2b8; /* Teal color for copy */
    --copy-hover: #117a8b;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --medium-gray: #dee2e6;
    --dark-gray: #343a40;
    --background-color: #ffffff;
    --text-color: #212529;
    --border-radius: 6px;
}

/* Apply box-sizing universally */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    /* Reset margin, consistent padding */
    margin: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    line-height: 1.5; /* Consistent line-height */
}

.container {
    background-color: var(--background-color);
    /* Consistent padding */
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    width: 100%;
    max-width: 650px; /* Consistent max-width */
    display: flex;
    flex-direction: column;
}

h1 {
    color: var(--dark-gray);
    /* Consistent margins */
    margin: 0 0 3px 0;
    text-align: center;
    font-size: 1.8em; /* Consistent size */
    display: flex; /* Use flex to align title and version */
    align-items: baseline; /* Align text baselines */
    justify-content: center; /* Center the group */
    gap: 8px; /* Space between title and version */
}

/* Version number style */
.version {
    font-size: 0.5em; /* Much smaller */
    font-weight: 400; /* Lighter weight */
    color: var(--secondary-color);
}

.tagline {
    color: var(--secondary-color);
    text-align: center;
    /* Consistent margins */
    margin: 0 0 18px 0;
    font-size: 0.9em;
}

.controls {
    display: flex;
    align-items: center;
    /* Consistent margin/gap */
    margin-bottom: 12px;
    gap: 12px;
    min-height: 50px; /* Ensure consistent height like mic button */
}

#mic-button {
    background-color: var(--secondary-color);
    color: white; /* Ensures icon color is contrast */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    /* Ensure SVG is not accidentally hidden */
    overflow: visible;
}
#mic-button:hover { background-color: var(--secondary-hover); }
#mic-button:active { transform: scale(0.95); }
#mic-button.recording {
    background-color: var(--danger-color);
    animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Ensure mic icon SVG is visible */
.mic-icon {
    stroke: white; /* White stroke should be visible on gray/red background */
    fill: none; /* Ensure it's not filled unexpectedly */
    width: 24px; /* Explicit size */
    height: 24px; /* Explicit size */
    display: inline-block; /* Ensure display */
}

/* Live recording indicator (pulse dot + text) */
.indicator {
    display: flex; /* Managed by JS */
    align-items: center;
    color: var(--danger-color);
    font-size: 0.9em;
    font-weight: 500;
    flex-shrink: 0;
}
.pulse-dot {
    width: 8px; height: 8px; background-color: var(--danger-color);
    border-radius: 50%; margin-right: 8px;
    animation: simple-pulse 1.2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
    flex-shrink: 0;
}
@keyframes simple-pulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.7; }
}

/* General Status Text Indicator (Ready, Processing, Error...) */
.status-text {
    font-size: 0.9em;
    color: var(--secondary-color);
    flex-grow: 1; /* Take up available space */
    text-align: left; /* Align text to the left */
    padding-left: 5px; /* Small space */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-text.error { color: var(--danger-color); font-weight: 500; }

#transcription-area {
    width: 100%; padding: 10px 12px; border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius); font-size: 1rem; line-height: 1.6;
    margin-bottom: 12px; resize: vertical; min-height: 90px;
}
#transcription-area:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.action-buttons {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 8px; margin-top: 5px; flex-shrink: 0;
}

/* General Button Style within action-buttons */
.action-buttons button {
    padding: 9px 18px; font-size: 0.9rem; font-weight: 500;
    border-radius: var(--border-radius); border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
    /* Ensure text is visible */
    color: inherit; /* Inherit specific color or default */
    background-color: inherit; /* Inherit specific background */
    text-align: center; /* Ensure text is centered */
    display: inline-block; /* Ensure display */
}

/* Copy Button Style */
#copy-button {
    background-color: var(--background-color);
    color: var(--copy-color);
    border: 1px solid var(--medium-gray);
    order: 1;
}
#copy-button:hover {
    background-color: var(--light-gray);
    border-color: var(--copy-hover);
    color: var(--copy-hover);
}
#copy-button.copied {
    background-color: var(--copy-color);
    color: white;
    border-color: var(--copy-color);
    opacity: 0.8;
}

/* Clear Button Style */
#clear-button {
    background-color: var(--background-color);
    color: var(--secondary-color);
    border: 1px solid var(--medium-gray);
    order: 2;
}
#clear-button:hover {
    background-color: var(--light-gray);
    border-color: var(--secondary-hover);
    color: var(--secondary-hover);
}

/* Drop Button Style (Primary) */
#drop-button.primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    order: 3;
}
#drop-button.primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Ensure disabled buttons look distinct */
button:disabled {
    background-color: var(--medium-gray);
    border-color: var(--medium-gray);
    color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.sr-only { /* Screen reader only text */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}