.asteriskField {
    display: none;
}

.blinking-recording {
    color: red;
    /* Make the text color red */
    font-weight: bold;
    /* Make the text bold */
    animation: blink 1s infinite;
    /* Apply a blinking effect */
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    /* Fully visible */
    50% {
        opacity: 0;
    }

    /* Invisible */
    100% {
        opacity: 1;
    }

    /* Fully visible again */
}

[dir="rtl"] {
    font-size: 1.1rem;
    /* Adjust the multiplier as needed */
}

/*
This section from claude: ensures that the footer is always at the bottom of the page, even when the keyboard is open on mobile devices
*/

.keyboard-persistent-footer {
    /* The env(safe-area-inset-bottom) is for iOS devices with home indicators/notches */
    /* It prevents content from being hidden behind the home bar on iPhone X and newer */
    padding-bottom: env(safe-area-inset-bottom);
}

/* Add padding to the bottom of the main content to prevent footer overlap */
.main-content {
    padding-bottom: 160px;
    /* Adjust this value based on your footer height */
}


/* Boostrap radio buttons are a bit dim */
/* Custom styling for radio buttons */
.form-check-input[type="radio"] {

    /* Change the color when checked */
    --bs-form-check-bg: white;
    
    /* Border when unchecked - make it more visible */
    border: 2px solid #5a5a5a;
  }
  
  /* Change the checked color */
  .form-check-input:checked {
    background-color: #0d6efd; /* Bootstrap primary color */
    border-color: #0d6efd;
  }

/* ==========================================================================
   Audio Recorder Styles
   Mobile-first recording interface with single circular button
   ========================================================================== */

.audio-recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.recorder-visual-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.recorder-visual {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG level ring that shows audio input levels */
.level-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ring-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 4;
}

.ring-level {
    fill: none;
    stroke: #dc3545;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 339.292; /* 2 * PI * 54 (radius) */
    stroke-dashoffset: 339.292;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s ease-out;
}

/* Main circular recording button */
.recorder-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.2s ease;
    touch-action: manipulation; /* Prevents 300ms tap delay on mobile */
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    z-index: 1;
}

.recorder-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

.recorder-btn:active {
    transform: scale(0.95);
}

/* Button state: Idle (ready to record) */
.recorder-btn.state-idle {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.recorder-btn.state-idle:hover {
    background: #5c636a;
    border-color: #5c636a;
}

/* Button state: Recording */
.recorder-btn.state-recording {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Button state: Recorded (has audio, ready to upload) */
.recorder-btn.state-recorded {
    background: white;
    border-color: #198754;
    color: #198754;
}

.recorder-btn.state-recorded:hover {
    background: #f8f9fa;
}

/* Button state: Uploading */
.recorder-btn.state-uploading {
    background: #e9ecef;
    color: #6c757d;
    border-color: #e9ecef;
    pointer-events: none;
}

/* Button state: Transcribing */
.recorder-btn.state-transcribing {
    background: #e9ecef;
    color: #0d6efd;
    border-color: #e9ecef;
    pointer-events: none;
}

/* Button state: Completed */
.recorder-btn.state-completed {
    background: white;
    border-color: #198754;
    color: #198754;
}

/* Button state: Error */
.recorder-btn.state-error {
    background: white;
    border-color: #dc3545;
    color: #dc3545;
}

/* Recording timer display */
.recorder-timer {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-top: 0.75rem;
    min-width: 80px;
    text-align: center;
}

.recorder-timer.recording {
    color: #dc3545;
}

/* Status message area */
.recorder-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2rem;
    margin-bottom: 1rem;
}

.status-text {
    color: #6c757d;
    font-size: 0.95rem;
    text-align: center;
}

.status-text.error {
    color: #dc3545;
}

.status-text.success {
    color: #198754;
}

/* Audio playback preview */
.audio-playback {
    width: 100%;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.audio-playback audio {
    width: 100%;
    height: 40px;
    border-radius: 4px;
}

.playback-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

/* Upload button */
.recorder-upload {
    width: auto;
    padding: 0.4rem 1rem;
    font-weight: 600;
}

/* Transcription result card */
.transcription-result .card {
    border-color: #198754;
    border-width: 2px;
}

.transcription-result .card-body {
    padding: 1rem;
    text-align: center;
}

.transcription-result .card-text {
    font-style: italic;
    color: #495057;
    margin-bottom: 0.75rem;
}

/* Success flash animation for completed state */
.recorder-btn.success-flash {
    animation: success-flash 0.6s ease-out;
}

@keyframes success-flash {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(25, 135, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .audio-recorder {
        padding: 0.5rem;
    }

    .recorder-btn {
        width: 72px;
        height: 72px;
        font-size: 1.75rem;
    }

    .recorder-visual {
        width: 108px;
        height: 108px;
    }

    .recorder-timer {
        font-size: 1.25rem;
    }
}

/* RTL support for audio recorder */
[dir="rtl"] .playback-actions .btn i {
    margin-left: 0.25rem;
    margin-right: 0;
}

[dir="rtl"] .recorder-upload i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .transcription-result .btn i {
    margin-left: 0.25rem;
    margin-right: 0;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .recorder-btn {
        -webkit-appearance: none;
    }
}