/* Basic Reset & Body Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9; /* Slightly off-white for softness */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Main Container */
.dictation-container {
    background-color: #ffffff;
    border-radius: 16px; /* Rounded edges */
    padding: 30px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Soft shadow */
    width: 100%;
    max-width: 700px; /* Max width for larger screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px; /* Space between elements */
}

/* Microphone Area */
.mic-wrapper {
    position: relative; /* Needed for absolute positioning of pulse */
    display: flex;
    justify-content: center;
    align-items: center;
}

.mic-button {
    background-color: #e9ecef; /* Muted grey when off */
    color: #6c757d; /* Muted icon color */
    border: none;
    border-radius: 50%; /* Circular button */
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 36px; /* Icon size */
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* To keep icon on top of pulse */
    z-index: 2;
}

.mic-button:hover {
    background-color: #dee2e6;
}

/* Active State for Microphone */
.mic-button.active {
    background-color: #007bff; /* Professional blue when active */
    color: #ffffff; /* White icon when active */
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.mic-button.active:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

/* Pulse Animation */
.mic-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.5); /* Pulse color */
    transform: scale(1);
    opacity: 0;
    z-index: 1;
    pointer-events: none; /* Prevent pulse from blocking mic click */
}

.mic-pulse.active {
    animation: pulse 1.5s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.8); /* How large the pulse grows */
        opacity: 0;
    }
}


/* Optional: Slash icon styling (if you prefer using it) */
/*
#mic-slash-icon {
    display: none; // Hidden by default
    position: absolute;
    font-size: 36px;
    color: #6c757d;
}
.mic-button:not(.active) #mic-icon {
     opacity: 0.5; // Dim the main mic icon when off
}
.mic-button:not(.active) #mic-slash-icon {
    display: block; // Show slash when mic is off
} */


/* Transcript Text Area */
#transcript {
    width: 100%;
    min-height: 200px; /* Good starting height */
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
    resize: vertical; /* Allow vertical resize */
    background-color: #f8f9fa; /* Slightly different background for contrast */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

#transcript:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25), inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Control Buttons Area */
.controls {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center; /* Center buttons */
    gap: 15px; /* Space between buttons */
    width: 100%;
}

.control-button {
    background-color: #6c757d; /* Grey background */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 8px; /* Space between icon and text */
    transition: background-color 0.3s ease, transform 0.1s ease;
    white-space: nowrap; /* Prevent text wrapping inside button */
}

.control-button:hover {
    background-color: #5a6268; /* Darker grey on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

.control-button:active {
     transform: translateY(0px); /* Press effect */
}

/* Specific button styles if needed (e.g., primary action) */
#save-btn {
   /* background-color: #28a745; */ /* Optional: Green for save */
}
/* #save-btn:hover {
    background-color: #218838;
} */

#clear-btn {
   /* background-color: #dc3545; */ /* Optional: Red for clear/delete */
}
/* #clear-btn:hover {
    background-color: #c82333;
} */

/* Responsive Adjustments */
@media (max-width: 600px) {
    .dictation-container {
        padding: 20px;
        gap: 20px;
    }

    .mic-button {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .mic-pulse {
        width: 70px;
        height: 70px;
    }

    #transcript {
        min-height: 150px;
        font-size: 15px;
    }

    .controls {
        gap: 10px;
    }

    .control-button {
        padding: 8px 15px;
        font-size: 13px;
    }
}