/**
 * AI Translate Pro — Admin Panel Styles
 * Clean tabbed layout
 */

.wbw-wrap { max-width: 960px; margin: 20px 20px 20px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* Header */
.wbw-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.wbw-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: #1d2327; }
.wbw-logo .dashicons { font-size: 28px; width: 28px; height: 28px; color: #2271b1; }
.wbw-version { font-size: 11px; font-weight: 400; color: #999; background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }

/* Tabs */
.wbw-tabs { display: flex; gap: 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 0; }
.wbw-tab { display: flex; align-items: center; gap: 6px; padding: 11px 18px; font-size: 13px; font-weight: 500; color: #646970; cursor: pointer; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; transition: color 0.15s; white-space: nowrap; }
.wbw-tab:hover { color: #2271b1; }
.wbw-tab.active { color: #2271b1; border-bottom-color: #2271b1; font-weight: 600; }
.wbw-tab .dashicons { font-size: 16px; width: 16px; height: 16px; }
.wbw-tab-badge { background: #d63638; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.wbw-tab.wbw-tab-pro { color: #b45309; font-weight: 600; }
.wbw-tab.wbw-tab-pro:hover { color: #92400e; }
.wbw-tab.wbw-tab-pro.active { color: #92400e; border-bottom-color: #f59e0b; }
.wbw-tab.wbw-tab-pro .dashicons { color: #f59e0b; }

/* Panels */
.wbw-panel { display: none; padding: 24px 0 0; animation: wbwFade 0.15s ease; }
.wbw-panel.active { display: block; }
@keyframes wbwFade { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.wbw-section { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; }
.wbw-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0 0 12px; border-bottom: 1px solid #f0f0f1; font-size: 14px; font-weight: 600; color: #1d2327; }
.wbw-section-title .dashicons { font-size: 18px; width: 18px; height: 18px; color: #2271b1; }
.wbw-section-title .wbw-right { margin-left: auto; }

/* Stats */
.wbw-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 4px; }
.wbw-stat-box { background: #f8f9fa; border: 1px solid #e8ecf0; border-radius: 8px; padding: 16px; text-align: center; }
.wbw-stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; color: #1d2327; }
.wbw-stat-value.green { color: #00a32a; }
.wbw-stat-value.red { color: #d63638; }
.wbw-stat-value.blue { color: #2271b1; }
.wbw-stat-value.orange { color: #dba617; }
.wbw-stat-label { font-size: 11px; color: #646970; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

/* Progress */
.wbw-progress-wrap { position: relative; background: #e8ecf0; border-radius: 10px; height: 20px; overflow: hidden; margin: 8px 0; }
.wbw-progress-bar { background: linear-gradient(90deg, #2271b1, #135e96); height: 100%; border-radius: 10px; transition: width 0.4s ease; }
.wbw-progress-bar.complete { background: linear-gradient(90deg, #00a32a, #008a20); }
.wbw-progress-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.2); }

/* Form fields */
.wbw-field { margin-bottom: 16px; }
.wbw-field:last-child { margin-bottom: 0; }
.wbw-field-label { display: block; font-size: 13px; font-weight: 600; color: #1d2327; margin-bottom: 6px; }
.wbw-field-help { font-size: 12px; color: #646970; margin-top: 4px; line-height: 1.4; }
.wbw-field input[type="text"], .wbw-field input[type="number"], .wbw-field input[type="password"], .wbw-field select { width: 100%; max-width: 400px; padding: 8px 12px; border: 1px solid #c3c4c7; border-radius: 4px; font-size: 13px; }
.wbw-field input:focus, .wbw-field select:focus { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; outline: none; }
.wbw-field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.wbw-field-row .wbw-field { flex: 1; min-width: 180px; }

/* Toggle */
.wbw-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.wbw-toggle input { display: none; }
.wbw-toggle-track { width: 36px; height: 20px; background: #c3c4c7; border-radius: 10px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.wbw-toggle input:checked + .wbw-toggle-track { background: #2271b1; }
.wbw-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.wbw-toggle input:checked + .wbw-toggle-track::after { transform: translateX(16px); }

/* Tables */
.wbw-section table.widefat { border: none; box-shadow: none; margin: 0; }
.wbw-section table.widefat th, .wbw-section table.widefat td { padding: 8px 12px; }
.wbw-section table.widefat thead th { font-weight: 600; color: #646970; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #e8ecf0; background: transparent; }
.wbw-section table.widefat tbody tr { border-bottom: 1px solid #f0f0f1; }
.wbw-section table.widefat tbody tr:last-child { border-bottom: none; }
.wbw-section table.widefat tbody tr:hover { background: #f8f9fa; }

/* Lang tags */
.wbw-lang-ok-text { color: #00a32a; font-weight: 600; }
.wbw-lang-expired { color: #dba617; font-weight: 600; }
.wbw-lang-missing { color: #d63638; font-weight: 600; }
.wbw-lang-ok { color: #00a32a; font-weight: 700; }
.wbw-lang-no { color: #ccc; }

/* Checkboxes & chips */
.wbw-checkbox-grid { max-height: 250px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 6px; padding: 10px 14px; background: #fafafa; }
.wbw-checkbox-grid label { display: block; margin: 4px 0; cursor: pointer; font-size: 13px; }
.wbw-checkbox-grid label:hover { color: #2271b1; }
.wbw-cat-count { color: #999; font-size: 12px; }
.wbw-lang-chips { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.wbw-lang-chips label { cursor: pointer; font-size: 13px; }
.wbw-select-links { margin: 6px 0 0; font-size: 12px; }
.wbw-select-links a { text-decoration: none; }

/* Notices */
.wbw-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.wbw-notice-warning { background: #fff8e1; border: 1px solid #ffc107; }
.wbw-notice-danger { background: #fef2f2; border: 1px solid #e5484d; }
.wbw-notice .dashicons { flex-shrink: 0; margin-top: 1px; }

/* Danger button */
.wbw-wrap .button.wbw-btn-danger { color: #d63638; border-color: #d63638; }
.wbw-wrap .button.wbw-btn-danger:hover { background: #d63638; color: #fff; border-color: #d63638; }

/* Steps */
.wbw-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.wbw-steps li { counter-increment: step; position: relative; padding: 8px 0 8px 36px; font-size: 13px; color: #3c434a; border-left: 2px solid #e0e0e0; margin-left: 12px; }
.wbw-steps li:last-child { border-left-color: transparent; }
.wbw-steps li::before { content: counter(step); position: absolute; left: -13px; top: 6px; width: 24px; height: 24px; background: #2271b1; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Plan table */
.wbw-plan-table { border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; width: 100%; border-collapse: collapse; }
.wbw-plan-table th, .wbw-plan-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f1; font-size: 13px; }
.wbw-plan-table thead tr { background: #f8f9fa; }
.wbw-plan-table th:not(:first-child), .wbw-plan-table td:not(:first-child) { text-align: center; }
.wbw-plan-col-pro { background: #f0f6fc; font-weight: 600; }

/* Editor modal */
.wbw-editor-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; }
.wbw-editor-modal { background: #fff; border-radius: 10px; width: 92vw; max-width: 1200px; height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.25); animation: wbwEdSlide 0.2s ease; }
@keyframes wbwEdSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.wbw-editor-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; }
.wbw-editor-close { background: none; border: none; cursor: pointer; font-size: 22px; color: #999; padding: 4px 8px; border-radius: 6px; }
.wbw-editor-close:hover { background: #f0f0f0; color: #333; }
.wbw-editor-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.wbw-editor-tabs { display: flex; gap: 0; padding: 0 20px; border-bottom: 2px solid #e0e0e0; flex-shrink: 0; }
.wbw-ed-tab { background: none; border: none; cursor: pointer; padding: 10px 18px; font-size: 13px; font-weight: 500; color: #646970; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s; }
.wbw-ed-tab:hover { color: #2271b1; }
.wbw-ed-tab.active { color: #2271b1; border-bottom-color: #2271b1; font-weight: 600; }
.wbw-ed-panel { flex: 1; overflow: hidden; }
.wbw-ed-textarea { width: 100%; height: 100%; border: none; padding: 16px 20px; font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 13px; line-height: 1.6; resize: none; color: #1d2327; background: #fafafa; outline: none; box-sizing: border-box; }
.wbw-ed-textarea:focus { background: #fff; }
.wbw-ed-iframe { width: 100%; height: 100%; border: none; }
.wbw-editor-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid #e0e0e0; flex-shrink: 0; }

/* Post list column */
.column-wbw_trans { width: 120px !important; }

/* Responsive */
@media (max-width: 782px) {
    .wbw-stats-grid { grid-template-columns: 1fr 1fr; }
    .wbw-tabs { overflow-x: auto; }
    .wbw-field-row { flex-direction: column; }
}
