/*
|--------------------------------------------------------------------------
| InterGov Messaging
|--------------------------------------------------------------------------
|
| Institutioneel, sober, marineblauw/wit/grijs.
| Brede contentzone tot 1280 px.
|
*/

.ig-msg-page {
    background: #f5f7f9;
    min-height: 70vh;
    padding: 34px 0 64px;
}

.ig-msg-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.ig-msg-pagehead,
.ig-thread-head {
    margin-bottom: 24px;
}

.ig-msg-pagehead h1,
.ig-thread-head h1 {
    margin: 5px 0 7px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    color: #112d4e;
    font-weight: 700;
}

.ig-msg-pagehead p {
    max-width: 760px;
    margin: 0;
    color: #566473;
    line-height: 1.6;
}

.ig-msg-eyebrow {
    color: #46637f;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 700;
    font-size: 12px;
}

.ig-msg-layout,
.ig-thread-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

.ig-msg-card,
.ig-inbox-card,
.ig-reply-card,
.ig-thread-message,
.ig-msg-side-card {
    background: #fff;
    border: 1px solid #d8e0e7;
    border-radius: 3px;
}

.ig-msg-card {
    padding: 30px;
}

.ig-msg-form {
    display: grid;
    gap: 22px;
}

.ig-msg-field {
    display: grid;
    gap: 8px;
}

.ig-msg-field label,
.ig-reply-card label {
    color: #152f4f;
    font-size: 14px;
    font-weight: 700;
}

.ig-msg-field input,
.ig-msg-field textarea,
.ig-reply-card textarea {
    width: 100%;
    border: 1px solid #b9c6d1;
    border-radius: 2px;
    background: #fff;
    color: #172c42;
    padding: 12px 13px;
    font: inherit;
    line-height: 1.5;
    box-sizing: border-box;
}

.ig-msg-field input:focus,
.ig-msg-field textarea:focus,
.ig-reply-card textarea:focus {
    outline: 3px solid rgba(24, 73, 117, .12);
    border-color: #184975;
}

.ig-msg-target {
    border-left: 3px solid #1e537f;
    background: #f4f7fa;
    padding: 13px 15px;
    display: grid;
    gap: 3px;
}

.ig-msg-target strong {
    color: #133253;
}

.ig-msg-target span {
    color: #667685;
    font-size: 14px;
}

.ig-msg-side {
    display: grid;
    gap: 16px;
}

.ig-msg-side-card {
    padding: 20px;
    display: grid;
    gap: 7px;
    color: #516171;
    line-height: 1.55;
}

.ig-msg-side-card strong {
    color: #183451;
}

.ig-msg-side-card p {
    margin: 0;
}

.ig-msg-side-label {
    color: #173c62;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 5px;
}

.ig-msg-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ig-msg-primary,
.ig-msg-secondary,
.ig-inline-contact {
    border-radius: 2px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ig-msg-primary {
    appearance: none;
    border: 1px solid #173f67;
    background: #173f67;
    color: #fff;
    min-height: 44px;
    padding: 0 20px;
}

.ig-msg-primary:hover {
    background: #102f4e;
}

.ig-msg-secondary {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #c0cbd5;
    color: #264965;
    background: #fff;
}

.ig-msg-error {
    border-left: 3px solid #b42318;
    color: #8f1d14;
    background: #fff5f4;
    padding: 8px 10px;
    font-size: 14px;
}

.ig-msg-success {
    border-left: 4px solid #2f6b4c;
    background: #f0f7f3;
    color: #244e3a;
    padding: 13px 16px;
    margin-bottom: 20px;
}

.ig-inbox-card {
    overflow: hidden;
}

.ig-inbox-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    min-height: 78px;
    padding: 13px 18px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #e1e6eb;
}

.ig-inbox-row:last-child {
    border-bottom: 0;
}

.ig-inbox-row:hover {
    background: #f7f9fb;
}

.ig-inbox-row.is-unread {
    background: #f4f8fc;
}

.ig-unread-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #1d5c8f;
}

.ig-inbox-subject {
    color: #173a5d;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ig-inbox-meta,
.ig-inbox-date {
    color: #697886;
    font-size: 13px;
}

.ig-inbox-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ig-inbox-date {
    white-space: nowrap;
}

.ig-msg-empty {
    padding: 40px 26px;
    text-align: center;
    color: #6a7886;
}

.ig-msg-empty strong {
    display: block;
    color: #23435f;
    margin-bottom: 5px;
}

.ig-thread-back {
    display: inline-block;
    margin-bottom: 18px;
    color: #315b7c;
    font-weight: 700;
    text-decoration: none;
}

.ig-thread-target {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: #607080;
    font-size: 14px;
}

.ig-thread {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.ig-thread-message {
    padding: 18px 20px;
    border-left: 3px solid #bac7d2;
}

.ig-thread-message.is-mine {
    border-left-color: #205983;
    background: #f8fafc;
}

.ig-thread-message-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 9px;
}

.ig-thread-message-head strong {
    color: #173b5d;
}

.ig-thread-message-head time {
    color: #788795;
    font-size: 12px;
    white-space: nowrap;
}

.ig-thread-message-body {
    color: #2d4051;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.ig-reply-card {
    padding: 22px;
    display: grid;
    gap: 10px;
}

.ig-inline-contact {
    border: 1px solid #aebeca;
    color: #1c5079;
    background: #fff;
    padding: 7px 11px;
    font-size: 13px;
    margin-top: 9px;
    width: fit-content;
}

.ig-inline-contact:hover {
    border-color: #1c5079;
    background: #f4f8fb;
}

.ig-msg-pagination {
    margin-top: 20px;
}

@media (max-width: 900px) {
    .ig-msg-shell {
        width: min(100% - 28px, 1280px);
    }

    .ig-msg-layout,
    .ig-thread-layout {
        grid-template-columns: 1fr;
    }

    .ig-msg-card {
        padding: 21px;
    }

    .ig-inbox-row {
        grid-template-columns: 16px minmax(0, 1fr);
    }

    .ig-inbox-date {
        grid-column: 2;
    }
}
