/* Mensajeria module styles extracted from shell.css. */

.communication-shell {
    display: grid;
    gap: 1rem;
}

.communication-hero {
    background:
        radial-gradient(circle at 86% 18%, rgba(20, 184, 166, 0.16), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 255, 0.9));
    border: 1px solid #c6def8;
    border-radius: 1.25rem;
    box-shadow: 0 18px 40px rgba(8, 59, 97, 0.08);
    display: grid;
    grid-template-columns: 1fr;
    padding: 1rem;
}

.communication-metrics {
    grid-template-columns: repeat(5, minmax(9rem, 1fr));
    min-width: 0;
    width: 100%;
}

.communication-metric {
    min-height: 6.6rem;
}

.communication-notice-strip {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.communication-notice {
    align-items: start;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    border: 1px solid #d3e5f5;
    border-radius: 1rem;
    color: #12395d;
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem 0.9rem;
}

.communication-notice strong {
    color: #073b63;
    font-size: 0.9rem;
}

.communication-notice span {
    color: #587089;
    font-size: 0.82rem;
    font-weight: 760;
}

.communication-notice.is-ok {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), #ffffff);
    border-color: #b8ead7;
}

.communication-notice.is-info {
    background: linear-gradient(135deg, rgba(239, 248, 255, 0.95), #ffffff);
    border-color: #b7d8f1;
}

.communication-notice.is-warning {
    background: linear-gradient(135deg, rgba(255, 248, 228, 0.95), #ffffff);
    border-color: #f0d79b;
}

.communication-notice.is-danger {
    background: linear-gradient(135deg, rgba(255, 241, 242, 0.95), #ffffff);
    border-color: #f0b6bd;
}

.communication-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(22rem, 0.9fr) minmax(28rem, 1.1fr);
    align-items: start;
}

.communication-panel {
    min-width: 0;
}

.communication-compose {
    grid-column: 1 / -1;
}

.communication-compose form,
.communication-reply {
    display: grid;
    gap: 0.9rem;
}

.communication-step-grid,
.communication-recipient-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.communication-recipient-grid {
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.72), rgba(248, 251, 255, 0.95));
    border: 1px solid #d4e8f5;
    border-radius: 1rem;
    padding: 0.75rem;
}

.communication-folder-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin: 0.65rem 0;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-color: rgba(15, 111, 169, 0.35) transparent;
}

.communication-folder-tabs button {
    align-items: center;
    background: #eef7ff;
    border: 1px solid #c7dcf0;
    border-radius: 999px;
    color: #0a436b;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 900;
    gap: 0.45rem;
    padding: 0.48rem 0.75rem;
}

.communication-folder-tabs button b {
    align-items: center;
    background: rgba(15, 111, 169, 0.12);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    justify-content: center;
    min-width: 1.45rem;
    padding: 0.16rem 0.38rem;
}

.communication-folder-tabs button.is-active {
    background: linear-gradient(135deg, #0f6fa9, #159381);
    border-color: transparent;
    color: #fff;
}

.communication-folder-tabs button.is-active b {
    background: rgba(255, 255, 255, 0.22);
}

.communication-field {
    color: #12395d;
    display: grid;
    gap: 0.35rem;
    font-weight: 850;
}

.communication-field[hidden] {
    display: none !important;
}

.communication-field span {
    font-size: 0.92rem;
}

.communication-field input,
.communication-field select,
.communication-field textarea {
    appearance: none;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #c8dff3;
    border-radius: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
    color: #12395d;
    font-weight: 760;
    min-height: 2.65rem;
    padding: 0.62rem 0.75rem;
    width: 100%;
}

.communication-field input:focus,
.communication-field select:focus,
.communication-field textarea:focus {
    border-color: #0f77b4;
    box-shadow: 0 0 0 3px rgba(15, 119, 180, 0.14);
    outline: none;
}

.communication-field select[multiple] {
    min-height: 9rem;
    overflow: auto;
}

.communication-choice-list {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid #d4e8f5;
    border-radius: 1rem;
    display: grid;
    gap: 0.45rem;
    max-height: 13rem;
    overflow: auto;
    padding: 0.55rem;
}

.communication-choice-list p {
    color: #607486;
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0;
    padding: 0.35rem;
}

.communication-choice {
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    border: 1px solid #d4e6f6;
    border-radius: 0.85rem;
    cursor: pointer;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: auto 1fr;
    padding: 0.48rem 0.55rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.communication-choice:hover {
    border-color: #93c5e8;
    box-shadow: 0 10px 20px rgba(15, 111, 169, 0.1);
    transform: translateY(-1px);
}

.communication-choice input {
    accent-color: #159381;
    height: 1rem;
    width: 1rem;
}

.communication-choice span {
    display: grid;
    gap: 0.12rem;
}

.communication-choice strong {
    color: #073b63;
    font-size: 0.84rem;
    line-height: 1.15;
}

.communication-choice small {
    color: #667f94;
    font-size: 0.72rem;
    font-weight: 760;
}

.communication-choice:has(input:checked) {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), #ffffff);
    border-color: #7dd3bf;
    box-shadow: inset 0 0 0 1px rgba(21, 147, 129, 0.16);
}

.communication-field textarea {
    line-height: 1.45;
    min-height: 8rem;
    resize: vertical;
}

.communication-field small {
    color: #607486;
    font-weight: 750;
}

.communication-field--full {
    grid-column: 1 / -1;
}

.communication-checks {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.communication-checks label {
    align-items: center;
    background: #f8fbff;
    border: 1px solid #d6e7f7;
    border-radius: 999px;
    color: #12395d;
    display: inline-flex;
    font-weight: 850;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
}

.communication-chip-checks label {
    cursor: pointer;
    padding: 0;
}

.communication-chip-checks input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.communication-chip-checks span {
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.communication-chip-checks label:has(input:checked) {
    background: linear-gradient(135deg, #0f6fa9, #159381);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 111, 169, 0.16);
}

.communication-form-note {
    background: linear-gradient(135deg, rgba(255, 249, 229, 0.95), rgba(236, 250, 247, 0.9));
    border: 1px solid #ecd28f;
    border-radius: 0.95rem;
    color: #36516a;
    font-weight: 800;
    padding: 0.65rem 0.8rem;
}

.communication-upload {
    background: linear-gradient(135deg, rgba(239, 248, 255, 0.92), rgba(255, 255, 255, 0.95));
    border: 1px dashed #a9cce8;
    border-radius: 1rem;
    padding: 0.75rem;
}

.communication-upload input[type="file"],
input[type="file"] {
    color: #39566f;
    font-weight: 750;
}

.communication-upload input[type="file"]::file-selector-button,
input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #eef7ff, #fff8e5);
    border: 1px solid #bdd7ed;
    border-radius: 999px;
    color: #073b63;
    cursor: pointer;
    font-weight: 900;
    margin-right: 0.65rem;
    padding: 0.48rem 0.75rem;
}

.communication-upload small.has-files {
    background: rgba(15, 111, 169, 0.08);
    border: 1px solid rgba(15, 111, 169, 0.16);
    border-radius: 0.75rem;
    color: #084a78;
    display: block;
    padding: 0.45rem 0.55rem;
}

.communication-thread-list,
.communication-messages {
    display: grid;
    gap: 0.65rem;
}

.communication-thread {
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    border: 1px solid #d0e2f4;
    border-radius: 0.95rem;
    color: #12395d;
    cursor: pointer;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    width: 100%;
}

.communication-thread:hover,
.communication-thread.is-active {
    border-color: #0d6fa8;
    box-shadow: 0 14px 28px rgba(13, 111, 168, 0.12);
    transform: translateY(-1px);
}

.communication-thread.is-closed {
    opacity: 0.72;
}

.communication-thread__top,
.communication-detail__head,
.communication-reply__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
}

.communication-thread small,
.communication-message small,
.communication-message span {
    color: #607486;
    font-weight: 750;
}

.communication-thread__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.communication-thread__chips i {
    background: #eef7ff;
    border: 1px solid #d1e3f4;
    border-radius: 999px;
    color: #0a436b;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 850;
    padding: 0.22rem 0.42rem;
}

.communication-thread em {
    color: #50687c;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communication-detail {
    gap: 1rem;
}

.communication-detail__actions {
    justify-content: flex-end;
}

.communication-message {
    background: #f8fbff;
    border: 1px solid #d7e8f7;
    border-radius: 0.95rem;
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem;
}

.communication-message strong {
    color: #073b63;
}

.communication-message p {
    margin: 0;
    white-space: pre-wrap;
}

.communication-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.communication-attachments a {
    background: #eaf6ff;
    border: 1px solid #cfe4f5;
    border-radius: 999px;
    color: #084a78;
    font-weight: 850;
    padding: 0.35rem 0.55rem;
    text-decoration: none;
}

.communication-reply {
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.85), rgba(248, 251, 255, 0.95));
    border: 1px solid #c9e7e0;
    border-radius: 1rem;
    padding: 0.85rem;
}

@media (max-width: 1180px) {
    .communication-metrics {
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    }

    .communication-layout {
        grid-template-columns: 1fr;
    }

    .communication-detail {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .communication-layout {
        grid-template-columns: 1fr;
    }

    .communication-detail {
        grid-column: auto;
    }

    .communication-detail__head,
    .communication-reply__actions {
        align-items: stretch;
        display: grid;
    }
}
