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

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

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

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

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

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

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

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

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

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

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

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

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

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

.erp-crm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.erp-crm-form {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.erp-crm-field {
    display: flex;
    flex-direction: column;
}
.erp-crm-field label {
    font-size: 12px;
    color: #333333;
}
.erp-crm-field input,
.erp-crm-field select {
    height: 40px;
}

.erp-crm-field input,
.erp-crm-field select,
.erp-crm-field textarea {
    padding: 0 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.erp-crm-field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.erp-crm-field--checkbox input {
    width: auto;
}

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

.erp-crm-badge {
    display: inline-block;
    font-size: 0.75em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    background: #f0f0f1;
    color: #333;
}

.erp-crm-badge--primary {
    background: #eaf7ec;
    color: #1f6d2c;
}

.erp-crm-tag {
    display: inline-block;
    font-size: 0.75em;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    background: #eef4fb;
    color: #2271b1;
}

.erp-crm-inline-form {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.erp-crm-inline-form input[type="text"] {
    padding: 0.4em;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.erp-crm-addresses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75em;
    margin-bottom: 1em;
}

@media (min-width: 481px) {
    .erp-crm-addresses {
        grid-template-columns: repeat(3, 1fr);
    }
}

.erp-crm-address-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75em 1em;
}

.erp-crm-address-card__header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.35em;
}

.erp-crm-address-card__lines,
.erp-crm-address-card__tax-id {
    margin: 0.25em 0;
}

.erp-crm-detail__fields {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4em 1em;
    margin: 1em 0;
}

.erp-crm-activities {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.erp-crm-activities__item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75em 1em;
}

.erp-crm-activities__type {
    display: inline-block;
    font-size: 0.75em;
    text-transform: uppercase;
    font-weight: 600;
    color: #2271b1;
    margin-right: 0.5em;
}

.erp-crm-activities__date {
    font-size: 0.85em;
    color: #666;
}

.erp-crm-activities__description {
    margin: 0.5em 0;
}

/*
 * Content inside the generic .kanban-card shell (see core kanban.css for
 * the board/column/card structure itself) — CRM opportunity fields only.
 */
.kanban-card__title {
    margin: 0 0 0.35em;
    font-weight: 600;
}

.kanban-card__meta {
    margin: 0.15em 0;
    font-size: 0.85em;
    color: #555;
}

.kanban-card__meta--muted {
    color: #999;
}

.kanban-card__value {
    margin: 0.35em 0;
    font-weight: 600;
    color: #2271b1;
}

.erp-crm-pipeline-timeline {
    margin-top: 1.5em;
}