/* eDocTreat Plugin Styles - Mobile Responsive Redesign */

/* --- Reset & Defaults --- */
#edoctreat-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    /* darker than slate-900 for better contrast */
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

#edoctreat-root *,
#edoctreat-root *::before,
#edoctreat-root *::after {
    box-sizing: inherit;
    border-width: 0;
    border-style: solid;
    border-color: #e2e8f0;
}

/* --- Layout --- */
#edoctreat-root .flex {
    display: flex;
}

#edoctreat-root .flex-col {
    flex-direction: column;
}

#edoctreat-root .items-center {
    align-items: center;
}

#edoctreat-root .justify-between {
    justify-content: space-between;
}

#edoctreat-root .justify-center {
    justify-content: center;
}

#edoctreat-root .w-full {
    width: 100%;
}

#edoctreat-root .max-w-3xl {
    max-width: 48rem;
}

#edoctreat-root .mx-auto {
    margin-left: auto;
    margin-right: auto;
}

#edoctreat-root .min-h-[500px] {
    min-height: 500px;
}

#edoctreat-root .min-h-[calc(100vh-2rem)] {
    min-height: calc(100vh - 2rem);
}

#edoctreat-root .overflow-hidden {
    overflow: hidden;
}

#edoctreat-root .overflow-y-auto {
    overflow-y: auto;
}

#edoctreat-root .relative {
    position: relative;
}

#edoctreat-root .sticky {
    position: sticky;
    top: 0;
}

#edoctreat-root .z-20 {
    z-index: 20;
}

/* --- Spacing --- */
#edoctreat-root .p-1 {
    padding: 0.25rem;
}

#edoctreat-root .p-2 {
    padding: 0.5rem;
}

#edoctreat-root .p-3 {
    padding: 0.75rem;
}

#edoctreat-root .p-4 {
    padding: 1rem;
}

#edoctreat-root .px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

#edoctreat-root .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

#edoctreat-root .py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

#edoctreat-root .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#edoctreat-root .py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#edoctreat-root .pb-2 {
    padding-bottom: 0.5rem;
}

#edoctreat-root .pb-8 {
    padding-bottom: 2rem;
}

#edoctreat-root .pb-20 {
    padding-bottom: 5rem;
}

#edoctreat-root .pt-2 {
    padding-top: 0.5rem;
}

#edoctreat-root .pt-4 {
    padding-top: 1rem;
}

#edoctreat-root .pt-8 {
    padding-top: 2rem;
}

#edoctreat-root .pl-1 {
    padding-left: 0.25rem;
}

#edoctreat-root .pl-3 {
    padding-left: 0.75rem;
}

#edoctreat-root .pl-5 {
    padding-left: 1.25rem;
}

#edoctreat-root .pl-10 {
    padding-left: 2.5rem;
}

#edoctreat-root .pr-3 {
    padding-right: 0.75rem;
}

#edoctreat-root .pr-4 {
    padding-right: 1rem;
}

#edoctreat-root .-ml-1 {
    margin-left: -0.25rem;
}

#edoctreat-root .-ml-2 {
    margin-left: -0.5rem;
}

#edoctreat-root .mt-1 {
    margin-top: 0.25rem;
}

#edoctreat-root .mt-1\.5 {
    margin-top: 0.375rem;
}

#edoctreat-root .mt-2 {
    margin-top: 0.5rem;
}

#edoctreat-root .mt-3 {
    margin-top: 0.75rem;
}

#edoctreat-root .mt-4 {
    margin-top: 1rem;
}

#edoctreat-root .mt-8 {
    margin-top: 2rem;
}

#edoctreat-root .mb-1 {
    margin-bottom: 0.25rem;
}

#edoctreat-root .mb-2 {
    margin-bottom: 0.5rem;
}

#edoctreat-root .mb-3 {
    margin-bottom: 0.75rem;
}

#edoctreat-root .mb-4 {
    margin-bottom: 1rem;
}

#edoctreat-root .mb-6 {
    margin-bottom: 1.5rem;
}

#edoctreat-root .gap-1 {
    gap: 0.25rem;
}

#edoctreat-root .gap-2 {
    gap: 0.5rem;
}

#edoctreat-root .gap-3 {
    gap: 0.75rem;
}

#edoctreat-root .gap-4 {
    gap: 1rem;
}

#edoctreat-root .space-y-1> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}

#edoctreat-root .space-y-2> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

#edoctreat-root .space-y-3> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

#edoctreat-root .space-y-4> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

#edoctreat-root .space-y-6> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

#edoctreat-root .space-y-10> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(2.5rem * var(--tw-space-y-reverse));
}

/* --- Colors --- */
#edoctreat-root .bg-white {
    background-color: #ffffff;
}

#edoctreat-root .bg-white\/95 {
    background-color: rgba(255, 255, 255, 0.95);
}

#edoctreat-root .bg-slate-50 {
    background-color: #f8fafc;
}

#edoctreat-root .bg-slate-100 {
    background-color: #f1f5f9;
}

#edoctreat-root .bg-slate-200 {
    background-color: #e2e8f0;
}

#edoctreat-root .bg-blue-50 {
    background-color: #eff6ff;
}

#edoctreat-root .bg-blue-500 {
    background-color: #3b82f6;
}

#edoctreat-root .bg-red-50 {
    background-color: #fef2f2;
}

#edoctreat-root .bg-amber-50 {
    background-color: #fffbeb;
}

#edoctreat-root .bg-teal-50 {
    background-color: #f0fdfa;
}

#edoctreat-root .bg-indigo-50 {
    background-color: #eef2ff;
}

#edoctreat-root .bg-yellow-50 {
    background-color: #fefce8;
}

#edoctreat-root .bg-transparent {
    background-color: transparent;
}

#edoctreat-root .text-white {
    color: #ffffff;
}

#edoctreat-root .text-slate-300 {
    color: #cbd5e1;
}

#edoctreat-root .text-slate-400 {
    color: #94a3b8;
}

#edoctreat-root .text-slate-500 {
    color: #64748b;
}

#edoctreat-root .text-slate-600 {
    color: #475569;
}

#edoctreat-root .text-slate-700 {
    color: #334155;
}

#edoctreat-root .text-slate-800 {
    color: #1e293b;
}

#edoctreat-root .text-slate-900 {
    color: #0f172a;
}

#edoctreat-root .text-blue-400 {
    color: #60a5fa;
}

#edoctreat-root .text-blue-500 {
    color: #3b82f6;
}

#edoctreat-root .text-blue-600 {
    color: #2563eb;
}

#edoctreat-root .text-blue-700 {
    color: #1d4ed8;
}

#edoctreat-root .text-blue-800 {
    color: #1e40af;
}

#edoctreat-root .text-red-500 {
    color: #ef4444;
}

#edoctreat-root .text-red-700 {
    color: #b91c1c;
}

#edoctreat-root .text-red-800 {
    color: #991b1b;
}

#edoctreat-root .text-amber-800 {
    color: #92400e;
}

#edoctreat-root .text-amber-900 {
    color: #78350f;
}

#edoctreat-root .text-teal-600 {
    color: #0d9488;
}

#edoctreat-root .text-teal-800 {
    color: #115e59;
}

#edoctreat-root .text-teal-900 {
    color: #134e4a;
}

#edoctreat-root .text-indigo-600 {
    color: #4f46e5;
}

#edoctreat-root .text-indigo-800 {
    color: #3730a3;
}

#edoctreat-root .text-indigo-900 {
    color: #312e81;
}

/* --- Borders --- */
#edoctreat-root .border {
    border-width: 1px;
}

#edoctreat-root .border-2 {
    border-width: 2px;
}

#edoctreat-root .border-b {
    border-bottom-width: 1px;
}

#edoctreat-root .border-l-4 {
    border-left-width: 4px;
}

#edoctreat-root .border-t {
    border-top-width: 1px;
}

#edoctreat-root .border-transparent {
    border-color: transparent;
}

#edoctreat-root .border-slate-100 {
    border-color: #f1f5f9;
}

#edoctreat-root .border-slate-200 {
    border-color: #e2e8f0;
}

#edoctreat-root .border-slate-300 {
    border-color: #cbd5e1;
}

#edoctreat-root .border-blue-100 {
    border-color: #dbeafe;
}

#edoctreat-root .border-blue-300 {
    border-color: #93c5fd;
}

#edoctreat-root .border-blue-400 {
    border-color: #60a5fa;
}

#edoctreat-root .border-blue-500 {
    border-color: #3b82f6;
}

#edoctreat-root .border-red-500 {
    border-color: #ef4444;
}

#edoctreat-root .border-amber-200 {
    border-color: #fde68a;
}

#edoctreat-root .border-teal-100 {
    border-color: #ccfbf1;
}

#edoctreat-root .border-indigo-100 {
    border-color: #e0e7ff;
}

#edoctreat-root .border-t-transparent {
    border-top-color: transparent;
}

/* --- Radii --- */
#edoctreat-root .rounded-md {
    border-radius: 0.375rem;
}

#edoctreat-root .rounded-lg {
    border-radius: 0.5rem;
}

#edoctreat-root .rounded-xl {
    border-radius: 0.75rem;
}

#edoctreat-root .rounded-full {
    border-radius: 9999px;
}

#edoctreat-root .rounded-r-lg {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* --- Typography --- */
#edoctreat-root .font-sans {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#edoctreat-root .font-bold {
    font-weight: 700;
}

#edoctreat-root .font-semibold {
    font-weight: 600;
}

#edoctreat-root .font-medium {
    font-weight: 500;
}

#edoctreat-root .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

#edoctreat-root .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

#edoctreat-root .text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

#edoctreat-root .text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

#edoctreat-root .text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

#edoctreat-root .leading-tight {
    line-height: 1.25;
}

#edoctreat-root .leading-relaxed {
    line-height: 1.625;
}

#edoctreat-root .uppercase {
    text-transform: uppercase;
}

#edoctreat-root .italic {
    font-style: italic;
}

#edoctreat-root .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#edoctreat-root .tracking-wide {
    letter-spacing: 0.025em;
}

#edoctreat-root .tracking-widest {
    letter-spacing: 0.1em;
}

#edoctreat-root .tracking-wider {
    letter-spacing: 0.05em;
}

#edoctreat-root .line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#edoctreat-root .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

#edoctreat-root .text-center {
    text-align: center;
}

/* --- List Styles --- */
#edoctreat-root .list-disc {
    list-style-type: disc;
}

/* --- Effects --- */
#edoctreat-root .shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

#edoctreat-root .shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

#edoctreat-root .backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

#edoctreat-root .transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-duration: 150ms;
}

#edoctreat-root .hover\:bg-slate-100:hover {
    background-color: #f1f5f9;
}

#edoctreat-root .hover\:bg-indigo-50:hover {
    background-color: #eef2ff;
}

#edoctreat-root .hover\:bg-slate-200:hover {
    background-color: #e2e8f0;
}

#edoctreat-root .hover\:text-blue-600:hover {
    color: #2563eb;
}

#edoctreat-root .hover\:text-indigo-600:hover {
    color: #4f46e5;
}

#edoctreat-root .hover\:border-blue-300:hover {
    border-color: #93c5fd;
}

#edoctreat-root .hover\:border-blue-400:hover {
    border-color: #60a5fa;
}

#edoctreat-root .hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

/* --- Gradients --- */
#edoctreat-root .bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

#edoctreat-root .from-blue-700 {
    --tw-gradient-from: #1d4ed8;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

#edoctreat-root .to-teal-600 {
    --tw-gradient-to: #0d9488;
}

#edoctreat-root .bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

#edoctreat-root .text-transparent {
    color: transparent;
}

/* --- Components --- */
#edoctreat-root .shrink-0 {
    flex-shrink: 0;
}

#edoctreat-root .block {
    display: block;
}

#edoctreat-root .inline-block {
    display: inline-block;
}

/* --- Utils --- */
#edoctreat-root .no-scrollbar::-webkit-scrollbar {
    display: none;
}

#edoctreat-root .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#edoctreat-root .whitespace-nowrap {
    white-space: nowrap;
}

#edoctreat-root .flex-shrink-0 {
    flex-shrink: 0;
}

#edoctreat-root .overflow-x-auto {
    overflow-x: auto;
}

#edoctreat-root .active\:scale-\[0\.99\]:active {
    transform: scale(0.99);
}

#edoctreat-root .transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

#edoctreat-root .group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

#edoctreat-root .group:hover .group-hover\:text-blue-400 {
    color: #60a5fa;
}

#edoctreat-root .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- IMCI-aligned full width polish --- */
#edoctreat-root {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(109, 94, 252, 0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(90, 169, 255, 0.14), transparent 28%),
        linear-gradient(180deg, #f5f7ff 0%, #fbfdff 34%, #ffffff 100%);
}

#edoctreat-root .max-w-3xl,
#edoctreat-root .max-w-2xl {
    max-width: none !important;
    width: 100%;
}

#edoctreat-root main {
    width: 100%;
    max-width: none;
    padding: 0.75rem 0.75rem 5rem;
}

#edoctreat-root header.sticky {
    background: linear-gradient(135deg, #7c6cff 0%, #5aa9ff 100%);
    border-bottom: none;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.18);
    color: #ffffff;
}

#edoctreat-root header.sticky a,
#edoctreat-root header.sticky button,
#edoctreat-root header.sticky svg {
    color: #ffffff;
}

#edoctreat-root header.sticky a:hover,
#edoctreat-root header.sticky button:hover {
    opacity: 0.92;
}

#edoctreat-root .sticky.top-0.bg-slate-50 {
    background: transparent;
    padding-top: 0.25rem;
    padding-bottom: 1rem;
}

#edoctreat-root .sticky.top-0.bg-slate-50 > .relative.block {
    width: 100%;
}

#edoctreat-root .sticky.top-0.bg-slate-50 > button,
#edoctreat-root .sticky.top-0.bg-slate-50 > label {
    width: 100%;
    border-radius: 20px;
}

#edoctreat-root .sticky.top-0.bg-slate-50 button.w-full {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
    border-color: rgba(90, 169, 255, 0.35);
    color: #475569;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.08);
    min-height: 58px;
}

#edoctreat-root .sticky.top-0.bg-slate-50 button.w-full:hover {
    border-color: rgba(90, 169, 255, 0.72);
    color: #4f46e5;
}

#edoctreat-root .sticky.top-0.bg-slate-50 input[type="text"] {
    min-height: 58px;
    border-radius: 20px;
    border-color: rgba(90, 169, 255, 0.38);
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.08);
}

#edoctreat-root .space-y-3 > a,
#edoctreat-root .grid > a,
#edoctreat-root .space-y-6 > section,
#edoctreat-root .space-y-10 > section {
    border-radius: 18px;
}

#edoctreat-root .bg-white.p-4.rounded-xl,
#edoctreat-root .bg-white.p-5.rounded-xl {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid #e5e7ff;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.07);
}

#edoctreat-root h1,
#edoctreat-root h2,
#edoctreat-root h3,
#edoctreat-root h4 {
    letter-spacing: -0.02em;
}

#edoctreat-root .text-xl.font-bold.text-slate-900.border-b,
#edoctreat-root .text-xl.font-bold.text-blue-800.border-b,
#edoctreat-root .text-xl.font-bold.text-teal-800.border-b,
#edoctreat-root .text-xl.font-bold.text-indigo-800.border-b,
#edoctreat-root .text-xl.font-bold.text-red-800.border-b,
#edoctreat-root .text-xl.font-bold.text-green-800.border-b {
    padding-bottom: 0.65rem;
    border-bottom-width: 0;
    position: relative;
}

#edoctreat-root .text-xl.font-bold.text-slate-900.border-b::after,
#edoctreat-root .text-xl.font-bold.text-blue-800.border-b::after,
#edoctreat-root .text-xl.font-bold.text-teal-800.border-b::after,
#edoctreat-root .text-xl.font-bold.text-indigo-800.border-b::after,
#edoctreat-root .text-xl.font-bold.text-red-800.border-b::after,
#edoctreat-root .text-xl.font-bold.text-green-800.border-b::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c6cff 0%, #5aa9ff 100%);
}

#edoctreat-root .bg-red-50.border-l-4 {
    border-left-color: #ef4444;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
}

#edoctreat-root .bg-red-50 .text-red-700,
#edoctreat-root .bg-red-50 .text-red-800 {
    color: #b91c1c;
}

#edoctreat-root .bg-amber-50 {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

#edoctreat-root .bg-indigo-50\/50,
#edoctreat-root .bg-blue-50,
#edoctreat-root .bg-teal-50 {
    border: 1px solid rgba(109, 94, 252, 0.12);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.05);
}

#edoctreat-root .prose {
    max-width: none;
}

#edoctreat-root .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

#edoctreat-root .edoctreat-topbar {
    position: sticky;
    top: 0;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    z-index: 30;
}

#edoctreat-root .edoctreat-back-btn,
#edoctreat-root .edoctreat-nav-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 1rem;
}

#edoctreat-root .edoctreat-brand-link {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

#edoctreat-root .edoctreat-condition-hero {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 44px rgba(81, 96, 255, 0.20);
}

#edoctreat-root .edoctreat-condition-hero .edoctreat-condition-title {
    max-width: min(100%, 720px);
    text-wrap: balance;
}

#edoctreat-root .edoctreat-share-btn {
    min-height: 2.9rem;
    box-shadow: 0 14px 28px rgba(81, 96, 255, 0.18);
}

#edoctreat-root .edoctreat-share-btn svg,
#edoctreat-root .edoctreat-back-btn svg,
#edoctreat-root .edoctreat-nav-icon svg {
    flex-shrink: 0;
}

#edoctreat-root .edoctreat-condition-hero .edoctreat-share-btn:hover,
#edoctreat-root .edoctreat-back-btn:hover,
#edoctreat-root .edoctreat-nav-icon:hover {
    transform: translateY(-1px);
}

#edoctreat-root .bg-red-50.border.border-red-200 {
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.08);
}

#edoctreat-root .text-xl.font-bold.text-slate-900.leading-tight.pr-2,
#edoctreat-root .edoctreat-condition-title {
    line-height: 1.05;
}

@media (max-width: 768px) {
    #edoctreat-root main {
        padding: 0.5rem 0.5rem 4.5rem;
    }

    #edoctreat-root .sticky.top-0.bg-slate-50 button.w-full,
    #edoctreat-root .sticky.top-0.bg-slate-50 input[type="text"] {
        min-height: 54px;
        border-radius: 18px;
    }

    #edoctreat-root .bg-white.p-4.rounded-xl,
    #edoctreat-root .bg-white.p-5.rounded-xl {
        padding: 1rem;
    }

    #edoctreat-root .edoctreat-condition-hero {
        border-radius: 1.35rem;
        padding: 1rem;
    }

    #edoctreat-root .edoctreat-condition-title {
        font-size: 1.55rem;
    }

    #edoctreat-root .edoctreat-share-btn {
        padding-inline: 0.95rem;
    }
}

/* --- eDocTreat Professional UI Overhaul v3 --- */
#edoctreat-root {
    --edt-ink: #101828;
    --edt-muted: #667085;
    --edt-line: #d9e2ec;
    --edt-soft: #f6f8fb;
    --edt-surface: #ffffff;
    --edt-primary: #155eef;
    --edt-primary-dark: #0f3e8a;
    --edt-accent: #0891b2;
    --edt-danger: #c81e1e;
    --edt-danger-soft: #fff1f1;
    --edt-warning-soft: #fff7ed;
    color: var(--edt-ink);
    background:
        linear-gradient(180deg, #eef5ff 0%, #f8fbff 22%, #ffffff 64%);
    font-size: 16px;
}

#edoctreat-root * {
    min-width: 0;
}

#edoctreat-root a {
    text-decoration: none;
}

#edoctreat-root button,
#edoctreat-root input {
    font-family: inherit;
}

#edoctreat-root button {
    cursor: pointer;
}

#edoctreat-root button:disabled {
    cursor: not-allowed;
}

#edoctreat-root svg {
    flex-shrink: 0;
}

/* Missing utility coverage used by the rebuilt React screens. */
#edoctreat-root .grid { display: grid; }
#edoctreat-root .hidden { display: none; }
#edoctreat-root .inline-flex { display: inline-flex; }
#edoctreat-root .items-start { align-items: flex-start; }
#edoctreat-root .items-end { align-items: flex-end; }
#edoctreat-root .justify-end { justify-content: flex-end; }
#edoctreat-root .text-left { text-align: left; }
#edoctreat-root .min-w-0 { min-width: 0; }
#edoctreat-root .h-2 { height: 0.5rem; }
#edoctreat-root .w-2 { width: 0.5rem; }
#edoctreat-root .h-11 { height: 2.75rem; }
#edoctreat-root .w-11 { width: 2.75rem; }
#edoctreat-root .min-w-5 { min-width: 1.25rem; }
#edoctreat-root .p-5 { padding: 1.25rem; }
#edoctreat-root .p-6 { padding: 1.5rem; }
#edoctreat-root .p-10 { padding: 2.5rem; }
#edoctreat-root .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
#edoctreat-root .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
#edoctreat-root .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
#edoctreat-root .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
#edoctreat-root .py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
#edoctreat-root .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
#edoctreat-root .py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
#edoctreat-root .py-12 { padding-top: 3rem; padding-bottom: 3rem; }
#edoctreat-root .pl-4 { padding-left: 1rem; }
#edoctreat-root .pl-11 { padding-left: 2.75rem; }
#edoctreat-root .pr-2 { padding-right: 0.5rem; }
#edoctreat-root .mt-5 { margin-top: 1.25rem; }
#edoctreat-root .mx-auto { margin-left: auto; margin-right: auto; }
#edoctreat-root .max-w-xl { max-width: 36rem; }
#edoctreat-root .max-w-none { max-width: none; }
#edoctreat-root .rounded-2xl,
#edoctreat-root .rounded-\[22px\],
#edoctreat-root .rounded-\[24px\],
#edoctreat-root .rounded-\[26px\],
#edoctreat-root .rounded-\[28px\] {
    border-radius: 12px;
}
#edoctreat-root .rounded-3xl { border-radius: 14px; }
#edoctreat-root .rounded-b-\[28px\] {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}
#edoctreat-root .rounded-r-2xl {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}
#edoctreat-root .border-red-100 { border-color: #fee2e2; }
#edoctreat-root .border-red-200 { border-color: #fecaca; }
#edoctreat-root .border-blue-200 { border-color: #bfdbfe; }
#edoctreat-root .border-teal-200 { border-color: #99f6e4; }
#edoctreat-root .border-indigo-200 { border-color: #c7d2fe; }
#edoctreat-root .border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
#edoctreat-root .border-white\/25 { border-color: rgba(255, 255, 255, 0.25); }
#edoctreat-root .bg-white\/14 { background-color: rgba(255, 255, 255, 0.14); }
#edoctreat-root .bg-white\/15 { background-color: rgba(255, 255, 255, 0.15); }
#edoctreat-root .bg-white\/18 { background-color: rgba(255, 255, 255, 0.18); }
#edoctreat-root .bg-white\/24 { background-color: rgba(255, 255, 255, 0.24); }
#edoctreat-root .bg-white\/28 { background-color: rgba(255, 255, 255, 0.28); }
#edoctreat-root .bg-white\/96 { background-color: rgba(255, 255, 255, 0.96); }
#edoctreat-root .bg-red-600 { background-color: #dc2626; }
#edoctreat-root .bg-rose-500\/90 { background-color: rgba(244, 63, 94, 0.9); }
#edoctreat-root .bg-\[\#0f766e\] { background-color: #0f766e; }
#edoctreat-root .bg-\[\#4f46e5\] { background-color: #4f46e5; }
#edoctreat-root .bg-slate-900 { background-color: #0f172a; }
#edoctreat-root .text-white\/75 { color: rgba(255, 255, 255, 0.75); }
#edoctreat-root .text-white\/80 { color: rgba(255, 255, 255, 0.8); }
#edoctreat-root .text-white\/90 { color: rgba(255, 255, 255, 0.9); }
#edoctreat-root .text-white\/95 { color: rgba(255, 255, 255, 0.95); }
#edoctreat-root .text-red-900 { color: #7f1d1d; }
#edoctreat-root .text-green-800 { color: #166534; }
#edoctreat-root .text-\[\#5a57ff\] { color: #155eef; }
#edoctreat-root .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
#edoctreat-root .font-extrabold { font-weight: 800; }
#edoctreat-root .leading-\[1\.05\] { line-height: 1.08; }
#edoctreat-root .tracking-\[-0\.03em\],
#edoctreat-root .tracking-\[-0\.04em\],
#edoctreat-root .tracking-\[0\.14em\],
#edoctreat-root .tracking-\[0\.16em\],
#edoctreat-root .tracking-\[0\.18em\],
#edoctreat-root .tracking-\[0\.28em\] {
    letter-spacing: 0;
}
#edoctreat-root .bg-gradient-to-br {
    background-image: linear-gradient(135deg, var(--tw-gradient-stops));
}
#edoctreat-root .from-\[\#6f63ff\],
#edoctreat-root .from-\[\#7a6cff\] {
    --tw-gradient-stops: #164e8f 0%, #155eef 52%, var(--tw-gradient-to, #0ea5b7 100%);
}
#edoctreat-root .via-\[\#678cff\],
#edoctreat-root .via-\[\#6691ff\] {
    --tw-gradient-stops: #164e8f 0%, #155eef 52%, var(--tw-gradient-to, #0ea5b7 100%);
}
#edoctreat-root .to-\[\#57b4ff\],
#edoctreat-root .to-\[\#58b4ff\],
#edoctreat-root .to-\[\#5cb2ff\] {
    --tw-gradient-to: #0ea5b7;
}
#edoctreat-root .shadow,
#edoctreat-root .shadow-lg,
#edoctreat-root .shadow-xl,
#edoctreat-root .shadow-\[0_18px_40px_rgba\(81\,96\,255\,0\.24\)\],
#edoctreat-root .shadow-\[0_18px_40px_rgba\(81\,96\,255\,0\.20\)\] {
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}
#edoctreat-root .backdrop-blur-md,
#edoctreat-root .backdrop-blur-xl {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

@media (min-width: 640px) {
    #edoctreat-root .sm\:inline { display: inline; }
    #edoctreat-root .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #edoctreat-root .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
}

@media (min-width: 1024px) {
    #edoctreat-root .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    #edoctreat-root .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* App shell */
#edoctreat-root header.edoctreat-topbar {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(217, 226, 236, 0.86);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
    color: var(--edt-ink);
    margin: 0.75rem auto 0;
    max-width: min(1120px, calc(100% - 1.5rem));
}

#edoctreat-root header.edoctreat-topbar a,
#edoctreat-root header.edoctreat-topbar button,
#edoctreat-root header.edoctreat-topbar svg {
    color: var(--edt-ink);
}

#edoctreat-root .edoctreat-brand-link {
    color: var(--edt-primary-dark) !important;
    font-size: 1.05rem;
    letter-spacing: 0;
    text-shadow: none;
}

#edoctreat-root .edoctreat-topbar a[aria-label],
#edoctreat-root .edoctreat-topbar .edoctreat-back-btn {
    min-height: 2.5rem;
    border-radius: 10px;
    border: 1px solid #dbe7f3;
    background: #f8fbff;
    color: var(--edt-primary-dark);
    box-shadow: none;
}

#edoctreat-root .edoctreat-topbar a[aria-label]:hover,
#edoctreat-root .edoctreat-topbar .edoctreat-back-btn:hover {
    background: #eef6ff;
    border-color: #bdd7f4;
    transform: translateY(-1px);
}

#edoctreat-root main {
    max-width: min(1120px, 100%);
    margin-inline: auto;
    padding: 1rem 0.75rem 5rem;
}

/* Home and tool headers */
#edoctreat-root main > .mx-auto > .bg-gradient-to-br:first-child,
#edoctreat-root main > .mx-auto > .bg-gradient-to-br:first-child,
#edoctreat-root .bg-gradient-to-r,
#edoctreat-root .bg-gradient-to-br {
    background:
        linear-gradient(135deg, #123c69 0%, #155eef 55%, #0e9aa7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px !important;
    box-shadow: 0 16px 34px rgba(15, 62, 138, 0.18);
}

#edoctreat-root .text-3xl,
#edoctreat-root .text-\[1\.9rem\] {
    font-size: clamp(1.55rem, 2.2vw, 2.2rem);
    line-height: 1.12;
}

#edoctreat-root .text-2xl {
    font-size: clamp(1.3rem, 1.7vw, 1.75rem);
}

/* Search and action panels */
#edoctreat-root .sticky.top-0.z-10 {
    position: sticky;
    top: 0.75rem;
    border-radius: 12px !important;
    border: 1px solid rgba(217, 226, 236, 0.9);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.07);
}

#edoctreat-root input[type="text"] {
    width: 100%;
    border-radius: 10px !important;
    border: 1px solid #cbdff4;
    background: #ffffff;
    color: var(--edt-ink);
    min-height: 52px;
}

#edoctreat-root input[type="text"]:focus {
    border-color: var(--edt-primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

#edoctreat-root .sticky.top-0.z-10 button.w-full {
    border-radius: 10px !important;
    min-height: 52px;
    background: #ffffff;
    color: var(--edt-muted);
}

#edoctreat-root .grid > a,
#edoctreat-root .overflow-x-auto > a,
#edoctreat-root button.rounded-full,
#edoctreat-root a.rounded-full {
    border-radius: 999px !important;
}

/* Cards and result rows */
#edoctreat-root .space-y-3 > div,
#edoctreat-root .space-y-4 > div,
#edoctreat-root article,
#edoctreat-root .rounded-\[24px\],
#edoctreat-root .rounded-\[26px\] {
    border-radius: 12px !important;
}

#edoctreat-root .space-y-3 > div,
#edoctreat-root article.overflow-hidden,
#edoctreat-root .border.border-slate-200.bg-white {
    background: #ffffff;
    border-color: var(--edt-line);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

#edoctreat-root .space-y-3 > div:hover,
#edoctreat-root article.overflow-hidden:hover {
    border-color: #b9d3f3;
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.09);
}

#edoctreat-root h1,
#edoctreat-root h2,
#edoctreat-root h3,
#edoctreat-root h4 {
    letter-spacing: 0;
}

#edoctreat-root h2.border-b {
    border-bottom: 1px solid #d9e2ec !important;
    padding-bottom: 0.65rem;
    color: var(--edt-primary-dark);
}

#edoctreat-root h2.border-b::after {
    display: none;
}

#edoctreat-root p,
#edoctreat-root li,
#edoctreat-root .leading-relaxed {
    overflow-wrap: anywhere;
}

/* Clinical urgency states */
#edoctreat-root .bg-red-50,
#edoctreat-root .bg-red-50.border,
#edoctreat-root .bg-red-50.border-l-4,
#edoctreat-root .rounded-r-2xl.border-l-4.border-red-500 {
    background: linear-gradient(180deg, #fff7f7 0%, #fff1f1 100%) !important;
    border-color: #f5b5b5 !important;
    color: #7f1d1d;
    box-shadow: 0 12px 24px rgba(200, 30, 30, 0.08);
}

#edoctreat-root .bg-red-50 h3,
#edoctreat-root .bg-red-50 svg,
#edoctreat-root .bg-red-50 .text-red-700,
#edoctreat-root .bg-red-50 .text-red-800,
#edoctreat-root .bg-red-50 .text-red-900 {
    color: var(--edt-danger) !important;
}

#edoctreat-root .bg-amber-50 {
    background: var(--edt-warning-soft) !important;
    border-color: #fed7aa !important;
}

#edoctreat-root .bg-blue-50,
#edoctreat-root .bg-teal-50,
#edoctreat-root .bg-indigo-50,
#edoctreat-root .bg-indigo-50\/50 {
    background: #f5f9ff !important;
    border-color: #d9e8fb !important;
    box-shadow: none;
}

/* Compare and symptom screens */
#edoctreat-root .lg\:grid-cols-2,
#edoctreat-root .xl\:grid-cols-3 {
    align-items: stretch;
}

#edoctreat-root article .border-b {
    border-color: var(--edt-line);
}

#edoctreat-root article .space-y-3 > div {
    box-shadow: none;
}

#edoctreat-root .absolute {
    position: absolute;
}

#edoctreat-root .inset-y-0 {
    top: 0;
    bottom: 0;
}

#edoctreat-root .left-0 {
    left: 0;
}

#edoctreat-root .right-4 {
    right: 1rem;
}

#edoctreat-root .left-4 {
    left: 1rem;
}

#edoctreat-root .z-10 {
    z-index: 10;
}

#edoctreat-root .max-h-60 {
    max-height: 15rem;
}

#edoctreat-root .overflow-auto {
    overflow: auto;
}

/* Mobile polish */
@media (max-width: 768px) {
    #edoctreat-root {
        font-size: 15px;
    }

    #edoctreat-root header.edoctreat-topbar {
        margin-top: 0.5rem;
        max-width: calc(100% - 1rem);
        padding: 0.65rem;
        gap: 0.5rem;
    }

    #edoctreat-root .edoctreat-brand-link {
        font-size: 0.98rem;
    }

    #edoctreat-root .edoctreat-topbar a[aria-label],
    #edoctreat-root .edoctreat-topbar .edoctreat-back-btn {
        min-width: 2.4rem;
        width: 2.4rem;
        height: 2.4rem;
        padding-inline: 0;
        justify-content: center;
    }

    #edoctreat-root .edoctreat-topbar a[aria-label] span:not(:last-child),
    #edoctreat-root .edoctreat-topbar a[aria-label] > span.hidden {
        display: none !important;
    }

    #edoctreat-root main {
        padding: 0.75rem 0.5rem 4.5rem;
    }

    #edoctreat-root .text-3xl,
    #edoctreat-root .text-\[1\.9rem\] {
        font-size: 1.45rem;
        line-height: 1.15;
    }

    #edoctreat-root .p-5,
    #edoctreat-root .p-6,
    #edoctreat-root .p-4 {
        padding: 0.9rem;
    }

    #edoctreat-root .grid {
        grid-template-columns: 1fr;
    }

    #edoctreat-root .space-y-5 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0.75rem;
    }

    #edoctreat-root .flex-wrap {
        flex-wrap: wrap;
    }

    #edoctreat-root .sticky.top-0.z-10 {
        top: 0.5rem;
    }

    #edoctreat-root input[type="text"],
    #edoctreat-root .sticky.top-0.z-10 button.w-full {
        min-height: 50px;
    }

    #edoctreat-root .space-y-3 > div .flex.items-start.gap-3 {
        gap: 0.7rem;
    }

    #edoctreat-root .space-y-3 > div button {
        padding-inline: 0.75rem;
    }
}

/* --- eDocTreat App UI Rebuild --- */
#edoctreat-root {
    --edt-bg: #eff6fb;
    --edt-surface: #ffffff;
    --edt-surface-soft: #f8fbfd;
    --edt-border: #d7e2ea;
    --edt-text: #17324d;
    --edt-muted: #5f7488;
    --edt-primary: #1662c4;
    --edt-primary-deep: #0f4ea0;
    --edt-accent: #0f9f8f;
    --edt-danger: #c62828;
    --edt-danger-soft: #fff4f4;
    --edt-warn-soft: #fff7ea;
    background:
        linear-gradient(180deg, #edf6ff 0%, #f7fbfe 38%, #ffffff 100%);
    color: var(--edt-text);
}

#edoctreat-root .edt-shell {
    min-height: 100vh;
}

#edoctreat-root .edt-main {
    width: min(1120px, calc(100% - 1rem));
    margin: 0.75rem auto 0;
    padding: 0 0 4rem;
}

#edoctreat-root .edt-topbar {
    width: min(1120px, calc(100% - 1rem));
    margin: 0.75rem auto 0;
    padding: 0.75rem 0.9rem;
    background: linear-gradient(135deg, #11457e 0%, #1662c4 56%, #0f9f8f 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 14px 34px rgba(17, 69, 126, 0.18);
}

#edoctreat-root .edt-topbar-left,
#edoctreat-root .edt-topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

#edoctreat-root .edt-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}

#edoctreat-root .edt-brand-mark {
    display: inline-block;
}

#edoctreat-root .edt-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

#edoctreat-root .edt-icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#edoctreat-root .edt-icon-button.is-current {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.4);
}

#edoctreat-root .edt-icon-button.subtle {
    width: 2.1rem;
    height: 2.1rem;
    background: #f4f8fb;
    border-color: var(--edt-border);
    color: var(--edt-muted);
}

#edoctreat-root .edt-badge {
    position: absolute;
    top: -0.28rem;
    right: -0.28rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ffffff;
    color: var(--edt-primary);
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#edoctreat-root .edt-home,
#edoctreat-root .edt-tool {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

#edoctreat-root .edt-panel {
    background: var(--edt-surface);
    border: 1px solid var(--edt-border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(23, 50, 77, 0.05);
}

#edoctreat-root .edt-home-intro,
#edoctreat-root .edt-tool-head {
    background:
        linear-gradient(135deg, rgba(17, 69, 126, 0.98) 0%, rgba(22, 98, 196, 0.96) 58%, rgba(15, 159, 143, 0.94) 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
}

#edoctreat-root .edt-home-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr);
    gap: 1rem;
    align-items: end;
}

#edoctreat-root .edt-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.84;
}

#edoctreat-root .edt-home-title,
#edoctreat-root .edt-section-title {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 2.1rem);
    line-height: 1.14;
    color: inherit;
}

#edoctreat-root .edt-home-text,
#edoctreat-root .edt-muted-copy {
    margin: 0.45rem 0 0;
    font-size: 0.96rem;
    line-height: 1.55;
}

#edoctreat-root .edt-home-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

#edoctreat-root .edt-stat {
    padding: 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#edoctreat-root .edt-stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.82;
}

#edoctreat-root .edt-stat-value {
    display: block;
    margin-top: 0.22rem;
    font-size: 1.2rem;
    color: #ffffff;
}

#edoctreat-root .edt-search-panel {
    position: sticky;
    top: 0.7rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#edoctreat-root .edt-searchbox {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0 0.95rem;
    border-radius: 12px;
    border: 1px solid #c8d9e6;
    background: var(--edt-surface-soft);
}

#edoctreat-root .edt-searchbox svg {
    color: var(--edt-muted);
}

#edoctreat-root .edt-searchbox input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    color: var(--edt-text);
    font-size: 0.97rem;
    padding: 0;
    min-height: auto;
    box-shadow: none;
}

#edoctreat-root .edt-search-meta,
#edoctreat-root .edt-panel-head {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--edt-muted);
    font-size: 0.86rem;
}

#edoctreat-root .edt-panel-head {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

#edoctreat-root .edt-panel-head h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--edt-text);
}

#edoctreat-root .edt-inline-button,
#edoctreat-root .edt-inline-link,
#edoctreat-root .edt-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.82rem;
    border-radius: 999px;
    border: 1px solid var(--edt-border);
    background: #f4f8fb;
    color: var(--edt-primary-deep);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
}

#edoctreat-root .edt-inline-link,
#edoctreat-root .edt-secondary-link {
    background: transparent;
}

#edoctreat-root .edt-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

#edoctreat-root .edt-action-card,
#edoctreat-root .edt-category-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--edt-surface);
    border: 1px solid var(--edt-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--edt-text);
    box-shadow: 0 10px 22px rgba(23, 50, 77, 0.045);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#edoctreat-root .edt-action-card:hover,
#edoctreat-root .edt-category-card:hover,
#edoctreat-root .edt-result-row:hover {
    transform: translateY(-1px);
    border-color: #b6ccdc;
    box-shadow: 0 14px 28px rgba(23, 50, 77, 0.08);
}

#edoctreat-root .edt-action-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dcecff 0%, #dff7f2 100%);
    color: var(--edt-primary);
}

#edoctreat-root .edt-action-label {
    margin: 0 0 0.12rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--edt-muted);
}

#edoctreat-root .edt-action-title,
#edoctreat-root .edt-category-copy h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--edt-text);
}

#edoctreat-root .edt-category-copy p {
    margin: 0.2rem 0 0;
    color: var(--edt-muted);
    font-size: 0.88rem;
}

#edoctreat-root .edt-chip-row,
#edoctreat-root .edt-chip-grid,
#edoctreat-root .edt-selected-row,
#edoctreat-root .edt-result-aliases {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

#edoctreat-root .edt-chip,
#edoctreat-root .edt-result-pill,
#edoctreat-root .edt-match-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--edt-border);
    background: #f5f8fb;
    color: var(--edt-muted);
    font-size: 0.82rem;
    text-decoration: none;
}

#edoctreat-root .edt-match-pill {
    background: #e6f8f3;
    border-color: #bfe8de;
    color: #0d7a6d;
}

#edoctreat-root .edt-results,
#edoctreat-root .edt-category-grid,
#edoctreat-root .edt-compare-grid {
    display: grid;
    gap: 0.9rem;
}

#edoctreat-root .edt-result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    background: var(--edt-surface);
    border: 1px solid var(--edt-border);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(23, 50, 77, 0.045);
}

#edoctreat-root .edt-result-main {
    text-decoration: none;
    color: inherit;
}

#edoctreat-root .edt-result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#edoctreat-root .edt-result-top h3,
#edoctreat-root .edt-compare-card h2 {
    margin: 0;
    color: var(--edt-text);
    font-size: 1.05rem;
}

#edoctreat-root .edt-result-top svg {
    color: var(--edt-muted);
}

#edoctreat-root .edt-result-category {
    margin: 0.2rem 0 0.55rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--edt-muted);
}

#edoctreat-root .edt-result-description {
    margin: 0.65rem 0 0;
    color: var(--edt-muted);
    line-height: 1.55;
}

#edoctreat-root .edt-result-side {
    display: flex;
    align-items: flex-start;
}

#edoctreat-root .edt-compare-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--edt-border);
    background: #f5f8fb;
    color: var(--edt-primary-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

#edoctreat-root .edt-compare-button.is-active {
    background: var(--edt-primary);
    border-color: var(--edt-primary);
    color: #ffffff;
}

#edoctreat-root .edt-symptom-chip,
#edoctreat-root .edt-selected-chip,
#edoctreat-root .edt-suggestion-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--edt-border);
    background: #f5f8fb;
    color: var(--edt-text);
    font-size: 0.86rem;
}

#edoctreat-root .edt-symptom-chip.is-selected,
#edoctreat-root .edt-selected-chip {
    background: var(--edt-primary);
    border-color: var(--edt-primary);
    color: #ffffff;
}

#edoctreat-root .edt-suggestion-list {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.45rem;
}

#edoctreat-root .edt-suggestion-row {
    justify-content: space-between;
    width: 100%;
    border-radius: 12px;
    background: #ffffff;
}

#edoctreat-root .edt-suggestion-row span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#edoctreat-root .edt-suggestion-row small {
    margin-top: 0.15rem;
    color: var(--edt-muted);
}

#edoctreat-root .edt-suggestion-row.is-selected {
    background: #eef6ff;
    border-color: #bfd4ea;
}

#edoctreat-root .edt-urgent-note {
    margin: 0.65rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--edt-danger);
    font-size: 0.84rem;
    font-weight: 600;
}

#edoctreat-root .edt-compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#edoctreat-root .edt-compare-card {
    background: var(--edt-surface);
    border: 1px solid var(--edt-border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    box-shadow: 0 10px 22px rgba(23, 50, 77, 0.045);
}

#edoctreat-root .edt-compare-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

#edoctreat-root .edt-compare-sections {
    display: grid;
    gap: 0.75rem;
}

#edoctreat-root .edt-compare-section {
    padding: 0.85rem;
    border-radius: 12px;
    background: #f8fbfd;
    border: 1px solid var(--edt-border);
}

#edoctreat-root .edt-compare-section.is-danger {
    background: var(--edt-danger-soft);
    border-color: #efc5c5;
}

#edoctreat-root .edt-compare-section.is-warn {
    background: var(--edt-warn-soft);
    border-color: #f0dbb1;
}

#edoctreat-root .edt-compare-section h3 {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--edt-muted);
}

#edoctreat-root .edt-compare-section ul {
    margin: 0;
    padding-left: 1rem;
}

#edoctreat-root .edt-compare-section li,
#edoctreat-root .edt-markdown p {
    color: var(--edt-text);
    line-height: 1.55;
}

#edoctreat-root .edt-empty,
#edoctreat-root .edt-state {
    padding: 2rem 1rem;
    background: var(--edt-surface);
    border: 1px dashed var(--edt-border);
    border-radius: 14px;
    text-align: center;
    color: var(--edt-muted);
}

#edoctreat-root .edt-empty h3 {
    margin: 0 0 0.35rem;
    color: var(--edt-text);
}

@media (max-width: 980px) {
    #edoctreat-root .edt-home-intro,
    #edoctreat-root .edt-action-grid,
    #edoctreat-root .edt-compare-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #edoctreat-root .edt-topbar,
    #edoctreat-root .edt-main {
        width: calc(100% - 0.8rem);
    }

    #edoctreat-root .edt-topbar {
        margin-top: 0.4rem;
        padding: 0.65rem 0.75rem;
    }

    #edoctreat-root .edt-brand {
        font-size: 0.98rem;
    }

    #edoctreat-root .edt-panel,
    #edoctreat-root .edt-result-row,
    #edoctreat-root .edt-action-card,
    #edoctreat-root .edt-category-card,
    #edoctreat-root .edt-compare-card {
        padding: 0.85rem;
    }

    #edoctreat-root .edt-result-row {
        grid-template-columns: 1fr;
    }

    #edoctreat-root .edt-result-side {
        justify-content: flex-start;
    }

    #edoctreat-root .edt-home-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #edoctreat-root .edt-search-panel {
        top: 0.45rem;
    }
}
