/*
 * Minimal, scoped styles for Communications shortcode output. Namespaced
 * under .erp-comm-* so it doesn't fight with Bricks Builder's own styles.
 */

.erp-comm-notice {
    padding: 0.75em 1em;
    border-radius: 4px;
    background: #f0f0f1;
}

.erp-comm-notice--error {
    background: #fbeaea;
    color: #8a1f1f;
}

.erp-comm-notice--success {
    background: #eaf7ec;
    color: #1f6d2c;
}

.erp-comm-hint {
    font-size: 0.85em;
    color: #666;
}

.erp-comm-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1em;
}

.erp-comm-search input, .erp-comm-search select {
    border-radius: 8px;
}

.erp-comm-table {
    width: 100%;
    border-collapse: collapse;
    border-bottom: 1px solid #c7c7c7;
    font-family: Roboto Condensed;
}

.erp-comm-table td, .erp-comm-table th {
    text-align: left;
    padding: 8px 12px;
}

.erp-comm-table thead {
    border-top: 1px solid #c7c7c7;
    border-bottom: 1px solid #c7c7c7;
}

.erp-comm-table tbody tr:nth-child(odd) {
    background-color: #EBF6FF;
}

.erp-comm-pagination {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-top: 1em;
}

.erp-comm-btn {
    padding: 0.5em 1em;
    border: 1px solid #0070b9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    color: #0070b9;
    display: inline-block;
}

.erp-comm-btn--primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.erp-comm-btn--link {
    border: none;
    background: none;
    text-decoration: underline;
    padding: 0;
    color: #0070b9;
}

.erp-comm-actions {
    display: flex;
    gap: 0.75em;
    align-items: center;
}

.erp-comm-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #b32d2e;
    text-decoration: underline;
    cursor: pointer;
}

.erp-comm-field {
    margin-bottom: 1em;
}

.erp-comm-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25em;
}

.erp-comm-field input[type="text"],
.erp-comm-field input[type="email"],
.erp-comm-field input[type="search"],
.erp-comm-field input[type="number"],
.erp-comm-field input[type="date"],
.erp-comm-field input[type="datetime-local"],
.erp-comm-field select,
.erp-comm-field textarea {
    width: 100%;
    max-width: 480px;
    border-radius: 6px;
}

.erp-comm-compose__actions {
    display: flex;
    gap: 0.75em;
}

.erp-comm-compose__attachment-list {
    list-style: none;
    margin: 0.5em 0 0;
    padding: 0;
}

.erp-comm-conversation-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.erp-comm-conversation-list__item {
    border-bottom: 1px solid #e2e2e2;
}

.erp-comm-conversation-list__link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
    padding: 0.75em 0;
    text-decoration: none;
    color: inherit;
}

.erp-comm-conversation-list__subject {
    font-weight: 600;
}

.erp-comm-conversation-list__meta,
.erp-comm-conversation-list__related {
    color: #666;
    font-size: 0.9em;
}

.erp-comm-conversation-list__company {
    font-weight: 600;
    color: #2271b1;
}

.erp-comm-badge {
    display: inline-block;
    padding: 0.15em 0.6em;
    border-radius: 999px;
    background: #f0f0f1;
    font-size: 0.8em;
}

.erp-comm-badge--sent, .erp-comm-badge--open, .erp-comm-badge--received {
    background: #eaf7ec;
    color: #1f6d2c;
}

.erp-comm-badge--failed {
    background: #fbeaea;
    color: #8a1f1f;
}

.erp-comm-badge--queued, .erp-comm-badge--sending, .erp-comm-badge--draft {
    background: #fff6e5;
    color: #8a6d1f;
}

.erp-comm-message {
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
}

.erp-comm-message--outgoing {
    background: #f7fbff;
}

.erp-comm-message__header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    align-items: center;
    margin-bottom: 0.5em;
    font-size: 0.9em;
}

.erp-comm-message__attachments {
    margin: 0.5em 0 0;
    padding-left: 1.25em;
}

.erp-comm-campaign-recipients {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}
