.omail-header-tool,
.omail-quick-settings-panel {
  display: none;
}

@media screen and (min-width: 769px) {
  body.task-mail.action-none {
    --omail-density-row-height: 40px;
  }

  body.task-mail.action-none[data-omail-theme="plain"] {
    background-color: #f6f8fc !important;
    background-image: none !important;
  }

  body.task-mail.action-none[data-omail-theme="sky"] {
    background-image: url("../images/bgimage.jpg") !important;
  }

  body.task-mail.action-none[data-omail-theme="kiss"] {
    background-image: url("../images/kiss.webp") !important;
  }

  body.task-mail.action-none[data-omail-theme="pig"] {
    background-image: url("../images/pig.png") !important;
  }

  body.task-mail.action-none[data-omail-theme="city"] {
    background-image: url("../images/city.jpg") !important;
  }

  body.task-mail.action-none #omail-topbar,
  body.task-mail.action-none.omail-sidebar-collapsed #omail-topbar {
    right: 168px;
  }

  .omail-header-tool {
    position: fixed;
    top: 12px;
    z-index: 1005;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    color: #3c4043;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition:
      color 140ms ease,
      background-color 140ms ease,
      transform 150ms cubic-bezier(0.2, 0, 0, 1);
  }

  .omail-header-tool:hover,
  .omail-header-tool:focus-visible,
  .omail-header-tool[aria-expanded="true"] {
    color: #202124;
    background: rgba(60, 64, 67, 0.12);
    outline: 0;
  }

  .omail-header-tool:focus-visible {
    box-shadow: 0 0 0 2px #0b57d0;
  }

  .omail-header-tool:active {
    transform: scale(0.92);
  }

  .omail-header-tool::before {
    font-family: Icons;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
  }

  .omail-quick-settings-button {
    right: 114px;
  }

  .omail-quick-settings-button::before {
    content: "\f013";
  }

  .omail-contacts-button {
    right: 64px;
  }

  .omail-contacts-button::before {
    content: "\f0c0";
  }

  .omail-quick-settings-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    bottom: 12px;
    z-index: 1090;
    display: block;
    width: min(360px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden auto;
    color: #202124;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(95, 99, 104, 0.18);
    border-radius: 12px;
    box-shadow:
      0 12px 32px rgba(32, 33, 36, 0.22),
      0 2px 8px rgba(32, 33, 36, 0.12);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
    opacity: 0;
    transform: translate3d(18px, 0, 0);
    transform-origin: top right;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 220ms cubic-bezier(0.2, 0, 0, 1);
  }

  .omail-quick-settings-panel[hidden] {
    display: none;
  }

  .omail-quick-settings-panel.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .omail-quick-settings-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    min-height: 60px;
    padding: 8px 10px 8px 20px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e4e7eb;
    backdrop-filter: blur(14px);
  }

  .omail-quick-settings-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
  }

  .omail-quick-settings-close {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: #444746;
    font-size: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }

  .omail-quick-settings-close::before {
    content: "\f00d";
    font-family: Icons;
    font-size: 17px;
    font-weight: 900;
  }

  .omail-quick-settings-close:hover,
  .omail-quick-settings-close:focus-visible {
    background: #edf1f5;
    outline: 0;
  }

  .omail-quick-settings-all {
    display: flex;
    min-height: 40px;
    margin: 14px 18px 10px;
    align-items: center;
    justify-content: center;
    color: #0b57d0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #747775;
    border-radius: 20px;
    transition:
      background-color 140ms ease,
      border-color 140ms ease;
  }

  .omail-quick-settings-all:hover,
  .omail-quick-settings-all:focus-visible {
    color: #0842a0;
    text-decoration: none;
    background: #edf4ff;
    border-color: #0b57d0;
    outline: 0;
  }

  .omail-quick-section {
    padding: 15px 18px 17px;
    border-top: 1px solid #e4e7eb;
  }

  .omail-quick-section h3 {
    margin: 0 0 12px;
    color: #3c4043;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .omail-quick-options {
    display: grid;
    gap: 6px;
  }

  .omail-quick-option {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 68px;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 4px 6px;
    color: #3c4043;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 120ms ease;
  }

  .omail-quick-option:hover {
    background: #f1f3f4;
  }

  .omail-quick-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0b57d0;
  }

  .omail-quick-preview {
    display: grid;
    width: 62px;
    height: 34px;
    padding: 5px 7px;
    align-content: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #c9cdd2;
    border-radius: 4px;
  }

  .omail-quick-preview::before,
  .omail-quick-preview::after {
    content: "";
    display: block;
    height: 3px;
    background: #aab0b6;
    border-radius: 2px;
  }

  .omail-quick-preview::after {
    width: 76%;
  }

  .omail-quick-preview.density-default {
    gap: 5px;
  }

  .omail-quick-preview.density-comfortable {
    gap: 7px;
  }

  .omail-quick-preview.inbox-important::after {
    width: 34%;
    background: #f4b400;
  }

  .omail-quick-preview.inbox-unread::before {
    background: #0b57d0;
  }

  .omail-quick-preview.inbox-starred::after {
    width: 16px;
    background: #f4b400;
  }

  .omail-quick-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .omail-quick-theme {
    position: relative;
    display: grid;
    min-width: 0;
    padding: 0 0 6px;
    gap: 5px;
    color: #3c4043;
    font-size: 12px;
    text-align: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
  }

  .omail-quick-theme:hover,
  .omail-quick-theme:focus-visible {
    background: #f1f3f4;
    outline: 0;
  }

  .omail-quick-theme.is-active {
    color: #001d35;
    font-weight: 600;
    border-color: #0b57d0;
  }

  .omail-quick-theme-swatch {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid rgba(95, 99, 104, 0.2);
    border-radius: 5px 5px 0 0;
  }

  .omail-quick-theme-swatch.sky {
    background-image: url("../images/bgimage.jpg");
  }

  .omail-quick-theme-swatch.kiss {
    background-image: url("../images/kiss.webp");
  }

  .omail-quick-theme-swatch.pig {
    background-image: url("../images/pig.png");
  }

  .omail-quick-theme-swatch.city {
    background-image: url("../images/city.jpg");
  }

  .omail-quick-range-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #3c4043;
    font-size: 14px;
  }

  .omail-quick-range-copy output {
    color: #5f6368;
    font-size: 12px;
  }

  .omail-quick-range {
    width: 100%;
    height: 28px;
    margin-top: 8px;
    accent-color: #0b57d0;
    cursor: pointer;
  }

  body.task-mail.action-none #layout-list,
  body.task-mail.action-none #layout-content {
    background: rgba(255, 255, 255, var(--omail-list-surface-opacity, 0.8)) !important;
  }

  body.task-mail.action-none[data-omail-density="comfortable"] {
    --omail-density-row-height: 46px;
  }

  body.task-mail.action-none[data-omail-density="compact"] {
    --omail-density-row-height: 34px;
  }

  body.task-mail.action-none[data-omail-density] #messagelist tr.message {
    height: var(--omail-density-row-height) !important;
    min-height: var(--omail-density-row-height) !important;
  }

  body.task-mail.action-none[data-omail-density] #messagelist tr.message > td,
  body.task-mail.action-none[data-omail-density] #messagelist td.selection,
  body.task-mail.action-none[data-omail-density] #messagelist td.flags,
  body.task-mail.action-none[data-omail-density] #messagelist td.threads,
  body.task-mail.action-none[data-omail-density] #messagelist td.subject span {
    height: var(--omail-density-row-height) !important;
    min-height: var(--omail-density-row-height) !important;
    line-height: var(--omail-density-row-height) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .omail-header-tool,
  .omail-quick-settings-panel {
    animation: none !important;
    transition: none !important;
  }
}
