/* Bell Equipment Branding Styles */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
    background-color: #fff;
    position: relative;
    margin: 0;
    min-height: 100%;
}

.bg-bell-yellow {
    background-color: #FDBB30;
}

/* Bell Header Branding */
.leftbrand {
    display: block;
    float: left;
    padding-top: 25px;
    padding-right: 20px;
    padding-bottom: 0px;
}

.leftbrand .logo {
    float: left;
    width: 145px;
}

.leftbrand .logo img {
    max-width: 100%;
    height: auto;
}

.leftbrand .country {
    float: left;
    color: #000000;
    text-transform: uppercase;
    vertical-align: text-bottom;
    font-size: 14px;
    line-height: 24px;
    padding-top: 23px;
    padding-left: 14px;
    font-weight: 300;
}

.leftbrand .brandmessage {
    clear: both;
    color: #555;
    font-size: 9px;
    padding-top: 5px;
    line-height: 8px;
    font-weight: 800;
    padding-bottom: 10px;
    padding-top: 3%;
}

/* Navbar Styles */
.navbar {
    padding: 0 1rem;
}

.navbar-nav .dropdown-menu {
    background-color: #ffcf6b;
}

.dropdown a {
    display: block;
}

/* Nested dropdown submenu (e.g. Maintenance > Support Admin) */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-submenu > a.dropdown-item::after {
    content: "";
    display: inline-block;
    float: right;
    margin-top: 6px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid #333;
}

.mdl-navigation__link {
    color: black;
}

.logout:hover {
    background-color: white !important;
    color: black;
}

.active, .nav-item:hover {
    background-color: white;
}

/* Application Cards */
.card {
    border: none;
}

.card-title {
    padding: 5%;
    border-radius: 5px;
    font-weight: bold;
    background-color: #e7e7e7;
    font-size: 14px;
}

.card:hover .card-title {
    background-color: #FDBB30;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.card:hover .img {
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
    border-radius: 5px;
    cursor: pointer;
}

/* Header Sections */
.header-span h3 {
    color: white;
    padding-left: 25px;
    padding-top: 5px;
    padding-bottom: 5px;
    background-color: #FDBB30;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
    margin-left: 1%;
    margin-right: 1%;
    font-size: 20px;
}

/* Application Overview Tooltip */
.app-overview {
    position: absolute;
    top: 78%;
    left: 50%;
    transform: translate(-50%);
    background-color: #FFF;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    display: none;
    width: auto;
    min-width: 275px;
    max-width: 350px;
    min-height: 100px;
    z-index: 999;
    margin-top: 40px;
    font-size: 12px;
}

/* Show on hover only when overview is enabled */
body:not(.hide-overview) li:hover .app-overview {
    display: block;
    opacity: 1;
}

/* When overview is disabled, never show */
body.hide-overview .app-overview {
    display: none !important;
}

li {
    position: relative;
}

.gallery ul li {
    background: none;
}

/* Social Float */
.float-sm.floatsocial {
    position: fixed;
    z-index: 1000;
}

.floatsocial .fl-fl {
    background: #000000;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 4px;
    width: 190px;
    position: fixed;
    right: -165px;
    z-index: 1000;
    font: normal normal 10px Arial;
    transition: all .25s ease;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0);
}

.floatsocial .fa {
    font-size: 15px;
    color: #fff;
    padding: 10px 0;
    width: 40px;
}

.floatsocial .fl-fl:hover {
    right: 0;
}

.floatsocial .fl-fl a {
    color: #fff !important;
    text-decoration: none;
    text-align: center;
    line-height: 43px !important;
    vertical-align: top !important;
}

.floatsocial .float-fb {
    top: 240px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    transition: background-color 0.4s;
    border-radius: 20px;
}

.slider:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    transition: transform 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #fdd835;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .leftbrand .brandmessage {
        font-size: 11px;
    }

    .leftbrand .country {
        font-size: 24px;
        padding-top: 21px;
    }
}

@media screen and (max-width: 990px) {
    .dropdown a {
        width: calc(100% - 10px);
        height: 40px;
        text-align: left;
        line-height: 40px;
        font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
        font-size: 14px;
        color: #ffffff;
        padding: 0px 0px 0px 10px;
        border-bottom: solid 0px #ffcf6b;
    }

    .navbar-nav .dropdown-menu {
        background-color: black;
    }
}

/* ===== Help launcher (bottom-right) ===== */
.help-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: Arial, sans-serif;
}

.help-launcher-btn {
    touch-action: none; /* lets the truck be dragged up/down on touch screens */
    width: 72px;
    height: 72px;
    padding: 6px;
    border: 3px solid #FDBB30;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: help-wiggle 18s ease-in-out 6s infinite;
}

.help-launcher-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.help-launcher-btn:hover,
.help-launcher-btn:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    animation: none;
}

.help-launcher-btn:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Dragged into the upper half: card opens below the truck instead of above */
.help-launcher.flip {
    flex-direction: column-reverse;
}

.help-launcher.dragging .help-launcher-btn {
    animation: none;
    transition: none;
    cursor: grabbing;
}

.help-launcher-btn { cursor: grab; }

/* "Reset position" only shows once the truck has been moved */
.help-card .help-card-reset {
    display: none;
    width: 100%;
    margin-top: 4px;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 12px;
    text-align: left;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.help-launcher.moved .help-card .help-card-reset {
    display: block;
}

.help-card .help-card-reset:hover {
    background: #f3f3f3;
}

/* Small wiggle once every ~18s, otherwise still */
@keyframes help-wiggle {
    0%, 6%, 100% { transform: translateY(0) rotate(0); }
    1% { transform: translateY(-8px) rotate(-6deg); }
    2% { transform: translateY(0) rotate(5deg); }
    3% { transform: translateY(-5px) rotate(-4deg); }
    4% { transform: translateY(0) rotate(3deg); }
    5% { transform: translateY(-2px) rotate(0); }
}

.help-blurb {
    display: none;
    align-items: center;
    gap: 8px;
    position: absolute;
    right: 84px;
    bottom: 22px;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    padding: 9px 10px 9px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.help-blurb::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    margin-top: -7px;
    border-left: 8px solid #000;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.help-launcher.show-blurb .help-blurb {
    display: flex;
    animation: help-pop .35s ease-out;
}

.help-launcher.open .help-blurb {
    display: none;
}

@keyframes help-pop {
    from { opacity: 0; transform: translateX(10px) scale(.9); }
    to   { opacity: 1; transform: none; }
}

.help-blurb-close {
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 20px;
    font-size: 16px;
    padding: 0;
    cursor: pointer;
}

.help-blurb-close:hover {
    background: #FDBB30;
    color: #000;
}

.help-card {
    display: none;
    width: 260px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 14px;
    animation: help-pop .2s ease-out;
}

.help-launcher.open .help-card {
    display: block;
}

.help-card-title {
    font-weight: 700;
    font-size: 15px;
    color: #000;
    margin: 2px 4px 10px;
}

.help-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
}

.help-card .help-card-primary {
    background: #FDBB30;
    color: #000 !important;
    font-weight: 700;
    padding: 11px 14px;
    margin-bottom: 6px;
}

.help-card .help-card-primary:hover {
    background: #e9a91c;
}

.help-card .help-card-link {
    color: #222 !important;
    padding: 9px 14px;
}

.help-card .help-card-link:hover {
    background: #f3f3f3;
}

.help-card a i {
    width: 18px;
    text-align: center;
}

/* Keep transient MudBlazor snackbars (bottom-right) clear of the launcher */
body:has(.help-launcher) .mud-snackbar-location-bottom-right {
    bottom: 110px !important;
}

@media (prefers-reduced-motion: reduce) {
    .help-launcher-btn { animation: none; transition: none; }
    .help-blurb, .help-card { animation: none !important; }
}

@media print {
    .help-launcher { display: none !important; }
}

/* ===== Help card for signed-out visitors (/register, /migrate) ===== */
.help-card.help-card-wide {
    width: 340px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.help-card .help-faq {
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    margin-bottom: 6px;
}

.help-card .help-faq summary {
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.help-card .help-faq p {
    margin: 0;
    padding: 0 12px 10px;
    font-size: 13px;
    color: #444;
    white-space: pre-line;
}

.help-card .help-form-heading {
    font-weight: 700;
    font-size: 14px;
    color: #000;
    margin: 12px 4px 4px;
    padding-top: 10px;
    border-top: 1px solid #e2e2e2;
}

.help-card .help-form label {
    display: block;
    font-size: 12px;
    color: #555;
    margin: 8px 4px 2px;
}

.help-card .help-form input[type=text],
.help-card .help-form input[type=email],
.help-card .help-form input[type=tel],
.help-card .help-form select,
.help-card .help-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #aaa;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}

.help-card .help-form input[readonly] {
    background: #eee;
}

.help-card .help-form textarea {
    resize: vertical;
    min-height: 64px;
}

.help-card .help-form altcha-widget {
    display: block;
    margin-top: 12px;
}

/* Honeypot: off-screen for people, still present for bots that fill every field */
.help-card .help-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.help-card .help-error {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fdecea;
    border: 1px solid #f0a8a2;
    color: #b3261e;
    font-size: 13px;
}

.help-card .help-send {
    margin-top: 12px;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-radius: 12px;
    background: #FDBB30;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.help-card .help-send:hover:not(:disabled) {
    background: #e9a91c;
}

.help-card .help-send:disabled {
    opacity: .6;
    cursor: default;
}

.help-card .help-thanks {
    text-align: center;
    padding: 18px 8px 12px;
}

.help-card .help-thanks i {
    font-size: 40px;
    color: #1b7f3b;
}

.help-card .help-thanks p {
    margin: 10px 0 0;
    font-size: 15px;
    color: #222;
}

/* Two-view help card: quick answers, then the message form (no scrolling needed) */
.help-card .help-stuck {
    margin-top: 10px;
}

.help-card .help-form-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-card .help-back {
    border: 0;
    background: #f3f3f3;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: #222;
}

.help-card .help-back:hover {
    background: #FDBB30;
}

.help-card .help-form label {
    margin-top: 6px;
}

.help-card .help-form input[type=text],
.help-card .help-form input[type=email],
.help-card .help-form input[type=tel],
.help-card .help-form select {
    padding: 6px 10px;
}

.help-card .help-form textarea {
    min-height: 56px;
}

.help-card .help-form altcha-widget {
    margin-top: 8px;
}

.help-card .help-form input,
.help-card .help-form select,
.help-card .help-form textarea,
.help-card .help-form altcha-widget,
.help-card .help-send {
    box-sizing: border-box;
    max-width: 100%;
}

.help-card.help-card-wide {
    overflow-x: hidden;
}

.help-card .help-form altcha-widget {
    --altcha-max-width: 100%;
}

.help-card .help-stuck {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.help-card .help-link-btn {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 0;
    background: none;
    color: #222;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.help-card .help-link-btn:hover {
    color: #000;
    background: #f3f3f3;
    border-radius: 10px;
}
