html,
body {
    margin: 0;
    height: 100%;
}

#pageloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.1s ease, visibility 0.1s;
    z-index: 40;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #FF691C;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.card {
    transition: box-shadow 0.1s;
}

.filter-nav {
    box-shadow: 0 4px 5px -4px gray;
}

.square-image>img {
    height: 64px;
    width: 64px;
    object-fit: cover;
}

.border {
    box-shadow: 0px 0px 0px 2px #FF691C88;
}


.card:hover {
    box-shadow: 0px 0px 0px 2px #FF691C88;
}

.is-selected {
    box-shadow: 0px 0px 0px 1px #FF691C88;
}

.hero {
    background-color: rgba(128, 128, 128, 0.1);
}

.navbar {
    border-radius: 8px 8px 0 0;
}

.navbar>div {
    width: 100%;
}

.sekcja {
    overflow-wrap: break-word;
    word-break: break-word;
}

.sekcja>.box {
    border-radius: 0 0 8px 8px !important;
}


.scroll-wrapper {
    overflow-y: auto !important;
}

.reset_css_email {
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.reset_css_email * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

.reset_css_email img,
.reset_css_email table {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.reset_css_email table {
  table-layout: auto !important;
  width: 100% !important;
}

.reset_css_email td,
.reset_css_email th {
  word-break: break-word !important;
  white-space: normal !important;
}

/* Message body: allow block elements like <details> */
.message-body {
  display: block;
}

/* Quoted reply: collapsed by default, click to expand */
.email-quoted-reply {
  margin-top: 0.5em;
  border-left: 3px solid var(--bulma-border, #dbdbdb);
  padding-left: 0.75em;
}
.email-quoted-summary {
  cursor: pointer;
  color: var(--bulma-link, #3273dc);
  font-size: 0.9em;
  user-select: none;
  list-style: none;
}
.email-quoted-summary::-webkit-details-marker {
  display: none;
}
.email-quoted-summary:hover {
  text-decoration: underline;
}
.email-quoted-content {
  margin-top: 0.5em;
  opacity: 0.9;
  font-size: 0.95em;
}

/* Email image attachments: small thumbnails */
.email-attachments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.email-attachment-thumb {
  display: inline-block;
  border: 1px solid var(--bulma-border, #dbdbdb);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.email-attachment-thumb img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  vertical-align: middle;
}
.email-attachment-thumb:hover {
  border-color: var(--bulma-link, #3273dc);
  box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.25);
}


.separator {
    display: flex;
    align-items: center;
    text-align: center;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #000;
}

.separator:not(:empty)::before {
    margin-right: .25em;
}

.separator:not(:empty)::after {
    margin-left: .25em;
}

.sent_message {
    background-color: rgba(0, 255, 0, 0.02);
}

.received_message {
    background-color: rgba(64, 0, 255, 0.03);
}

.done {
    opacity: 0.55;
}


/* width */
::-webkit-scrollbar {
    width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #bec4c4;
    border-radius: 4px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.avatar-wrapper>img {
    object-fit: cover !important;
    width: 128px !important;
    height: 128px !important;
}

.small-avatar-wrapper>img {
    object-fit: cover !important;
    width: 32px !important;
    height: 32px !important;
}


@media (prefers-color-scheme: dark) {

    /* Track */
    ::-webkit-scrollbar-track {
        background: #111;
    }

    /* Handle */
    ::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    /* Handle on hover */
    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    #pageloader {
        background-color: #222;
    }
}

.sentavatar {
    border-radius: 50%;
    aspect-ratio: 1;
}

.avatar-group {
    display: flex;
    align-items: center;
}

.section {
    width: 100vw !important;
}

.avatar-group img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid grey; 
    object-fit: cover;
    margin-left: -5px;
}

.avatar-group img:first-child {
    margin-left: 0; 
}