/* ==========================================================================
   AEO Command Center — Styles
   ========================================================================== */

/* ── Tab Navigation ─────────────────────────────────────────────────────── */

.twt-aeo-cc__tabs {
	display: flex;
	align-items: center;
	gap: 0;
	border-bottom: 2px solid #e0e0e0;
	margin: 16px 0 0;
	padding: 0;
}

.twt-aeo-cc__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	font-size: 13px;
	font-weight: 500;
	color: #50575e;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.twt-aeo-cc__tab:hover {
	color: #1d2327;
	border-bottom-color: #c0c0c0;
}

.twt-aeo-cc__tab--active {
	color: #1d2327;
	border-bottom-color: #2271b1;
	font-weight: 600;
}

.twt-aeo-cc__dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.twt-aeo-cc__dot--connected {
	background: #00a32a;
}

/* ── Content Area ───────────────────────────────────────────────────────── */

.twt-aeo-cc__content {
	margin-top: 24px;
}

/* ── Header Subtitle ────────────────────────────────────────────────────── */

.twt-aeo-header__sub {
	margin: 4px 0 0;
	font-size: 13px;
	color: #787c82;
}

/* ── Overview Grid ──────────────────────────────────────────────────────── */

.twt-aeo-cc__overview-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 16px;
}

@media (max-width: 1100px) {
	.twt-aeo-cc__overview-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 700px) {
	.twt-aeo-cc__overview-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Service Cards ──────────────────────────────────────────────────────── */

.twt-aeo-cc__service-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.twt-aeo-cc__service-card--connected {
	border-color: #c3d9f0;
}

.twt-aeo-cc__service-card--disconnected {
	background: #fafafa;
}

.twt-aeo-cc__service-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.twt-aeo-cc__service-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 6px;
	flex-shrink: 0;
}

.twt-aeo-cc__service-icon--google { background: #f0f6ff; }
.twt-aeo-cc__service-icon--gsc    { background: #f0f6ff; }
.twt-aeo-cc__service-icon--bing   { background: #e6f7f4; }

.twt-aeo-cc__service-name {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

/* ── Status Badges ──────────────────────────────────────────────────────── */

.twt-aeo-cc__status-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.twt-aeo-cc__status-badge--connected {
	background: #d1f0da;
	color: #0a6b2e;
}

.twt-aeo-cc__status-badge--disconnected {
	background: #f0f0f0;
	color: #787c82;
}

/* ── Metric Row (inside service cards) ──────────────────────────────────── */

.twt-aeo-cc__metric-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.twt-aeo-cc__metric {
	display: flex;
	flex-direction: column;
	min-width: 60px;
}

.twt-aeo-cc__metric-value {
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
}

.twt-aeo-cc__metric-label {
	font-size: 11px;
	color: #787c82;
	margin-top: 2px;
}

.twt-aeo-cc__card-link {
	font-size: 12px;
	color: #2271b1;
	text-decoration: none;
	align-self: flex-start;
}

.twt-aeo-cc__card-link:hover {
	text-decoration: underline;
}

.twt-aeo-cc__card-note {
	font-size: 13px;
	color: #50575e;
	margin: 0;
}

.twt-aeo-cc__card-error {
	font-size: 12px;
	color: #cc1818;
	margin: 0;
	padding: 8px;
	background: #fcf0f0;
	border-radius: 4px;
}

/* ── Refresh Note ───────────────────────────────────────────────────────── */

.twt-aeo-cc__refresh-note {
	font-size: 12px;
	color: #787c82;
	margin-top: 8px;
}

.twt-aeo-cc__refresh-note a {
	color: #2271b1;
}

/* ── Tab Header ─────────────────────────────────────────────────────────── */

.twt-aeo-cc__tab-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 20px;
}

.twt-aeo-cc__tab-title {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 2px;
	color: #1d2327;
}

.twt-aeo-cc__date-range {
	font-size: 12px;
	color: #787c82;
}

.twt-aeo-cc__refresh-link {
	font-size: 12px;
	color: #2271b1;
	text-decoration: none;
	margin-top: 4px;
	white-space: nowrap;
}

.twt-aeo-cc__refresh-link:hover {
	text-decoration: underline;
}

/* ── Metrics Bar ────────────────────────────────────────────────────────── */

.twt-aeo-cc__metrics-bar {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.twt-aeo-cc__metric-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 20px;
	min-width: 120px;
	flex: 1;
}

.twt-aeo-cc__metric-card-value {
	font-size: 26px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.15;
}

.twt-aeo-cc__metric-card-label {
	font-size: 12px;
	color: #787c82;
	margin-top: 4px;
}

/* ── Data Tables ────────────────────────────────────────────────────────── */

.twt-aeo-cc__data-section {
	margin-bottom: 28px;
}

.twt-aeo-cc__section-title {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 10px;
}

.twt-aeo-cc__table {
	border-collapse: collapse;
	width: 100%;
	font-size: 13px;
}

.twt-aeo-cc__table th {
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	padding: 8px 12px;
	text-align: left;
}

.twt-aeo-cc__table td {
	padding: 8px 12px;
	color: #1d2327;
}

.twt-aeo-cc__col-num {
	text-align: right !important;
	font-variant-numeric: tabular-nums;
}

/* ── Settings ───────────────────────────────────────────────────────────── */

.twt-aeo-section__title .twt-aeo-cc__icon {
	vertical-align: middle;
	margin-right: 6px;
	margin-bottom: 2px;
}

.twt-aeo-section__title .twt-aeo-cc__status-badge {
	vertical-align: middle;
	margin-left: 10px;
}

.twt-aeo-cc__setup-step {
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 24px;
	margin-bottom: 24px;
}

.twt-aeo-cc__setup-step:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.twt-aeo-cc__setup-step--disabled {
	opacity: 0.5;
	pointer-events: none;
}

.twt-aeo-cc__step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 12px;
}

.twt-aeo-cc__step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #2271b1;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	flex-shrink: 0;
}

/* Redirect URI box */

.twt-aeo-cc__redirect-uri {
	margin-bottom: 18px;
}

.twt-aeo-cc__redirect-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	margin-bottom: 6px;
}

.twt-aeo-cc__redirect-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.twt-aeo-cc__redirect-value {
	display: inline-block;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 12px;
	color: #1d2327;
	word-break: break-all;
	flex: 1;
}

.twt-aeo-cc__copy-btn {
	flex-shrink: 0;
}

.twt-aeo-cc__copy-btn.copied {
	color: #00a32a;
}

/* Form table */

.twt-aeo-cc__form-table {
	margin-top: 0 !important;
}

.twt-aeo-cc__form-table th {
	padding-left: 0 !important;
	width: 180px;
}

/* Connected row */

.twt-aeo-cc__connected-row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.twt-aeo-cc__connected-label {
	font-size: 13px;
	color: #0a6b2e;
	font-weight: 500;
}

.twt-aeo-cc__disconnect-btn {
	font-size: 12px !important;
}

/* OAuth button */

.twt-aeo-cc__oauth-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Bing actions */

.twt-aeo-cc__bing-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 0;
}

/* ── Prompt States ──────────────────────────────────────────────────────── */

.twt-aeo-cc__prompt {
	background: #f6f7f7;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	padding: 36px 24px;
	text-align: center;
	max-width: 480px;
	margin: 0 auto;
}

.twt-aeo-cc__prompt-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
}

.twt-aeo-cc__prompt-message {
	font-size: 13px;
	color: #50575e;
	margin: 0 0 16px;
}

/* ── Empty State ────────────────────────────────────────────────────────── */

.twt-aeo-cc__empty {
	padding: 24px;
	color: #50575e;
	font-size: 13px;
	text-align: center;
}

/* ── Icons ──────────────────────────────────────────────────────────────── */

.twt-aeo-cc__icon {
	width: 20px;
	height: 20px;
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

.twt-aeo-cc__service-icon .twt-aeo-cc__icon {
	width: 22px;
	height: 22px;
}

/* ── SEO Recommendations ────────────────────────────────────────────────── */

.twt-aeo-cc__rec-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	margin-left: 8px;
	border-radius: 11px;
	background: #e0e0e0;
	color: #1d2327;
	font-size: 11px;
	font-weight: 700;
	vertical-align: middle;
}

.twt-aeo-cc__severity-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	white-space: nowrap;
}

.twt-aeo-cc__sev--critical {
	background: #fde8e8;
	color: #9b1c1c;
}

.twt-aeo-cc__sev--warning {
	background: #fef3c7;
	color: #92400e;
}

.twt-aeo-cc__sev--notice {
	background: #dbeafe;
	color: #1e40af;
}

/* ── Top Pages signal badges + cell flags ───────────────────────────────── */

.twt-aeo-cc__signal-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	white-space: nowrap;
}

.twt-aeo-cc__sig--good {
	background: #d1f0da;
	color: #0a6b2e;
}

.twt-aeo-cc__sig--ok {
	background: #e7f0fb;
	color: #1e40af;
}

.twt-aeo-cc__sig--bots {
	background: #f0f0f0;
	color: #50575e;
}

.twt-aeo-cc__sig--bad {
	background: #fde8e8;
	color: #9b1c1c;
}

.twt-aeo-cc__cell--warn {
	color: #92400e;
	font-weight: 600;
}

.twt-aeo-cc__cell--bad {
	color: #9b1c1c;
	font-weight: 700;
}

.twt-aeo-cc__table-note {
	margin: 8px 0 0;
	font-size: 12px;
	color: #787c82;
	line-height: 1.5;
}

.twt-aeo-cc__callout {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 14px 16px;
}

.twt-aeo-cc__callout p {
	margin: 0 0 10px;
	font-size: 13px;
	color: #3c434a;
	line-height: 1.5;
}

.twt-aeo-cc__rec-table td {
	vertical-align: top;
	padding-top: 10px;
	padding-bottom: 10px;
}

.twt-aeo-cc__rec-suggestion {
	margin: 4px 0 0;
	color: #50575e;
	font-size: 12px;
}

.twt-aeo-cc__rec-url {
	font-size: 12px;
	word-break: break-all;
	max-width: 280px;
}

.twt-aeo-cc__rec-no-edit {
	color: #b0b0b0;
}
