/* @plugin: triage_system */

.triage-root {
    min-height: 100%;
    width: 100%;
    padding: clamp(16px, 2vw, 28px);
    box-sizing: border-box;
    background: linear-gradient(
        165deg,
        rgba(8, 145, 178, 0.08) 0%,
        rgba(6, 182, 212, 0.04) 35%,
        var(--mantine-color-body, #f0fdfa) 60%,
        #fff 100%
    );
}

.triage-hero {
    border-radius: 18px;
    padding: 22px 24px;
    background: linear-gradient(125deg, #0e7490 0%, #0891b2 45%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 16px 48px rgba(8, 145, 178, 0.28);
}

.triage-hero-icon {
    font-size: 22px;
}

.triage-hero-text {
    min-width: 0;
    flex: 1;
}

.triage-hero-title {
    letter-spacing: -0.02em;
}

.triage-hero-sub,
.triage-hero-model-sub,
.triage-seed-msg {
    opacity: 0.92;
}

.triage-hero-badge {
    border-color: rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
    flex-shrink: 0;
}

.triage-form-card,
.triage-result-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

.triage-main-columns {
    display: grid;
    grid-template-columns: 62% 38%;
    gap: 20px;
    align-items: start;
}

.triage-col-left,
.triage-col-right {
    min-width: 0;
}

.triage-textarea .mantine-Textarea-input {
    font-family: inherit;
}

.triage-symptom-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.triage-symptom-chip {
    appearance: none;
    border: 1.5px solid rgba(8, 145, 178, 0.28);
    background: #fff;
    color: #0e7490;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    min-height: 42px;
}

.triage-symptom-chip:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.08);
}

.triage-symptom-chip.is-selected {
    border-color: #0891b2;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.28);
}

.triage-expand-btn {
    align-self: flex-start;
}

.triage-input-box {
    border: 1.5px solid rgba(8, 145, 178, 0.22);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.triage-patient-textarea .mantine-Textarea-input {
    border: none !important;
    box-shadow: none !important;
    padding-bottom: 8px;
}

.triage-input-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 12px;
    border-top: 1px dashed rgba(8, 145, 178, 0.18);
    background: rgba(240, 253, 250, 0.6);
}

.triage-voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35);
}

.triage-voice-btn:hover {
    transform: scale(1.05);
}

.triage-voice-btn.is-listening {
    animation: triage-pulse 1s ease-in-out infinite;
    background: linear-gradient(135deg, #dc2626, #f97316);
}

@keyframes triage-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
    50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.triage-voice-status {
    font-size: 12px;
    color: #64748b;
}

.triage-segment .mantine-SegmentedControl-label {
    font-weight: 600;
    padding-top: 10px;
    padding-bottom: 10px;
}

.triage-upload {
    width: 100%;
}

.triage-upload-zone {
    border: 2px dashed rgba(8, 145, 178, 0.35);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: rgba(8, 145, 178, 0.04);
}

.triage-upload-zone:hover {
    border-color: #0891b2;
    background: rgba(8, 145, 178, 0.08);
}

.triage-upload-icon {
    font-size: 28px;
    color: #0891b2;
    margin-bottom: 10px;
}

.triage-result-body {
    min-height: 320px;
}

.triage-empty-result {
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 24px;
}

.triage-rec-card {
    border-left: 4px solid #06b6d4 !important;
    transition: transform 0.15s, box-shadow 0.15s;
}

.triage-rec-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.12);
}

.triage-download-slip-btn {
    align-self: flex-start;
    margin-top: 6px;
}

.triage-booking-modal .mantine-Modal-content {
    border-radius: 16px;
}

.triage-slip-modal .mantine-Modal-content {
    border-radius: 16px;
    max-width: min(720px, 96vw);
}

.triage-slip-a4-scroll {
    max-height: min(72vh, 820px);
    overflow: auto;
    padding: 8px 4px 12px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
}

.triage-slip-a4-frame {
    width: min(100%, 520px);
    aspect-ratio: 210 / 297;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14);
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.triage-slip-a4-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

.triage-loc-icon {
    color: #0891b2;
    font-size: 14px;
}

.triage-disclaimer {
    line-height: 1.5;
}

.triage-dept-search {
    min-width: min(320px, 100%);
    flex: 1;
}

.triage-dept-grid {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.triage-cat-title {
    color: #0e7490;
    border-left: 3px solid #06b6d4;
    padding-left: 10px;
}

.triage-dept-item {
    transition: border-color 0.15s;
}

.triage-dept-item:hover {
    border-color: #67e8f9 !important;
}

@media (max-width: 992px) {
    .triage-main-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .triage-hero-badge {
        display: none;
    }

    .triage-dept-search {
        width: 100%;
    }

    .triage-symptom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
