/**
 * Privéberichten-overzicht (pm_overview.html.twig).
 *
 * Blijft binnen de bestaande site-stijl: zandtinten uit de navbar (#e0af67 / #d09e6d),
 * midnight blue (#191970) als accent en het lichte paneelidioom uit Uitgelicht
 * (#f7f9fb / #e2e8ee). Overschrijft op een aantal plaatsen Bootstrap 3 en
 * dataTables.bootstrap.css - vandaar de !important's op net die eigenschappen.
 */

.pm-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

/* ---------------------------------------------------------------- paginakop */

.pm-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
}

.pm-head__title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pm-head__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #ead9c3;
    border-radius: 3px;
    background: #faf1e3;
    color: #b07f3c;
    font-size: 18px;
}

.pm-head h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #222;
    letter-spacing: -0.2px;
}

.pm-head__meta {
    margin-top: 3px;
    font-size: 13px;
    color: #777;
}

.pm-head__unread {
    color: #191970;
    font-weight: 600;
}

.pm-head__spacer {
    flex-grow: 1;
}

.pm-head__actions {
    padding-top: 6px;
}

/* ------------------------------------------------------------------ knoppen */

.pm-btn,
a.pm-btn,
a.pm-btn:link,
a.pm-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
    background: #fff;
    color: #555;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

a.pm-btn:hover,
a.pm-btn:focus {
    border-color: #cdd3da;
    background: #f7f9fb;
    color: #333;
    text-decoration: none;
}

.pm-btn .fa {
    color: #6d8a5e;
}

.pm-btn--reply,
a.pm-btn--reply,
a.pm-btn--reply:link,
a.pm-btn--reply:visited,
button.pm-btn--reply {
    height: 34px;
    padding: 0 14px;
    border-color: #e3c69b;
    background: #f6e0bb;
    color: #5a4a34;
    font-weight: 600;
}

.pm-btn--reply .fa {
    color: #5a4a34;
}

a.pm-btn--reply:hover,
a.pm-btn--reply:focus,
button.pm-btn--reply:hover,
button.pm-btn--reply:focus {
    border-color: #d9b98a;
    background: #efd3a6;
    color: #4a3c28;
}

.pm-btn--delete,
a.pm-btn--delete,
a.pm-btn--delete:link,
a.pm-btn--delete:visited {
    height: 34px;
    border-color: #e6cfcf;
    background: #fff;
    color: #a94442;
}

.pm-btn--delete .fa {
    color: #a94442;
}

a.pm-btn--delete:hover,
a.pm-btn--delete:focus {
    border-color: #d9b3b3;
    background: #fdf5f5;
    color: #8b3735;
}

.pm-btn--quiet,
a.pm-btn--quiet,
a.pm-btn--quiet:link,
a.pm-btn--quiet:visited,
button.pm-btn--quiet {
    height: 34px;
    border-color: #e6e9ed;
    background: #fff;
    color: #6f7681;
}

/* --------------------------------------------------------------------- tabs */

.pm-tabs {
    display: flex;
    align-items: stretch;
    gap: 26px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e6e9ed;
    list-style: none;
}

.pm-tabs > li > a,
.pm-tabs > li > a:link,
.pm-tabs > li > a:visited {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 11px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: #78818c;
    font-size: 14px;
    text-decoration: none;
}

.pm-tabs > li > a:hover,
.pm-tabs > li > a:focus {
    color: #444;
    border-bottom-color: #ead9c3;
    text-decoration: none;
}

.pm-tabs > li.active > a,
.pm-tabs > li.active > a:link,
.pm-tabs > li.active > a:visited,
.pm-tabs > li.active > a:hover {
    border-bottom-color: #d09e6d;
    color: #222;
    font-weight: 600;
}

.pm-tab-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 9px;
    background: #191970;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

/* -------------------------------------------------- werkbalk (DataTables) */

.pm-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 14px;
}

.pm-toolbar .dataTables_filter {
    flex-grow: 1;
    max-width: 320px;
    margin: 0;
    text-align: left;
}

.pm-toolbar .dataTables_filter label {
    display: block;
    width: 100%;
    margin: 0;
    font-weight: normal;
}

#pmDatatable_wrapper .pm-toolbar .dataTables_filter input {
    width: 100%;
    height: 34px;
    padding: 0 11px 0 32px;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
    box-shadow: none;
    font-size: 13px;
    /* vergrootglas, zelfde grijs als de placeholder */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239aa2ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.pm-toolbar .dataTables_filter input:focus {
    border-color: #c9b393;
    outline: none;
}

.pm-toolbar .dataTables_length {
    margin: 0 0 0 auto;
    color: #78818c;
    font-size: 13px;
}

.pm-toolbar .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: normal;
}

.pm-toolbar .dataTables_length select {
    height: 34px;
    width: auto;
    padding: 0 8px;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
    box-shadow: none;
    background: #fff;
    color: #333;
    font-size: 13px;
}

/* --------------------------------------------------------------- de lijst */

.pm-table-wrap {
    border: 1px solid #e6e9ed;
    border-radius: 3px;
    overflow: hidden;
}

table#pmDatatable {
    width: 100% !important;
    margin: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

table#pmDatatable > thead > tr > th {
    padding: 10px 16px !important;
    border-bottom: 1px solid #ead9c3 !important;
    background: #faf6f0;
    color: #8a6d4b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    vertical-align: middle;
}

table#pmDatatable > thead > tr > th.pm-cell-date {
    text-align: right;
    padding-right: 30px !important;
}

/* sorteerpijltjes van DataTables in de zandtint i.p.v. zwart */
table#pmDatatable thead > tr > th:before,
table#pmDatatable thead > tr > th:after {
    color: #8a6d4b;
    right: 12px;
}

table#pmDatatable thead > tr > th.sorting:before,
table#pmDatatable thead > tr > th.sorting:after {
    opacity: 0.3;
}

table#pmDatatable thead > tr > th.sorting_asc:before,
table#pmDatatable thead > tr > th.sorting_desc:after {
    opacity: 1;
}

table#pmDatatable > tbody > tr > td {
    padding: 13px 16px;
    border-top: 0;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
    line-height: 1.35;
}

table#pmDatatable > tbody > tr > td:first-child {
    border-left: 3px solid transparent;
    padding-left: 13px;
}

table#pmDatatable > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* kolombreedtes; table-layout is fixed, dus dit stuurt de hele tabel */
table#pmDatatable td.pm-cell-from,
table#pmDatatable th.pm-cell-from {
    width: 210px;
}

table#pmDatatable td.pm-cell-date,
table#pmDatatable th.pm-cell-date {
    width: 140px;
}

/* rijstatussen */

table#pmDatatable > tbody > tr.pm-row:hover > td {
    background: #fbf8f3;
    cursor: pointer;
}

table#pmDatatable > tbody > tr.pm-row:hover > td:first-child {
    border-left-color: #fbf8f3;
}

table#pmDatatable > tbody > tr.pm-row--unread > td {
    background: #f8fafd;
}

table#pmDatatable > tbody > tr.pm-row--unread > td:first-child {
    border-left-color: #191970;
}

table#pmDatatable > tbody > tr.pm-row--unread:hover > td {
    background: #f3f7fc;
}

table#pmDatatable > tbody > tr.pm-row--open > td,
table#pmDatatable > tbody > tr.pm-row--open:hover > td {
    background: #fdfaf4;
    border-bottom-color: transparent;
}

table#pmDatatable > tbody > tr.pm-row--open > td:first-child {
    border-left-color: #d09e6d;
}

/* onderwerp */

.pm-subject {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.pm-subject__icon {
    flex-shrink: 0;
    width: 16px;
    color: #b9c0c8;
    font-size: 15px;
    text-align: center;
}

.pm-subject__text {
    overflow: hidden;
    color: #333;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-subject__caret {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
    color: #a08a6c;
    font-size: 12px;
}

.pm-row--unread .pm-subject__icon {
    color: #191970;
}

.pm-row--unread .pm-subject__text {
    color: #191970;
    font-weight: 600;
}

.pm-row--open .pm-subject__icon {
    color: #b07f3c;
}

.pm-row--open .pm-subject__text {
    color: #222;
    font-weight: 600;
}

/* afzender */

.pm-from {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.pm-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #efe7dc;
    color: #8a6d4b;
    font-size: 11px;
    font-weight: 700;
    line-height: 24px;
    text-transform: uppercase;
}

.pm-from__name {
    overflow: hidden;
    color: #555;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-from__place {
    color: #9aa2ab;
}

/* datum */

table#pmDatatable td.pm-cell-date {
    color: #6f7681;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.pm-date__sep {
    color: #b3b9c0;
}

/* maandscheiding */

table#pmDatatable > tbody > tr.pm-group > td {
    padding: 6px 16px;
    border-bottom: 1px solid #f1f3f5;
    background: #fbf9f6;
    color: #9aa2ab;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --------------------------------------------------------- geopend bericht */

table#pmDatatable > tbody > tr.pm-detail-row > td {
    padding: 0 16px 18px 40px;
    border-left: 3px solid #d09e6d;
    border-bottom: 1px solid #f1f3f5;
    background: #fdfaf4;
}

.pm-detail {
    border: 1px solid #e2e8ee;
    border-radius: 3px;
    background: #f7f9fb;
}

.pm-detail__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e8edf2;
}

.pm-detail__head .pm-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
    line-height: 30px;
}

.pm-detail__from {
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.pm-detail__date {
    color: #8a929b;
    font-size: 12px;
}

.pm-detail__body {
    padding: 16px 18px;
    color: #333;
    font-size: 14px;
    line-height: 1.65;
    word-wrap: break-word;
}

.pm-detail__body img.emojione {
    height: 16px;
    display: inline;
}

.pm-detail__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e8edf2;
}

.pm-detail__actions .pm-spacer {
    flex-grow: 1;
}

/* -------------------------------------------------------- antwoordformulier */

.pm-form {
    margin-top: 12px;
    border: 1px solid #e2e8ee;
    border-radius: 3px;
    background: #fff;
}

.pm-form__head {
    padding: 11px 16px;
    border-bottom: 1px solid #eef1f4;
    background: #f7f9fb;
    color: #777;
    font-size: 13px;
}

.pm-form__head strong {
    color: #333;
}

.pm-form__body {
    padding: 14px 16px;
}

/* op id, zodat de breedte niet afhangt van de klasse die het formulierthema meegeeft */
#new-pm-form .pm-form__body input,
#new-pm-form .pm-form__body textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 7px 11px;
    border: 1px solid #dfe3e8;
    border-radius: 3px;
    box-shadow: none;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
}

#new-pm-form .pm-form__body input {
    height: 34px;
}

#new-pm-form .pm-form__body textarea {
    min-height: 140px;
    resize: vertical;
}

#new-pm-form .pm-form__body input:focus,
#new-pm-form .pm-form__body textarea:focus {
    border-color: #c9b393;
    outline: none;
    box-shadow: none;
}

#new-pm-form .pm-form__body input[type="hidden"] {
    display: none;
}

.pm-form__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-form .alert {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
}

/* --------------------------------------------------- voettekst / paginering */

.pm-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 2px 0;
}

.pm-foot .dataTables_info {
    padding: 0;
    color: #8a929b;
    font-size: 12px;
}

.pm-foot .dataTables_paginate {
    margin: 0 0 0 auto;
}

.pm-foot .pagination {
    margin: 0;
}

.pm-foot .pagination > li > a,
.pm-foot .pagination > li > span {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e6e9ed;
    border-radius: 3px !important;
    margin-left: 4px;
    background: #fff;
    color: #444;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
}

.pm-foot .pagination > li:first-child > a,
.pm-foot .pagination > li:first-child > span {
    margin-left: 0;
}

.pm-foot .pagination > li > a:hover,
.pm-foot .pagination > li > a:focus {
    border-color: #cdd3da;
    background: #f7f9fb;
    color: #191970;
}

.pm-foot .pagination > .active > a,
.pm-foot .pagination > .active > span,
.pm-foot .pagination > .active > a:hover,
.pm-foot .pagination > .active > span:hover,
.pm-foot .pagination > .active > a:focus,
.pm-foot .pagination > .active > span:focus {
    border-color: #191970;
    background: #191970;
    color: #fff;
    font-weight: 600;
}

.pm-foot .pagination > .disabled > a,
.pm-foot .pagination > .disabled > span {
    border-color: #e6e9ed;
    background: #fff;
    color: #b3b9c0;
}

/* ----------------------------------------------------------- leeg overzicht */

.pm-empty {
    padding: 38px 20px;
    text-align: center;
}

.pm-empty__icon {
    color: #d9c3a2;
    font-size: 34px;
}

.pm-empty__title {
    margin-top: 10px;
    color: #444;
    font-size: 15px;
    font-weight: 600;
}

.pm-empty__text {
    max-width: 420px;
    margin: 6px auto 0;
    color: #8a929b;
    font-size: 13px;
    line-height: 1.6;
}

table#pmDatatable > tbody > tr.odd > td.dataTables_empty,
table#pmDatatable > tbody > tr.even > td.dataTables_empty {
    border: 0;
    padding: 0;
    background: #fff;
}

/* ------------------------------------------------------------------ mobiel */

@media (max-width: 767px) {

    .pm-page {
        padding: 14px 0 30px;
    }

    .pm-head,
    .pm-tabs,
    .pm-toolbar,
    .pm-foot {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pm-head h1 {
        font-size: 19px;
    }

    .pm-head__icon {
        display: none;
    }

    .pm-tabs {
        gap: 0;
    }

    .pm-tabs > li {
        flex-grow: 1;
    }

    .pm-tabs > li > a {
        justify-content: center;
        padding: 14px 0;
    }

    .pm-toolbar .dataTables_length {
        display: none;
    }

    .pm-toolbar .dataTables_filter {
        max-width: none;
    }

    .pm-table-wrap {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    /* de tabel wordt een kaartenlijst */
    table#pmDatatable,
    table#pmDatatable > tbody,
    table#pmDatatable > tbody > tr {
        display: block;
        width: 100% !important;
    }

    table#pmDatatable > thead {
        display: none;
    }

    table#pmDatatable > tbody > tr.pm-row,
    table#pmDatatable > tbody > tr.pm-group,
    table#pmDatatable > tbody > tr.pm-detail-row {
        padding: 0;
        border-bottom: 1px solid #f1f3f5;
        border-left: 3px solid transparent;
    }

    table#pmDatatable > tbody > tr.pm-row--unread {
        border-left-color: #191970;
    }

    table#pmDatatable > tbody > tr.pm-row--open {
        border-left-color: #d09e6d;
    }

    table#pmDatatable > tbody > tr.pm-row {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
    }

    table#pmDatatable > tbody > tr.pm-row--unread {
        background: #f8fafd;
    }

    table#pmDatatable > tbody > tr.pm-row--open {
        background: #fdfaf4;
    }

    table#pmDatatable > tbody > tr > td {
        display: block;
        width: auto !important;
        border: 0 !important;
        padding: 0 14px !important;
        background: transparent !important;
    }

    table#pmDatatable > tbody > tr.pm-row > td.pm-cell-subject {
        flex: 0 0 100%;
        padding-top: 12px !important;
    }

    table#pmDatatable > tbody > tr.pm-row > td.pm-cell-from {
        flex: 1 1 auto;
        min-width: 0;
        padding-left: 39px !important;
        padding-right: 8px !important;
        padding-bottom: 12px !important;
    }

    table#pmDatatable > tbody > tr.pm-row > td.pm-cell-date {
        flex: 0 0 auto;
        margin-left: auto;
        padding-bottom: 12px !important;
    }

    table#pmDatatable > tbody > tr.pm-group > td {
        padding: 6px 14px !important;
        background: #fbf9f6 !important;
    }

    /* op mobiel geen monogram, en alleen dag + maand */
    .pm-avatar {
        display: none;
    }

    .pm-detail__head .pm-avatar {
        display: flex;
    }

    .pm-date__rest {
        display: none;
    }

    table#pmDatatable > tbody > tr.pm-detail-row > td {
        padding: 0 14px 16px 14px !important;
        background: #fdfaf4 !important;
    }

    .pm-detail__actions {
        flex-wrap: wrap;
    }

    .pm-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pm-foot .dataTables_info {
        order: 2;
        text-align: center;
    }

    .pm-foot .dataTables_paginate {
        margin: 0;
        order: 1;
        text-align: center;
    }
}

/**
 * Het antwoordformulier wordt ook in een modal getoond (message.html.twig,
 * user_profile_list.html.twig). Daar levert de modal zelf de omlijsting.
 */
.pm-form--plain {
    margin: 0;
    border: 0;
    background: transparent;
}

.pm-form--plain .pm-form__body {
    padding: 0;
}
