/**
 * SmartHealth QA widget.
 *
 * Only the floating trigger and the capture helpers are styled here — the
 * recorder dialog is built from Filament's own Blade components so it inherits
 * the host panel's theme, direction and dark mode instead of imitating them.
 */

.sh-qa-masked {
    filter: blur(10px) !important;
}

.sh-qa__file-input {
    display: none;
}

.sh-qa__trigger {
    position: fixed;
    inset-block-end: 1.25rem;
    inset-inline-end: 1.25rem;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 9999px;
    /* Filament 5 defines these as complete oklch() colours, not RGB triplets,
       so they must be used as values rather than wrapped in rgb(). */
    background-color: var(--primary-600, #0d5384);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px -8px rgb(15 23 42 / 0.45);
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.sh-qa__trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px -8px rgb(15 23 42 / 0.55);
}

.sh-qa__trigger:focus-visible {
    outline: 2px solid var(--primary-500, #2c7dac);
    outline-offset: 2px;
}

.sh-qa__trigger:disabled {
    opacity: 0.65;
    cursor: progress;
}

.sh-qa__trigger-icon {
    width: 1.15rem;
    height: 1.15rem;
}

/*
 * Layout for the recorder dialog. These rules live here rather than as Tailwind
 * utilities in the Blade view because the host application's Tailwind build
 * never scans this package's views — any utility Filament does not already ship
 * would simply not exist in the compiled stylesheet.
 */

.sh-qa__fields {
    display: grid;
    gap: 1rem;
}

.sh-qa__row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .sh-qa__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sh-qa__field {
    display: grid;
    gap: 0.375rem;
}

.sh-qa__label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: rgb(3 7 18);
}

.sh-qa__error {
    margin: 0;
    font-size: 0.8125rem;
    color: rgb(185 28 28);
}

.sh-qa__notice {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgb(254 252 232);
    color: rgb(133 77 14);
    font-size: 0.8125rem;
}

.sh-qa__textarea {
    display: block;
    width: 100%;
    border: none;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.5rem;
    resize: vertical;
}

.sh-qa__textarea:focus {
    outline: none;
    box-shadow: none;
}

.sh-qa__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sh-qa__thumbs:empty {
    display: none;
}

.sh-qa__thumb {
    position: relative;
    width: 8rem;
    height: 5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: rgb(249 250 251);
    box-shadow: inset 0 0 0 1px rgb(3 7 18 / 0.1);
}

.sh-qa__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sh-qa__thumb-remove {
    position: absolute;
    inset-block-start: 0.25rem;
    inset-inline-end: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: none;
    border-radius: 9999px;
    background-color: rgb(3 7 18 / 0.7);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}

.sh-qa__hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sh-qa__hint-text {
    margin: 0;
    font-size: 0.8125rem;
    color: rgb(107 114 128);
}

.sh-qa__footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dark .sh-qa__label {
    color: #fff;
}

.dark .sh-qa__error {
    color: rgb(248 113 113);
}

.dark .sh-qa__notice {
    background-color: rgb(250 204 21 / 0.1);
    color: rgb(250 204 21);
}

.dark .sh-qa__thumb {
    background-color: rgb(255 255 255 / 0.05);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}

.dark .sh-qa__hint-text {
    color: rgb(156 163 175);
}
