/* Easy Form Builder — Dashboard Widget */
.efb-dw{position:relative;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}

/* Period tabs */
.efb-dw-period-tabs{display:flex;gap:4px;margin-bottom:14px;border-bottom:1px solid #e0e0e0;padding-bottom:8px}
.efb-dw-tab{background:none;border:1px solid #ddd;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:12px;color:#50575e;transition:all .2s}
.efb-dw-tab:hover{background:#f0f0f1;border-color:#bbb}
.efb-dw-tab.active{background:#2271b1;color:#fff;border-color:#2271b1}

/* Cards grid */
.efb-dw-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
@media(max-width:1200px){.efb-dw-cards{grid-template-columns:repeat(2,1fr);gap:8px}}
@media(max-width:600px){.efb-dw-cards{gap:6px}.efb-dw-card-value{font-size:17px}}
.efb-dw-card{display:flex;align-items:center;gap:7px;padding:12px 7px;border-radius:6px;background:#f6f7f7;border:1px solid #e0e0e0;transition:box-shadow .2s}
.efb-dw-card:hover{box-shadow:0 1px 4px rgba(0,0,0,.08)}

.efb-dw-card-icon{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.efb-dw-card-icon .dashicons{font-size:18px;width:18px;height:18px}

.efb-dw-card--visits .efb-dw-card-icon{background:#e8f0fe;color:#2271b1}
.efb-dw-card--submissions .efb-dw-card-icon{background:#e6f4ea;color:#00a32a}
.efb-dw-card--email-ok .efb-dw-card-icon{background:#fef7e0;color:#996800}
.efb-dw-card--email-fail .efb-dw-card-icon{background:#fce8e8;color:#d63638}

.efb-dw-card--email-fail{cursor:pointer}
.efb-dw-card--email-fail:hover{border-color:#d63638;background:#fef6f6}

.efb-dw-card-body{display:flex;flex-direction:column;min-width:0}
.efb-dw-card-value{font-size:20px;font-weight:600;line-height:1.2;color:#1d2327}
.efb-dw-card-label{font-size:11px;color:#646970;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.efb-dw-card-label[data-efb-full]{cursor:help}
/* Floating tooltip (JS-positioned, avoids overflow:hidden clipping) */
.efb-dw-label-tip{position:fixed;background:#1d2327;color:#fff;padding:4px 8px;border-radius:4px;font-size:11px;white-space:nowrap;z-index:999999;pointer-events:none;box-shadow:0 2px 6px rgba(0,0,0,.28);display:none}

/* Chart */
.efb-dw-chart-wrap{position:relative;width:100%;margin-bottom:6px}
.efb-dw-chart-wrap canvas{width:100%!important;max-height:200px}

/* Error panel */
.efb-dw-errors-panel{background:#fff;border:1px solid #d63638;border-radius:6px;margin-top:12px;max-height:280px;overflow:hidden;display:flex;flex-direction:column}
.efb-dw-errors-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#fef6f6;border-bottom:1px solid #f0c1c1;font-size:13px;color:#d63638}
.efb-dw-errors-header .dashicons{font-size:16px;width:16px;height:16px;vertical-align:middle;margin-inline-end:4px}
.efb-dw-errors-close{background:none;border:none;font-size:18px;cursor:pointer;color:#646970;padding:0 4px;line-height:1}
.efb-dw-errors-close:hover{color:#d63638}
.efb-dw-errors-list{overflow-y:auto;max-height:230px;padding:0}
.efb-dw-errors-list table{width:100%;border-collapse:collapse;font-size:12px}
.efb-dw-errors-list th{background:#f9f9f9;padding:6px 8px;text-align:start;border-bottom:1px solid #e0e0e0;font-weight:500;color:#50575e;position:sticky;top:0}
.efb-dw-errors-list td{padding:5px 8px;border-bottom:1px solid #f0f0f1;color:#3c434a;word-break:break-word}
.efb-dw-errors-list tr:last-child td{border-bottom:none}
.efb-dw-errors-empty{padding:16px;text-align:center;color:#999;font-size:13px}

/* Loading overlay */
.efb-dw-loading{position:absolute;inset:0;background:rgba(255,255,255,.65);display:flex;align-items:center;justify-content:center;z-index:5;border-radius:6px}
.efb-dw-loading .spinner{float:none;margin:0}

/* RTL */
[dir="rtl"] .efb-dw-errors-header .dashicons{margin-inline-start:4px;margin-inline-end:0}
