:root {
    --takmedi-discovery-blue: #2E4EAD;
    --takmedi-discovery-blue-dark: #243D8C;
    --takmedi-discovery-text: #172033;
    --takmedi-discovery-muted: #6B7280;
    --takmedi-discovery-border: rgba(46, 78, 173, 0.14);
    --takmedi-discovery-panel: rgba(255, 255, 255, 0.92);
    --takmedi-discovery-soft: rgba(46, 78, 173, 0.06);
}

.discovery-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200000;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid rgba(46, 78, 173, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--takmedi-discovery-blue);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.discovery-fab i {
    font-size: 14px;
}

.discovery-panel {
    position: fixed;
    right: 22px;
    bottom: 80px;
    z-index: 1200001;
    width: min(400px, calc(100vw - 28px));
    max-height: min(650px, calc(100vh - 110px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--takmedi-discovery-border);
    border-radius: 18px;
    background: var(--takmedi-discovery-panel);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.discovery-panel.active {
    display: flex;
}

.discovery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px 13px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.discovery-brand {
    min-width: 0;
}

.discovery-brand h3 {
    margin: 0 0 2px;
    color: var(--takmedi-discovery-text);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.25;
}

.discovery-brand p {
    margin: 0;
    color: var(--takmedi-discovery-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.discovery-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discovery-language {
    height: 30px;
    padding: 0 26px 0 9px;
    border: 1px solid rgba(46, 78, 173, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    color: #26324B;
    font: inherit;
    font-size: 10.5px;
    font-weight: 600;
    outline: none;
}

.discovery-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    color: #4B5563;
    font-size: 19px;
    cursor: pointer;
}

.discovery-body {
    min-height: 330px;
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.discovery-welcome {
    margin-bottom: 12px;
}

.discovery-welcome strong {
    display: block;
    margin-bottom: 4px;
    color: var(--takmedi-discovery-text);
    font-size: 13px;
}

.discovery-welcome p {
    margin: 0;
    color: var(--takmedi-discovery-muted);
    font-size: 11px;
    line-height: 1.5;
}

.discovery-starters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.discovery-starter {
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid rgba(46, 78, 173, 0.12);
    border-radius: 11px;
    background: rgba(46, 78, 173, 0.035);
    color: #26324B;
    text-align: left;
    font: inherit;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.35;
    cursor: pointer;
}

.discovery-starter:hover {
    border-color: rgba(46, 78, 173, 0.26);
    background: rgba(46, 78, 173, 0.065);
}

.discovery-chat {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.discovery-message {
    max-width: 88%;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.discovery-message.user {
    align-self: flex-end;
    background: var(--takmedi-discovery-blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.discovery-message.assistant {
    align-self: flex-start;
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: rgba(255, 255, 255, .82);
    color: #26324B;
    border-bottom-left-radius: 5px;
}

.discovery-status {
    margin-top: 4px;
    color: var(--takmedi-discovery-muted);
    font-size: 10px;
}

.discovery-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.discovery-followup {
    padding: 6px 8px;
    border: 1px solid rgba(46, 78, 173, .13);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: var(--takmedi-discovery-blue);
    font: inherit;
    font-size: 9.5px;
    font-weight: 650;
    cursor: pointer;
}

.discovery-footer {
    padding: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    background: rgba(255, 255, 255, .62);
}

.discovery-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 7px;
    align-items: end;
}

.discovery-input {
    width: 100%;
    min-height: 40px;
    max-height: 100px;
    resize: none;
    padding: 10px 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, .84);
    color: var(--takmedi-discovery-text);
    font: inherit;
    font-size: 11px;
    line-height: 1.4;
    outline: none;
}

.discovery-input:focus {
    border-color: rgba(46, 78, 173, .45);
    box-shadow: 0 0 0 2px rgba(46, 78, 173, .06);
}

.discovery-send {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--takmedi-discovery-blue);
    color: #fff;
    cursor: pointer;
}

.discovery-send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.discovery-note {
    margin-top: 6px;
    color: #8A94A6;
    font-size: 8.5px;
    line-height: 1.35;
    text-align: center;
}

@media (max-width: 600px) {
    .discovery-fab {
        right: 14px;
        bottom: 14px;
    }

    .discovery-panel {
        right: 8px;
        left: 8px;
        bottom: 70px;
        width: auto;
        max-height: calc(100vh - 90px);
        border-radius: 16px;
    }

    .discovery-starters {
        grid-template-columns: 1fr;
    }
}

/* Phase 2 recommendation cards */
.discovery-recommendations {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 8px 0 4px;
}

.discovery-hospital-card {
    overflow: hidden;
    border: 1px solid rgba(46, 78, 173, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
}

.discovery-hospital-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 9px;
    color: inherit;
    text-decoration: none;
}

.discovery-hospital-image,
.discovery-doctor-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(46, 78, 173, 0.07);
    color: #2E4EAD;
}

.discovery-hospital-image {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.discovery-hospital-image img,
.discovery-doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discovery-hospital-head strong {
    display: block;
    margin-bottom: 2px;
    color: #172033;
    font-size: 11.5px;
}

.discovery-hospital-head span {
    display: block;
    color: #6B7280;
    font-size: 9.5px;
}

.discovery-match-label,
.discovery-result-title {
    padding: 6px 9px;
    border-top: 1px solid rgba(15, 23, 42, .06);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    background: rgba(46, 78, 173, .035);
    color: #6B7280;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.discovery-doctor-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 49px;
    padding: 7px 9px;
    border-bottom: 1px solid rgba(15, 23, 42, .055);
    color: inherit;
    text-decoration: none;
}

.discovery-doctor-row:last-child {
    border-bottom: 0;
}

.discovery-doctor-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 800;
}

.discovery-doctor-copy {
    min-width: 0;
}

.discovery-doctor-copy strong {
    display: block;
    margin-bottom: 1px;
    color: #172033;
    font-size: 10.5px;
    line-height: 1.3;
}

.discovery-doctor-copy span {
    display: block;
    overflow: hidden;
    color: #6B7280;
    font-size: 8.8px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discovery-doctor-row small {
    color: #2E4EAD;
    font-size: 9px;
    font-weight: 700;
}

/* =========================================================
   TAKMEDI DISCOVERY â€” PROFESSIONAL FLOATING CTA UPGRADE
   Paste at END of assets/css/discovery-assistant.css
========================================================= */

.discovery-fab {
    right: 24px;
    bottom: 22px;
    min-height: 54px;
    padding: 7px 16px 7px 8px;
    gap: 10px;

    border: 1px solid rgba(46, 78, 173, 0.20);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.95);
    color: #203A91;

    box-shadow:
        0 14px 38px rgba(24, 38, 84, 0.16),
        0 2px 8px rgba(24, 38, 84, 0.08);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.discovery-fab:hover {
    transform: translateY(-2px);
    border-color: rgba(46, 78, 173, 0.34);

    box-shadow:
        0 18px 44px rgba(24, 38, 84, 0.20),
        0 4px 10px rgba(24, 38, 84, 0.10);
}

.discovery-fab-icon {
    position: relative;

    width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 40px;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            rgba(46, 78, 173, 0.98),
            rgba(38, 65, 150, 0.98)
        );

    color: #ffffff;

    box-shadow:
        0 7px 18px rgba(46, 78, 173, 0.24);

    overflow: visible;
}

.discovery-fab-icon i {
    position: relative;
    z-index: 2;
    font-size: 15px;
}

.discovery-fab-icon::after {
    content: "";

    position: absolute;
    inset: -4px;

    border: 1px solid rgba(46, 78, 173, 0.18);
    border-radius: 50%;

    opacity: 0.8;

    animation:
        discoverySoftPulse 2.8s ease-in-out infinite;
}

@keyframes discoverySoftPulse {
    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.32;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.70;
    }
}

.discovery-fab-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.12;
}

.discovery-fab-copy strong {
    color: #1D2B50;
    font-size: 12.5px;
    font-weight: 750;
    letter-spacing: -0.1px;
}

.discovery-fab-copy small {
    margin-top: 3px;

    color: #76819A;
    font-size: 8.7px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

/* Tiny capability badge â€” subtle, not loud */
.discovery-fab-badge {
    display: inline-flex;
    align-items: center;

    margin-left: 2px;
    padding: 3px 6px;

    border: 1px solid rgba(46, 78, 173, 0.11);
    border-radius: 999px;

    background: rgba(46, 78, 173, 0.055);

    color: #3552A6;
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

/* Make the opened panel feel like part of the same product */
.discovery-panel {
    border-color: rgba(46, 78, 173, 0.14);

    box-shadow:
        0 24px 70px rgba(16, 31, 73, 0.20),
        0 6px 20px rgba(16, 31, 73, 0.07);
}

.discovery-header {
    position: relative;
}

.discovery-header::before {
    content: "";

    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;

    height: 2px;

    border-radius: 0 0 4px 4px;

    background:
        linear-gradient(
            90deg,
            rgba(46, 78, 173, 0),
            rgba(46, 78, 173, 0.70),
            rgba(46, 78, 173, 0)
        );
}

.discovery-brand h3 {
    display: flex;
    align-items: center;
    gap: 7px;
}

.discovery-brand h3::before {
    content: "\f544";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    width: 23px;
    height: 23px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: rgba(46, 78, 173, 0.08);
    color: #2E4EAD;

    font-size: 10px;
}

@media (max-width: 600px) {
    .discovery-fab {
        right: 14px;
        bottom: 14px;
        min-height: 50px;
        padding-right: 13px;
    }

    .discovery-fab-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .discovery-fab-copy small,
    .discovery-fab-badge {
        display: none;
    }
}

/* =========================================
   DISCOVERY FAB - FINAL HIGHLIGHT
========================================= */

.discovery-fab {
    right: 24px !important;

    /* pehle se thoda upar */
    bottom: 55px !important;

    /* TAKMEDI blue */
    background: linear-gradient(
        135deg,
        #2449a4 0%,
        #315cc4 100%
    ) !important;

    border: 1px solid rgba(255, 255, 255, 0.20) !important;

    box-shadow:
        0 12px 32px rgba(36, 73, 164, 0.28),
        0 4px 12px rgba(20, 43, 100, 0.14) !important;

    color: #ffffff !important;
}

.discovery-fab:hover {
    transform: translateY(-3px) !important;

    background: linear-gradient(
        135deg,
        #1f4196 0%,
        #2b55b8 100%
    ) !important;

    box-shadow:
        0 16px 38px rgba(36, 73, 164, 0.35),
        0 5px 14px rgba(20, 43, 100, 0.18) !important;
}


/* Circular AI / Discovery icon */
.discovery-fab-icon {
    background: rgba(255, 255, 255, 0.15) !important;

    border: 1px solid rgba(255, 255, 255, 0.22);

    color: #ffffff !important;

    box-shadow: none !important;
}


/* Main text */
.discovery-fab-copy strong {
    color: #ffffff !important;
}


/* Subtitle */
.discovery-fab-copy small {
    color: rgba(255, 255, 255, 0.76) !important;
}


/* Small Discovery badge */
.discovery-fab-badge {
    background: rgba(255, 255, 255, 0.13) !important;

    border: 1px solid rgba(255, 255, 255, 0.20) !important;

    color: #ffffff !important;
}


/* Pulse around assistant icon */
.discovery-fab-icon::after {
    border-color: rgba(255, 255, 255, 0.32) !important;
}


/* Mobile */
@media (max-width: 600px) {
    .discovery-fab {
        right: 14px !important;
        bottom: 70px !important;
    }
}

/* =========================================
   DISCOVERY - CONTINUOUS SOFT SHAKE
========================================= */

.discovery-fab {
    animation: discoveryShake 1.8s ease-in-out infinite !important;
}

@keyframes discoveryShake {

    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }

    20% {
        transform: translateX(-2px) rotate(-0.7deg);
    }

    40% {
        transform: translateX(2px) rotate(0.7deg);
    }

    60% {
        transform: translateX(-2px) rotate(-0.5deg);
    }

    80% {
        transform: translateX(2px) rotate(0.5deg);
    }
}


/* Hover pe bhi animation chalti rahe */
.discovery-fab:hover {
    animation: discoveryShake 1.8s ease-in-out infinite !important;
}


/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .discovery-fab {
        animation: none !important;
    }
}