
/* ==========================================================
   MDM UROLOGY - FLOATING PATIENT SUPPORT
   Independent production component
   ========================================================== */

:root {
    --mdm-support-blue: #335c9a;
    --mdm-support-dark: #234674;
    --mdm-support-gold: #c6964a;
    --mdm-support-light: #e4c995;
    --mdm-support-ink: #17253a;
    --mdm-support-muted: #718096;
    --mdm-support-white: #ffffff;
    --mdm-support-border: #e8edf3;
}

/* Main floating container */

.mdm-helpdesk {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 999;

    font-family: "DM Sans", sans-serif;
}

/* ==========================================================
   FLOATING BUTTON
   ========================================================== */

.mdm-helpdesk-trigger {
    width: 76px;
    height: 76px;

    position: relative;

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

    padding: 5px;

    border: 3px solid var(--mdm-support-gold);
    border-radius: 50%;

    background: white;

    box-shadow: 0 8px 30px rgba(35, 70, 116, 0.22);

    cursor: pointer;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        background .3s ease;
}

.mdm-helpdesk-trigger:hover {
    transform: translateY(-5px);

    box-shadow: 0 14px 35px rgba(35, 70, 116, 0.25);
}

.mdm-helpdesk-trigger:focus-visible,
.mdm-helpdesk-close:focus-visible,
.mdm-helpdesk-contact-button:focus-visible,
.mdm-helpdesk-option:focus-visible {
    outline: 3px solid var(--mdm-support-gold);
    outline-offset: 4px;
}

/* Doctor image */

.mdm-trigger-image {
    width: 100%;
    height: 100%;

    border-radius: 50%;

    object-fit: contain;

    background: white;
}

.mdm-trigger-fallback {
    display: none;

    color: var(--mdm-support-blue);

    font-size: 29px;
    font-weight: 800;
}

/* Notification indicator */

.mdm-helpdesk-notification {
    width: 13px;
    height: 13px;

    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 3;

    background: #29a36a;

    border: 2px solid white;
    border-radius: 50%;
}

/* Tooltip */

.mdm-helpdesk-tooltip {
    position: absolute;
    right: 88px;

    width: max-content;
    max-width: 180px;

    padding: 10px 14px;

    color: white;
    background: var(--mdm-support-dark);

    border-radius: 5px;

    font-size: 11px;
    font-weight: 700;

    opacity: 0;
    visibility: hidden;

    transform: translateX(8px);

    transition: all .25s ease;

    pointer-events: none;
}

.mdm-helpdesk-tooltip::after {
    content: "";

    position: absolute;
    top: 50%;
    left: 100%;

    border: 6px solid transparent;
    border-left-color: var(--mdm-support-dark);

    transform: translateY(-50%);
}

.mdm-helpdesk-trigger:hover .mdm-helpdesk-tooltip,
.mdm-helpdesk-trigger:focus-visible .mdm-helpdesk-tooltip {
    opacity: 1;
    visibility: visible;

    transform: translateX(0);
}

/* ==========================================================
   HELP DESK PANEL
   ========================================================== */

.mdm-helpdesk-panel {
    width: 390px;
    max-width: calc(100vw - 32px);

    max-height: min(680px, calc(100vh - 125px));

    position: absolute;
    right: 0;
    bottom: 92px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: white;

    border: 1px solid var(--mdm-support-border);
    border-radius: 12px;

    box-shadow: 0 20px 70px rgba(23, 37, 58, 0.20);

    transform-origin: bottom right;

    animation: mdmPanelAppear .28s ease both;
}

/* Never display a closed panel */

.mdm-helpdesk-panel[hidden] {
    display: none !important;
}

@keyframes mdmPanelAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================
   PANEL HEADER
   ========================================================== */

.mdm-helpdesk-header {
    min-height: 82px;

    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    background: linear-gradient(
        115deg,
        var(--mdm-support-dark),
        var(--mdm-support-blue)
    );

    color: white;
}

.mdm-helpdesk-profile {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 12px;
}

.mdm-helpdesk-avatar {
    width: 46px;
    height: 46px;

    position: relative;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    overflow: hidden;

    border: 2px solid var(--mdm-support-light);
    border-radius: 50%;

    background: white;
}

.mdm-helpdesk-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.mdm-avatar-fallback {
    display: none;

    color: var(--mdm-support-blue);
    font-size: 27px;
    font-weight: 800;
}

.mdm-helpdesk-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mdm-helpdesk-header-text strong {
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 800;
}

.mdm-helpdesk-header-text small {
    color: #e1e9f3;
    font-size: 10px;
}

/* Close button */

.mdm-helpdesk-close {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    background: rgba(255,255,255,.12);

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;

    cursor: pointer;

    transition: background .2s ease;
}

.mdm-helpdesk-close:hover {
    background: rgba(255,255,255,.24);
}

.mdm-helpdesk-close svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ==========================================================
   PANEL BODY
   ========================================================== */

.mdm-helpdesk-body {
    padding: 22px 19px;

    overflow-y: auto;
    overscroll-behavior: contain;
}

.mdm-helpdesk-greeting {
    margin-bottom: 20px;
}

.mdm-helpdesk-label {
    color: var(--mdm-support-gold);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .18em;
}

.mdm-helpdesk-greeting h3 {
    margin: 8px 0;

    color: var(--mdm-support-dark);

    font-family: "Manrope", sans-serif;
    font-size: 21px;
    line-height: 1.3;
}

.mdm-helpdesk-greeting p {
    margin: 0;

    color: var(--mdm-support-muted);

    font-size: 11px;
    line-height: 1.8;
}

/* ==========================================================
   QUICK ASSISTANCE OPTIONS
   ========================================================== */

.mdm-helpdesk-options {
    display: grid;
    gap: 9px;
}

.mdm-helpdesk-option {
    min-height: 67px;

    padding: 10px 11px;

    display: flex;
    align-items: center;
    gap: 11px;

    background: #fafbfd;

    border: 1px solid var(--mdm-support-border);
    border-radius: 7px;

    transition:
        background .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.mdm-helpdesk-option:hover {
    background: #f1f5fa;

    border-color: rgba(51,92,154,.35);

    transform: translateX(3px);
}

/* Option icons */

.mdm-option-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;
    flex-shrink: 0;

    color: var(--mdm-support-blue);

    background: #eaf0f8;

    border-radius: 6px;
}

.mdm-option-icon svg {
    width: 20px;
    height: 20px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Option information */

.mdm-helpdesk-option > span:nth-child(2) {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mdm-helpdesk-option strong {
    color: var(--mdm-support-dark);

    font-size: 11px;
    font-weight: 800;
}

.mdm-helpdesk-option small {
    color: var(--mdm-support-muted);

    font-size: 9px;
}

.mdm-option-arrow {
    margin-left: auto;

    color: var(--mdm-support-gold);

    font-size: 16px;
    font-weight: 800;
}

/* ==========================================================
   CONTACT ACTION
   ========================================================== */

.mdm-helpdesk-contact {
    margin-top: 20px;

    padding: 17px;

    background: var(--mdm-support-gold);

    border-radius: 7px;

    text-align: center;
}

.mdm-helpdesk-contact p {
    margin: 0 0 12px;

    color: #fff;

    font-size: 11px;
    font-weight: 700;
}

.mdm-helpdesk-contact-button {
    min-height: 42px;

    padding: 11px 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    color: var(--mdm-support-dark);

    background: white;

    border-radius: 4px;

    font-size: 11px;
    font-weight: 800;

    transition:
        background .2s ease,
        transform .2s ease;
}

.mdm-helpdesk-contact-button:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* ==========================================================
   MEDICAL DISCLAIMER
   ========================================================== */

.mdm-helpdesk-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: 17px;
    padding-top: 14px;

    border-top: 1px solid var(--mdm-support-border);
}

.mdm-disclaimer-icon {
    color: var(--mdm-support-gold);
    font-size: 15px;
    flex-shrink: 0;
}

.mdm-helpdesk-disclaimer p {
    margin: 0;

    color: var(--mdm-support-muted);

    font-size: 9px;
    line-height: 1.7;
}

/* ==========================================================
   RESPONSIVE TABLET
   ========================================================== */

@media (max-width: 760px) {

    .mdm-helpdesk {
        right: 18px;
        bottom: 18px;
    }

    .mdm-helpdesk-panel {
        width: min(380px, calc(100vw - 36px));
        max-height: calc(100vh - 115px);

        bottom: 88px;
    }

    .mdm-helpdesk-trigger {
        width: 66px;
        height: 66px;
    }

    .mdm-helpdesk-tooltip {
        display: none;
    }

}

/* ==========================================================
   RESPONSIVE MOBILE
   ========================================================== */

@media (max-width: 420px) {

    .mdm-helpdesk {
        right: 13px;
        bottom: 13px;
    }

    .mdm-helpdesk-panel {
        width: calc(100vw - 26px);
        max-height: calc(100vh - 105px);

        bottom: 82px;
    }

    .mdm-helpdesk-trigger {
        width: 62px;
        height: 62px;
    }

    .mdm-helpdesk-body {
        padding: 18px 15px;
    }

}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .mdm-helpdesk *,
    .mdm-helpdesk *::before,
    .mdm-helpdesk *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

}

