/* ==========================================================================
   Dashboard Feedback Modal Component Styles
   Modern shadcn-inspired design for the feedback modal
   ========================================================================== */

/* ==========================================================================
   Category Tabs - Segmented Control Style
   A pill-shaped container with neutral tabs, active = white with shadow
   ========================================================================== */

.feedback-category-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    padding: 0.25rem;
    background-color: var(--muted, hsl(210 40% 96%));
    border-radius: 0.5rem;
    width: 100%;
}

.feedback-category-tabs input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.feedback-category-tabs label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground, hsl(215 16% 47%));
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.feedback-category-tabs label:hover {
    color: var(--foreground, hsl(222 84% 5%));
}

.feedback-category-tabs input[type="radio"]:checked + label {
    background-color: var(--background, hsl(0 0% 100%));
    color: var(--foreground, hsl(222 84% 5%));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.feedback-category-tabs input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--ring, hsl(221 83% 53%));
    outline-offset: 2px;
}

/* Icons in tabs */
.feedback-category-tabs label i {
    font-size: 0.875rem;
}

/* ==========================================================================
   Textarea with Floating Mic Button
   Relative container with ghost mic button floating inside (bottom-right)
   ========================================================================== */

.feedback-textarea-wrapper {
    position: relative;
}

.feedback-textarea-wrapper textarea {
    padding-right: 3rem; /* Make room for floating mic button */
    min-height: 120px;
    resize: none;
}

.feedback-mic-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--muted-foreground, hsl(215 16% 47%));
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-mic-btn:hover {
    background-color: var(--muted, hsl(210 40% 96%));
    color: var(--foreground, hsl(222 84% 5%));
}

.feedback-mic-btn:focus-visible {
    outline: 2px solid var(--ring, hsl(221 83% 53%));
    outline-offset: 2px;
}

.feedback-mic-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Recording state - uses primary color instead of aggressive red */
.feedback-mic-btn.recording {
    background-color: var(--primary, #404041);
    color: var(--primary-foreground, #FFFFFF);
    animation: feedbackMicPulse 1.5s ease-in-out infinite;
}

@keyframes feedbackMicPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(64, 64, 65, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(64, 64, 65, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(64, 64, 65, 0);
    }
}

/* Interim preview styling */
.feedback-interim-preview {
    font-size: 0.875rem;
    color: var(--muted-foreground, hsl(215 16% 47%));
    font-style: italic;
    margin-top: 0.25rem;
}

/* ==========================================================================
   Info Alert - Neutral Card Style
   White background with subtle border, no color tint
   ========================================================================== */

.feedback-info-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--muted, hsl(210 40% 96%));
    border: 1px solid var(--border, hsl(214 32% 91%));
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.feedback-info-alert i {
    color: var(--muted-foreground, hsl(215 16% 47%));
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.feedback-info-alert small {
    color: var(--muted-foreground, hsl(215 16% 47%));
    font-size: 0.875rem;
    line-height: 1.5;
}

.feedback-info-alert strong {
    color: var(--foreground, hsl(222 84% 5%));
}

/* ==========================================================================
   Screenshot Button - Full Width Outline Style
   ========================================================================== */

.feedback-screenshot-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground, hsl(215 16% 47%));
    background-color: var(--background, hsl(0 0% 100%));
    border: 1px solid var(--border, hsl(214 32% 91%));
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-screenshot-btn:hover {
    background-color: var(--muted, hsl(210 40% 96%));
    color: var(--foreground, hsl(222 84% 5%));
    border-color: var(--border, hsl(214 32% 91%));
}

.feedback-screenshot-btn:focus-visible {
    outline: 2px solid var(--ring, hsl(221 83% 53%));
    outline-offset: 2px;
}

.feedback-screenshot-btn i {
    margin-right: 0.5rem;
}

/* ==========================================================================
   Ghost Button Variant for Cancel
   ========================================================================== */

.btn-ghost {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground, hsl(215 16% 47%));
    background-color: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background-color: var(--muted, hsl(210 40% 96%));
    color: var(--foreground, hsl(222 84% 5%));
}

.btn-ghost:focus-visible {
    outline: 2px solid var(--ring, hsl(221 83% 53%));
    outline-offset: 2px;
}

/* ==========================================================================
   Screenshot Preview Styling
   ========================================================================== */

.feedback-screenshot-preview {
    margin-top: 0.75rem;
}

.feedback-screenshot-preview .position-relative {
    display: inline-block;
}

.feedback-screenshot-preview img {
    max-height: 200px;
    border-radius: 0.5rem;
    border: 1px solid var(--border, hsl(214 32% 91%));
}

.feedback-screenshot-preview .remove-screenshot {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    font-size: 0.75rem;
    background-color: var(--background, hsl(0 0% 100%));
    border: 1px solid var(--border, hsl(214 32% 91%));
    border-radius: 0.25rem;
    color: var(--muted-foreground, hsl(215 16% 47%));
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-screenshot-preview .remove-screenshot:hover {
    background-color: hsl(0 84% 60%);
    border-color: hsl(0 84% 60%);
    color: hsl(0 0% 100%);
}

/* ==========================================================================
   Form Labels - Modern Styling
   ========================================================================== */

.feedback-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground, hsl(222 84% 5%));
    margin-bottom: 0.5rem;
}

.feedback-helper-text {
    font-size: 0.8rem;
    color: var(--muted-foreground, hsl(215 16% 47%));
    margin-top: 0.25rem;
}

/* ==========================================================================
   Context Checkbox Styling
   ========================================================================== */

.feedback-context-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--muted, hsl(210 40% 96%));
    border-radius: 0.5rem;
    margin-bottom: 0;
}

.feedback-context-check input[type="checkbox"] {
    margin-top: 0.125rem;
    accent-color: var(--primary, #404041);
}

.feedback-context-check label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground, hsl(222 84% 5%));
    cursor: pointer;
}

.feedback-context-check .feedback-helper-text {
    margin-top: 0.125rem;
    margin-left: 1.25rem;
}

/* ==========================================================================
   Modal Footer Button Spacing
   ========================================================================== */

.feedback-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}
