/**
 * Campaign Dashboard Styles
 * Seamless white design matching Auctioneer dashboard
 * Uses same CSS variables from msa-front.css when available
 */

/* ===== Layout ===== */
.ec-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: 'Montserrat', -apple-system, sans-serif;
    color: var(--msa-text, #333);
}

/* ===== Header ===== */
.ec-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    box-shadow: none;
}

.ec-dash-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--msa-text, #333);
}

.ec-dash-welcome {
    color: var(--msa-text-light, #666);
    font-size: 0.85rem;
}

.ec-dash-signout {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--msa-text-light, #666);
    text-decoration: none;
    transition: color 0.2s;
}

.ec-dash-signout:hover {
    color: var(--msa-text, #333);
}

/* ===== Tabs ===== */
.ec-dash-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    border: none;
    border-bottom: none;
    padding: 0;
    overflow-x: auto;
}

.ec-dash-tab {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 16px 10px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--msa-text-light, #666);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
}

.ec-dash-tab:hover {
    color: var(--msa-text, #333);
    background: transparent;
}

.ec-dash-tab:focus,
.ec-dash-tab:focus-visible,
.ec-dash-tab:active {
    background: transparent;
    outline: none;
    box-shadow: none;
    border: none;
}

.ec-dash-tab.active {
    color: var(--msa-text, #333);
    font-weight: 700;
    background: transparent;
}

/* ===== Panels ===== */
.ec-dash-panel {
    display: none;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 24px 0;
    box-shadow: none;
}

.ec-dash-panel.active {
    display: block;
}

/* ===== Section Headers ===== */
.ec-dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ec-dash-section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--msa-text, #333);
}

/* ===== Buttons ===== */
.ec-dash-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    background: #f0f0f0;
    color: var(--msa-text, #333);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.ec-dash-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.ec-dash-btn:active {
    transform: translateY(0);
}

.ec-dash-btn-primary {
    background: var(--msa-gold, #C9AC8C);
    color: #fff;
    border-color: var(--msa-gold, #C9AC8C);
}

.ec-dash-btn-primary:hover {
    background: var(--msa-gold-dark, #b89a7a);
    color: #fff;
}

.ec-dash-btn-success {
    background: var(--msa-green, #4CAF50);
    color: #fff;
}

.ec-dash-btn-success:hover {
    background: #388E3C;
    color: #fff;
}

.ec-dash-btn-warning {
    background: #dba617;
    color: #fff;
}

.ec-dash-btn-warning:hover {
    background: #c29412;
    color: #fff;
}

.ec-dash-btn-danger {
    background: none;
    color: var(--msa-red, #e74c3c);
    border: 1px solid var(--msa-red, #e74c3c);
}

.ec-dash-btn-danger:hover {
    background: var(--msa-red, #e74c3c);
    color: #fff;
}

.ec-dash-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.ec-dash-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Tables ===== */
.ec-dash-table-wrap {
    overflow-x: auto;
}

.ec-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ec-dash-table th {
    text-align: left;
    padding: 10px 12px 10px 0;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--msa-text-light, #666);
    border-bottom: 1px solid #e0e0e0;
}

.ec-dash-table td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.ec-dash-table tbody tr:hover {
    background: transparent;
}

.ec-dash-empty {
    text-align: center;
    color: #999;
    padding: 40px 8px !important;
}

.ec-dash-campaign-name {
    cursor: pointer;
    color: var(--msa-gold-dark, #b89a7a);
    font-weight: 600;
}

.ec-dash-campaign-name:hover {
    text-decoration: underline;
}

.ec-dash-campaign-subject {
    font-size: 0.8rem;
    color: #999;
    margin-top: 2px;
}

.ec-dash-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    white-space: nowrap;
}

/* ===== Status Badges ===== */
.ec-dash-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ec-dash-status-draft {
    background: #f0f0f1;
    color: #50575e;
}

.ec-dash-status-sending {
    background: #fff8e1;
    color: #f57f17;
}

.ec-dash-status-completed {
    background: var(--msa-green-light, #e8f5e9);
    color: #2e7d32;
}

.ec-dash-status-sent {
    background: var(--msa-green-light, #e8f5e9);
    color: #2e7d32;
}

.ec-dash-status-failed {
    background: #fce4ec;
    color: #c62828;
}

.ec-dash-status-pending {
    background: #f0f0f1;
    color: #50575e;
}

/* ===== Stats ===== */
.ec-dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
    margin: 16px 0;
}

.ec-dash-stat-card {
    background: transparent;
    border: none;
    border-right: 1px solid #f0f0f0;
    border-radius: 0;
    padding: 20px 16px;
    text-align: center;
}

.ec-dash-stat-card:last-child {
    border-right: none;
}

.ec-dash-stat-card .ec-dash-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--msa-text, #333);
}

.ec-dash-stat-card .ec-dash-stat-label {
    font-size: 0.8rem;
    color: var(--msa-text-light, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ===== Info Grid ===== */
.ec-dash-info-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.ec-dash-info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.85rem;
}

.ec-dash-info-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: var(--msa-text-light, #666);
}

.ec-dash-info-value {
    flex: 1;
}

/* ===== Forms ===== */
.ec-dash-form-row {
    margin-bottom: 16px;
}

.ec-dash-form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 4px;
    color: var(--msa-text, #333);
}

.ec-dash-form-row input[type="text"],
.ec-dash-form-row input[type="email"],
.ec-dash-form-row input[type="url"],
.ec-dash-form-row input[type="date"],
.ec-dash-form-row select {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: transparent;
}

.ec-dash-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: transparent;
}

.ec-dash-form-row input:focus,
.ec-dash-form-row select:focus {
    outline: none;
    border-bottom-color: var(--msa-gold, #C9AC8C);
    box-shadow: none;
}

.ec-dash-form-row textarea:focus {
    outline: none;
    border-color: var(--msa-gold, #C9AC8C);
    box-shadow: none;
}

/* ===== WP Editor on Frontend ===== */
.ec-dash-form-row .wp-editor-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.ec-dash-form-row .wp-editor-wrap .mce-toolbar-grp {
    background: #f8f8f8;
}

.ec-dash-form-row .wp-editor-wrap .wp-editor-area {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.ec-dash-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.ec-dash-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.ec-dash-hint {
    font-size: 0.8rem;
    color: var(--msa-text-light, #666);
    margin-top: 4px;
}

.ec-dash-char-count {
    font-size: 0.8rem;
    color: #999;
}

/* ===== Upload Area ===== */
.ec-dash-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: var(--msa-radius, 8px);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 80px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ec-dash-upload-area:hover,
.ec-dash-upload-area.ec-dash-upload-dragover {
    border-color: var(--msa-gold, #C9AC8C);
    background: transparent;
}

.ec-dash-upload-prompt {
    color: var(--msa-text-light, #666);
    font-size: 0.85rem;
}

.ec-dash-upload-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

.ec-dash-upload-single .ec-dash-img-thumb {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.ec-dash-img-thumb {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    overflow: hidden;
    border: none;
}

.ec-dash-img-thumb img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: block;
}

.ec-dash-img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.ec-dash-img-remove:hover {
    background: var(--msa-red, #e74c3c);
}

/* ===== Recipients ===== */
.ec-dash-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ec-dash-radio-group label {
    font-weight: 400;
    font-size: 0.85rem;
    cursor: pointer;
}

.ec-dash-recipient-section {
    margin-top: 8px;
}

.ec-dash-info-box {
    padding: 12px;
    background: #f0f6fc;
    border-left: 3px solid #0073aa;
    border-radius: 2px;
    font-size: 0.85rem;
}

.ec-dash-product-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.ec-dash-product-search input[type="text"] {
    width: auto;
    flex: 1;
    max-width: 300px;
}

.ec-dash-product-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.ec-dash-product-list label {
    display: block;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 400;
    font-size: 0.85rem;
    cursor: pointer;
}

.ec-dash-product-list .ec-dash-product-badge {
    display: inline-block;
    background: var(--msa-gold, #C9AC8C);
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 4px;
}

.ec-dash-inline-check {
    font-weight: 400 !important;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ec-dash-block-check {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    margin: 4px 0;
}

.ec-dash-preview-recipients {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 8px;
    background: #fff8e5;
    border-left: 3px solid #ffb900;
    border-radius: 2px;
}

/* ===== Modals ===== */
.ec-dash-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ec-dash-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 460px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ec-dash-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    line-height: 1;
}

.ec-dash-modal-close:hover {
    color: var(--msa-text, #333);
}

/* ===== Preview Modal ===== */
.ec-dash-modal-preview {
    max-width: 780px;
    width: 95%;
    padding: 24px 24px 16px;
}

.ec-dash-preview-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ec-dash-preview-toggle .ec-dash-btn-sm.active {
    background: #333;
    color: #fff;
}

.ec-dash-preview-frame-wrap {
    background: #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: center;
    transition: padding 0.3s ease;
}

.ec-dash-preview-frame {
    width: 100%;
    max-width: 700px;
    height: 70vh;
    border: none;
    border-radius: 4px;
    background: #fff;
    transition: max-width 0.3s ease;
}

.ec-dash-preview-mobile .ec-dash-preview-frame {
    max-width: 375px;
}

/* ===== Progress Bar ===== */
.ec-dash-progress-bar-wrap {
    background: #e0e0e0;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
    margin: 12px 0;
}

.ec-dash-progress-bar {
    background: linear-gradient(90deg, var(--msa-gold, #C9AC8C), var(--msa-gold-dark, #b89a7a));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
}

.ec-dash-progress-stats {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    font-size: 0.85rem;
}

.ec-dash-progress-warning {
    font-size: 0.8rem;
    color: var(--msa-red, #e74c3c);
    font-weight: 600;
    margin: 8px 0;
}

.ec-dash-send-progress {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* ===== Inline Send Progress ===== */
.ec-dash-send-inline {
    margin-top: 20px;
    padding: 16px 20px;
    border: 2px solid var(--msa-gold, #C9AC8C);
    border-radius: 8px;
    background: #fdfbf8;
}

.ec-dash-send-inline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.ec-dash-send-inline-header strong {
    font-size: 1rem;
}

.ec-dash-send-done strong {
    color: #27ae60;
}

.ec-dash-send-inline-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* ===== Status Tab ===== */
.ec-dash-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.ec-dash-status-card {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 6px;
    text-align: center;
}

.ec-dash-status-ok {
    border-color: var(--msa-green-light, #e8f5e9);
    background: #fafffe;
}

.ec-dash-status-warn {
    border-color: #fcf9e8;
    background: #fffdf5;
}

.ec-dash-status-icon {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ec-dash-status-ok .ec-dash-status-icon {
    color: var(--msa-green, #4CAF50);
}

.ec-dash-status-warn .ec-dash-status-icon {
    color: #dba617;
}

.ec-dash-status-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.ec-dash-status-detail {
    font-size: 0.8rem;
    color: var(--msa-text-light, #666);
}

/* ===== Back Button ===== */
.ec-dash-back-btn {
    margin-bottom: 12px;
}

/* ===== Toast ===== */
.ec-dash-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--msa-radius, 8px);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: var(--msa-text, #333);
    z-index: 100001;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    max-width: 400px;
}

.ec-dash-toast.ec-dash-toast-visible {
    transform: translateY(0);
    opacity: 1;
}

.ec-dash-toast.ec-dash-toast-error {
    background: var(--msa-red, #e74c3c);
}

.ec-dash-toast.ec-dash-toast-success {
    background: var(--msa-green, #4CAF50);
}

/* ===== Detail View ===== */
.ec-dash-detail h2 {
    font-size: 1.2rem;
    margin: 8px 0 16px;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
    .ec-dashboard {
        padding: 10px 0;
    }

    .ec-dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ec-dash-tab {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .ec-dash-panel {
        padding: 16px 0;
    }

    .ec-dash-form-grid {
        grid-template-columns: 1fr;
    }

    .ec-dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ec-dash-stat-card {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .ec-dash-radio-group {
        flex-direction: column;
        gap: 8px;
    }

    .ec-dash-table {
        font-size: 0.8rem;
    }

    .ec-dash-table th,
    .ec-dash-table td {
        padding: 8px 6px 8px 0;
    }

    .ec-dash-table th:nth-child(5),
    .ec-dash-table td:nth-child(5),
    .ec-dash-table th:nth-child(6),
    .ec-dash-table td:nth-child(6) {
        display: none;
    }

    .ec-dash-status-grid {
        grid-template-columns: 1fr;
    }

    .ec-dash-product-search {
        flex-wrap: wrap;
    }

    .ec-dash-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .ec-dash-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== Login/Notice ===== */
.ec-dash-login-required,
.ec-dash-notice {
    padding: 20px;
    text-align: center;
}

.ec-dash-notice-error {
    color: var(--msa-red, #e74c3c);
}

/* ===== People tab ===== */

.ec-dash-access-add {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 16px 0;
    flex-wrap: wrap;
}

.ec-dash-access-add input[type="email"] {
    flex: 1 1 280px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    font-size: 14px;
}

.ec-dash-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    background: #ececec;
    color: #444;
    white-space: nowrap;
}

.ec-dash-badge-ok      { background: #e4f3e6; color: #1e6b2c; }
.ec-dash-badge-pending { background: #fdf1d8; color: #7a5600; }

.ec-dash-btn-link {
    background: none;
    border: 0;
    padding: 0;
    color: #b32d2e;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

.ec-dash-notice-info {
    background: #eef4fb;
    border-left: 4px solid #4a7fb5;
    padding: 10px 12px;
    margin: 12px 0;
}

/* ===== Audience builder ===== */

.ec-audience-segment {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fcfcfc;
}

.ec-audience-segment-head {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ec-audience-facet { margin: 12px 0; }

.ec-audience-facet > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Chip picker — replaces the scrolling checkbox columns. */

.ec-chip-picker { position: relative; }

.ec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ec-chips:empty { margin-bottom: 0; }

.ec-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px 3px 10px;
    background: #eef2f7;
    color: #2d3f52;
    border-radius: 14px;
    font-size: 13px;
}

.ec-chip-x {
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0 2px;
    color: #6b7d92;
}
.ec-chip-x:hover { color: #b32d2e; }

.ec-chip-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    font-size: 14px;
}

.ec-chip-results {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,.1);
    margin-top: 2px;
}

.ec-chip-add, .ec-chip-add-all {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
}
.ec-chip-add:hover, .ec-chip-add-all:hover { background: #f2f6fb; }
.ec-chip-add-all { font-weight: 600; border-bottom: 1px solid #eee; }
.ec-chip-group { float: right; color: #8a97a5; font-size: 12px; }
.ec-chip-more { display: block; padding: 8px 10px; color: #8a97a5; font-size: 12px; }

.ec-audience-hint {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0;
}

.ec-audience-count {
    margin-top: 12px;
    padding: 10px 12px;
    background: #eef4fb;
    border-left: 4px solid #4a7fb5;
    font-weight: 600;
}

.ec-audience-sample { margin-top: 8px; font-size: 13px; }
.ec-audience-sample ul { margin: 8px 0 0 18px; }

@media (max-width: 600px) {
    .ec-audience-options { max-height: none; }
    .ec-audience-segment-head { flex-wrap: wrap; }
}

.ec-preheader-count { display:block; margin-top:4px; font-size:12px; color:#666; }
.ec-preheader-count.ec-over { color:#8a5a00; }

.ec-image-size { display:inline-flex; align-items:center; gap:6px; margin-left:10px; }
.ec-image-size label { margin:0; font-weight:600; font-size:13px; }
.ec-image-size .ec-dash-hint { margin:0; font-size:12px; color:#666; }

.ec-headline-controls { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin-top:8px; }
.ec-headline-controls span { display:inline-flex; align-items:center; gap:6px; }
.ec-headline-controls label { margin:0; font-weight:600; font-size:13px; }
.ec-headline-controls input[type="color"] { width:38px; height:28px; padding:0; border:1px solid #cfcfcf; border-radius:4px; }

.ec-audience-presets { margin: 4px 0 14px; padding: 12px 14px; background:#f6f8fb; border:1px solid #dfe6ef; border-radius:6px; }
.ec-audience-presets label { display:block; font-weight:600; margin-bottom:6px; }
.ec-audience-presets select { min-width: 320px; max-width: 100%; }

.ec-audience-list { margin-top:12px; border:1px solid #e0e0e0; border-radius:6px; padding:12px 14px; background:#fff; }
.ec-audience-list-head { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:10px; }
.ec-audience-filter { flex:1 1 220px; min-width:0; padding:6px 8px; border:1px solid #cfcfcf; border-radius:4px; }
.ec-audience-table { width:100%; font-size:13px; }
.ec-audience-table td, .ec-audience-table th { padding:6px 8px; border-bottom:1px solid #f0f0f0; text-align:left; }
.ec-audience-tag { display:inline-block; margin:0 4px 4px 0; padding:1px 7px; border-radius:10px;
                   background:#eef2f7; color:#42566e; font-size:11px; white-space:nowrap; }
.ec-audience-pager { margin-top:10px; }
.ec-audience-removed { margin-top:12px; font-size:13px; }
.ec-audience-removed ul { margin:8px 0 0 18px; }
@media (max-width:600px){
  .ec-audience-table, .ec-audience-table tbody, .ec-audience-table tr, .ec-audience-table td { display:block; width:100%; }
  .ec-audience-table thead { display:none; }
  .ec-audience-table tr { border-bottom:1px solid #eee; padding:8px 0; }
  .ec-audience-table td { border:0; padding:2px 0; }
}

.ec-dash-time { display:block; font-size:12px; color:#777; }
.ec-dash-table td[title] { white-space:nowrap; }

/* ===== Cropper ===== */

.ec-crop-modal { position:fixed; inset:0; z-index:99999; background:rgba(0,0,0,.55);
                 display:flex; align-items:center; justify-content:center; padding:20px; }
.ec-crop-box { background:#fff; border-radius:8px; padding:18px 20px; max-width:860px; width:100%;
               max-height:92vh; overflow:auto; box-shadow:0 8px 40px rgba(0,0,0,.3); }
.ec-crop-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.ec-crop-ratios { display:flex; flex-wrap:wrap; gap:14px; margin:10px 0 12px; }
.ec-crop-ratios label { display:inline-flex; align-items:center; gap:5px; font-size:13px; cursor:pointer; }
.ec-crop-stage { position:relative; display:inline-block; max-width:100%; line-height:0;
                 user-select:none; -webkit-user-select:none; touch-action:none; cursor:crosshair; }
.ec-crop-stage img { max-width:100%; height:auto; display:block; }
.ec-crop-sel { position:absolute; border:2px solid #fff; outline:1px solid rgba(0,0,0,.6);
               box-shadow:0 0 0 9999px rgba(0,0,0,.45); pointer-events:none; }
.ec-crop-actions { display:flex; gap:10px; margin-top:14px; }
@media (max-width:600px){ .ec-crop-box { padding:14px; } }

/* Test pop-up: several recipients, colleagues one click away. Chips state both colours. */
#ecTestEmail { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; background: #fff; color: #1e1e1e; }
.ec-dash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ec-dash-chip { border: 1px solid #c3c4c7; background: #fff; color: #1e1e1e; border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.ec-dash-chip:hover { background: #f0f0f1; color: #000; }
.ec-dash-chip.is-on { background: #2271b1; border-color: #2271b1; color: #fff; }
