/** Tablet device **/
@media only screen and (max-width: 768px) {
  .inside-capsule-left {
    max-width: 220px;
    padding: 2.5em 15px;
  }
  .headline-myname-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .history-wrapper {
    padding: 0;
  }
  .history-wrapper .center-line {
    left: 40px;
  }
  .history-wrapper .history-row {
    margin: 30px 0 3px 80px;
  }
  .history-wrapper .history-row section {
    width: 100%;
  }
  .row-1 section::before {
    left: -7px;
  }
  .row-1 section .icon {
    left: -60px;
  }
  .history-wrapper .year_separator {
    text-align: left;
  }
}
/** Handphone device **/
@media only screen and (max-width: 576px) {
  body {
    padding: 25px 0 60px 0;
    min-height: 100vh;
  }
  .inside-capsule {
    padding: 15px;
  }
  .inside-capsule-right {
    padding-left: 15px;
    padding-right: 15px;
  }
  .inside-capsule-left {
    display: none;
  }
  .headline {
    display: initial;
  }
  .navbar-float {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(255,255,255);
    background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 40%, rgba(255,255,255,0.6) 100%);
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0 8px;
    transition: all 0.3s cubic-bezier(.53,.53,.27,1);
    will-change: all;
    display: initial;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  }
  .navbar-float.open {
    box-shadow: 0 -6px 15px rgba(0,0,0,0.2);
    padding-top: 40px;
    border-radius: 80% 80% 0 0 / 25% 25% 0 0;
  }
  .navbar-float > ul.menu {
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-evenly;
  }
  .navbar-float > ul.menu > li {
    list-style: none;
    width: 20%;
    position: relative;
  }
  .navbar-float > ul.menu > li.active:before {
    content: "";
    width: 4px;
    height: 4px;
    background: red;
    position: absolute;
    z-index: 2;
    bottom: 0;
    border-radius: 100%;
    left: calc(50% - 2px);
    box-shadow: 0px 0px 8px 4px lightpink;
  }
  .navbar-float > ul.menu > li > a.touch {
    will-change: transform, opacity;
    animation: zoomOut 0.25s cubic-bezier(.53,.53,.27,1) forwards;
  }
  .navbar-float > ul.menu > li > a {
    color: #333;
    font-size: 0.75rem;
    padding: 8px;
    display: block;
    text-align: center;
    line-height: 1.2;
    outline: none;
    position: relative;
    margin: auto;
    transition: all 0.8s ease-out;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: inherit;
  }
  .navbar-float > ul.menu > li > a > i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 3px;
    text-shadow: 0 2px 3px rgba(0, 0, 0, .3);
    transition: all 0.3s ease-out;
  }
  .navbar-float > ul.menu > li > a .badge {
    position: absolute;
    top: 5px;
    right: 0;
  }
  .navbar-float .hide {
    display: none;
  }
  .navbar-float .more-menu {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: rgb(5,0,83);
    background: linear-gradient(0deg, rgba(5,0,83,1) 0%, rgba(9,9,121,1) 41%, rgba(86,0,170,1) 100%);
    text-align: center;
    line-height: 1;
    color: #fff;
    position: relative;
    z-index: 10;
    font-size: 1.5rem;
    margin: -16px auto auto;
    transition: all 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
    border-top: 1px solid rgba(255,255,255,50%);
    padding-top: 12px;
    cursor: pointer;
  }
  .navbar-float .more-menu span {
    font-size: 9px;
    display: block;
  }
  .navbar-float .more-menu i:before {
    content: "\f0c9";
    font-family: "Font Awesome 6 Free";
    animation: spinSpin 3s ease;
    animation-delay: 2s;
    animation-iteration-count: 1;
    display: block;
    font-style: normal;
  }
  .navbar-float.open > ul.menu {
    flex-wrap: wrap;
  }
  .navbar-float.open > ul.menu > li {
    flex: 1 0 20%;
    margin-bottom: 20px;
  }
  .navbar-float.open .more-menu {
    margin-top: -60px;
  }
  .navbar-float.open .more-menu i:before {
    content: "\f00d";
  }
  .navbar-float.open > ul.menu > li > a {
    color: #000;
  }
  .navbar-float.open > ul.menu > li > a > i {
    font-size: 1.8rem;;
  }
  .navbar-float.open .hide {
    display: initial;
  }
  .profile-avatar {
    width: 8rem;
    height: 8rem;
  }
  .card-left {
    border-right: none;
    border-bottom: 1px solid #ccc;
  }
  .card-left a.badge {
    display: block !important;
    width: fit-content;
    margin: auto;
  }
  .card-right {
    padding: 0px;
  }
  .card-right.padding-inside {
    padding: 15px;
  }
  .card-right table {
    font-size: 0.875rem;
  }
  .card-right table td:nth-child(1) {
    line-height: 1.2;
    width: 35%;
    padding-left: 15px;
    border-right: 1px solid #ddd;
  }
  .card-right table tr {
    vertical-align: middle;
    background: linear-gradient(0deg, rgba(240,240,240,1) 0%, rgba(255,255,255,1) 100%);
  }
  .submenu-wrapper {
    left: 8px;
    top: 45px;
    right: 8px;
    width: initial;
    z-index: 8;
  }
  .history-wrapper {
    padding: 0 10px;
  }
  .history-wrapper .history-row {
    margin: 30px 0 3px 70px;
  }
  .rx-header .rx-head span {
    display: block;
  }
  .rx-header .rx-head {
    background: linear-gradient(0deg, rgba(240,240,240,1) 0%, rgba(255,255,255,1) 100%);
  }
  .modal-dialog {
    margin-top: 70px;
  }
}

/** Small scale device **/
@media only screen and (max-width: 375px) {
  html {
    margin: 0;
    padding: 0;
    left: 0;
    right: 0;
  }
  body {
    padding: 42px 0 60px 0;
  }
  #capsule {
    margin: 0 0 20px 0;
  }
  .headline {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 0;
    height: 40px;
    right: 0;
    left: 0;
    padding-top: 5px;
  }
  .headline .headline-myname-text small {
    display: none;
  }
  .profile-avatar {
    width: 7rem;
    height: 7rem;
    border-width: 0.2rem;
  }
  .navbar-float .more-menu {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .navbar-float.open ul.menu li a i {
    font-size: 1.6rem;
  }
  .history-wrapper {
    padding: 0;
  }
  .history-wrapper .center-line,
  .history-row section::before,
  .history-row section .icon {
    display: none;
  }
  .history-wrapper .history-row {
    margin: 10px 0;
  }
  #notification-list .notify-action {
    font-size: 120%;
  }
  #notification-list .icon-text {
    display: none;
  }
}

/*@media (prefers-color-scheme: dark) {*/
  html.dark {
    background: rgba(9,9,121,1);
    background: linear-gradient(145deg, rgba(4,4,60,1) 0%, rgba(19,55,90,1) 30%, rgba(58,13,80,1) 65%, rgba(88,19,50,1) 100%);
  }
  body.dark,
  body.dark table td,
  body.dark .list-group-item {
    color: #fff;
    text-shadow: 0 0px 3px rgba(0, 0, 0, 0.7);
  }
  body.dark #capsule {
    box-shadow: 0px 8px 16px rgba(0,0,0,0.32),inset 0px 1px 0px rgba(255,255,255,0.2);
  }
  body.dark .list-group-item {
    border-color: rgba(204,204,204,0.6);
  }
  body.dark .bg-warning {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
  }
  body.dark a,
  body.dark a:hover,
  body.dark a:active,
  body.dark a:visited {
    color: #4EAFFF;
    text-shadow: none;
  }
  body.dark a.btn {
    color: #fff;
  }
  body.dark .btn-outline-secondary {
    border-color: #aaa;
    color: #aaa;
  }
  body.dark strong {
    color: #fdfdfd;
  }
  body.dark .alert-warning strong {
    color: #664d03;
  }
  body.dark .logo img,
  body.dark .big-logo img {
    content: url("../images/myubat-logo-dark.png");
  }
  body.dark #capsule {
    background: rgba(60,60,60,0.93);
  }
  body.dark .inside-capsule-left {
    color: #fff;
  }
  body.dark .myname-text,
  body.dark .myname-text strong,
  body.dark .menu-item a {
    color: #e0e0e0;
  }
  body.dark .myname.open .myname-text,
  body.dark .myname:hover .myname-text,
  body.dark .myname.open .myname-text strong,
  body.dark .myname:hover .myname-text strong,
  body.dark .menu-item:hover a,
  body.dark .menu-item.active a,
  body.dark .select-filter select {
    color: #333;
  }
  body.dark .select-filter select {
    background: #fff;
  }
  body.dark ul.submenu li a,
  body.dark ul.submenu li a strong {
    color: #333;
  }
  body.dark button.btn-language,
  body.dark .credit a {
    color: #eaeaea;
  }
  body.dark input[type="text"]:hover,
  body.dark input[type="text"]:active,
  body.dark input[type="text"]:focus,
  body.dark input[type="password"]:hover,
  body.dark input[type="password"]:active,
  body.dark input[type="password"]:focus,
  body.dark input[type="date"]:hover,
  body.dark input[type="date"]:active,
  body.dark input[type="date"]:focus,
  body.dark input[type="file"]:hover,
  body.dark input[type="file"]:active,
  body.dark input[type="file"]:focus,
  body.dark input[type="submit"]:hover,
  body.dark input[type="submit"]:active,
  body.dark input[type="submit"]:focus,
  body.dark input[type="email"]:hover,
  body.dark input[type="email"]:active,
  body.dark input[type="email"]:focus,
  body.dark input[type="tel"]:hover,
  body.dark input[type="tel"]:active,
  body.dark input[type="tel"]:focus,
  body.dark textarea:hover,
  body.dark textarea:active,
  body.dark textarea:focus,
  body.dark select:hover,
  body.dark select:active,
  body.dark select:focus {
    border-color: rgba(288,0,288,1) !important;
  }
  body.dark .title,
  body.dark .subtitle {
    color: #fff;
  }
  body.dark .i-green {
    color: rgb(13, 206, 34);
    text-shadow: none;
  }
  body.dark nav.subnav {
    background: rgba(255,255,255,0.65);
  }
  body.dark nav.subnav ul li a {
    color: #0048b3;
  }
  body.dark nav.subnav ul li.active a {
    color: #fff;
  }
  body.dark .submission {
    background: #777;
  }
  body.dark .card-appointment {
    background: #6d6d6d;
  }
  body.dark table td,
  body.dark .list-group,
  body.dark .list-group-item {
    background: #6d6d6d;
  }
  body.dark .text-reset,
  body.dark input#counter {
    color: #333;
  }
  body.dark .text-muted {
    color: #f5f5f5 !important;
  }
  body.dark .form-control,
  body.dark select,
  body.dark fieldset.form-wrapper {
    background-color: #4e4e4e;
    color: #f2f2f2;
  }
  body.dark .invalid-feedback {
    color: #ff8a95;
  }
  body.dark .form-control:focus {
    background-color: #5e5e5e;
    color: #f2f2f2;
  }
  body.dark .form-control:disabled,
  body.dark .form-control:read-only:not(input[type="file"], select) {
    background-color: #2e2e2e;
    color: rgba(221,221,221,0.7);
  }
  body.dark .form-floating label {
    color: #c4c4c4 !important;
  }
  body.dark .box-info,
  body.dark .text-bg-warning,
  body.dark .jconfirm-box,
  body.dark .modal-dialog,
  body.dark .upload-desc,
  body.dark #tip,
  body.dark #settings-wrapper,
  body.dark #settings-wrapper strong {
    text-shadow: none;
  }
  body.dark .box-info i,
  body.dark .box-info strong,
  body.dark .jconfirm-box,
  body.dark .jconfirm-box i,
  body.dark .jconfirm-box strong,
  body.dark .modal-dialog,
  body.dark #next-box,
  body.dark #settings-wrapper,
  body.dark #settings-wrapper strong {
    color: #333;
  }
  body.dark .service-info {
    color: #ff5bff;
  }
  body.dark .notify-date {
    color: #ffc;
  }
  body.dark .notify-text {
    color: #fff;
  }
  body.dark .history-wrapper .history-row section,
  body.dark .history-wrapper .history-row section::before {
    background-color: #474747;
  }
  body.dark .history-row section .details {
    color: #ff40ff;
  }
  body.dark .history-wrapper .year_separator span {
    color: #333;
    text-shadow: none;
  }
  body.dark .history-row section .icon,
  body.dark .center-line .scroll-icon,
  body.dark .alert,
  body.dark .small-avatar,
  body.dark .headline-avatar,
  body.dark .myname-text {
    text-shadow: none;
  }
  body.dark .rx-wrapper {
    background: rgba(64, 64, 64, 0.6);
  }
  body.dark .rx-header .row {
    background: linear-gradient(0deg, rgba(120,120,120,1) 0%, rgba(127,127,127,1) 100%);
  }
  body.dark .text-bg-light,
  body.dark .rx-header .rx-head {
    color: #000;
    text-shadow: none;
  }
  body.dark .icon-blank i {
    color: #FF81FF;
  }
  body.dark .rx-rows {
    background: #6b6b6b;
  }
  body.dark .text-bg-light .text-muted,
  body.dark .rx-rows .rx-item {
    color: #bdbdbd;
  }
  body.dark .rx-rows .rx-item span {
    color: #fff;
  }
  body.dark .rx-rows .rx-generic {
    background-color: #e5e500 !important;
    color: #000;
    text-shadow: none;
  }
  body.dark .img-thumbnail {
    background-color: #333;
  }
  body.dark .select-subtitle .selection .select2-selection__rendered,
  body.dark #facility .selection .select2-selection__rendered {
    color: #333;
    text-shadow: none;
  }
  body.dark .list-group-item-action:focus,
  body.dark .list-group-item-action:hover {
    background-color: #333;
    color: #fff;
  }
  body.dark .accordion-item .accordion-button,
  body.dark .accordion-item .accordion-button strong,
  body.dark .queue-gps {
    color: #333;
    text-shadow: none;
  }
  body.dark .ticket-body,
  body.dark .ticket-article {
    color: #f0f0f0;
  }
  body.dark .ticket-article-header,
  body.dark .ticket-article-header strong {
    text-shadow: none;
    color: #111;
  }
  body.dark .processing {
    background: rgba(0,0,0,0.7);
  }
  body.dark .faq .accordion-item .accordion-body {
    background-color: rgba(255, 255, 255, 0.9);
  }
  body.dark .faq .accordion-item .accordion-button {
    background-color: rgba(97, 9, 121, 0.7);
    color: #fff;
  }
  body.dark .faq .accordion-item .accordion-button.collapsed {
    color: #f2f2f2;
  }
  body.dark .accordion-item .accordion-body,
  body.dark .faq .accordion-item .accordion-body {
    text-shadow: none;
  }
  body.dark .medx-wrapper {
    text-shadow: none !important;
    color: #000;
  }
  body.dark .medx-wrapper strong {
    color: purple;
  }
  body.dark .mintitle,
  body.dark #medx .list-group {
    color: #fff;
  }
  body.dark #medx .list-group .drugs-dosage {
    color: #eee;
  }
  body.dark .nav-action .nav-btn {
    color: #333 !important;
  }
  body.dark .nav-action .nav-btn.success {
    color: #fff !important;
  }
  @media only screen and (max-width: 576px) {
    body.dark .card-right table tr td {
      background: linear-gradient(0deg, rgba(80,80,80,1) 0%, rgba(95,95,95,1) 100%);
    }
  }
/*}*/

/** Prevent the keyboard hidden space **/
@media (max-height: 500px) {
  .navbar-float {
    display: none;
  }
}