/**
 * CMGalaxy Connector — Admin Styles
 *
 * @package CMGalaxy_Connector
 * @since   1.1.0
 */

/* ──────────────────────────────────────────────────────────────
   Layout
   ────────────────────────────────────────────────────────────── */

#cmgalaxy-wrap {
	max-width: 680px;
	margin: 30px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#cmgalaxy-wrap h1 {
	font-size: 1.6rem;
	margin-bottom: 6px;
	color: #1d2327;
}

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

.cmg-header {
	margin-bottom: 8px;
}

.cmg-logo {
	max-height: 48px;
	width: auto;
	display: block;
	image-rendering: optimizeQuality;
}

#cmgalaxy-wrap .subtitle {
	color: #646970;
	margin-bottom: 24px;
	font-size: 0.95rem;
}

/* ──────────────────────────────────────────────────────────────
   Card
   ────────────────────────────────────────────────────────────── */

.cmg-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 24px 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ──────────────────────────────────────────────────────────────
   Status Badge
   ────────────────────────────────────────────────────────────── */

.cmg-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 20px;
}

.cmg-status-badge.connected {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.cmg-status-badge.disconnected {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.cmg-status-badge .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

.cmg-status-badge.connected .dot {
	background: #10b981;
}

.cmg-status-badge.disconnected .dot {
	background: #ef4444;
}

/* ──────────────────────────────────────────────────────────────
   Buttons
   ────────────────────────────────────────────────────────────── */

.cmg-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.cmg-btn-connect,
.cmg-btn-disconnect {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	padding: 8px 20px !important;
	font-size: 0.95rem !important;
	font-weight: 600;
	border-radius: 6px !important;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
}

.cmg-btn-connect:active,
.cmg-btn-disconnect:active {
	transform: scale(0.97);
}

.cmg-btn-connect:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.cmg-btn-disconnect {
	background: #fff !important;
	color: #b32d2e !important;
	border-color: #b32d2e !important;
}

.cmg-btn-disconnect:hover {
	background: #fef2f2 !important;
}

/* ──────────────────────────────────────────────────────────────
   Messages
   ────────────────────────────────────────────────────────────── */

.cmg-msg {
	margin-top: 14px;
	font-size: 0.9rem;
	min-height: 20px;
}

.cmg-msg-success {
	color: #065f46;
}

.cmg-msg-error {
	color: #991b1b;
}

/* ──────────────────────────────────────────────────────────────
   Details Panel
   ────────────────────────────────────────────────────────────── */

.cmg-details-panel.hidden {
	display: none;
}

.cmg-divider {
	border: none;
	border-top: 1px solid #f0f0f1;
	margin: 16px 0;
}

.cmg-details-heading {
	font-size: 0.95rem;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
}

/* Details table */
.cmg-details {
	border-collapse: collapse;
	width: 100%;
}

.cmg-details tr {
	border-bottom: 1px solid #f0f0f1;
}

.cmg-details tr:last-child {
	border-bottom: none;
}

.cmg-details th {
	width: 38%;
	text-align: left;
	padding: 10px 0;
	color: #646970;
	font-weight: 500;
	font-size: 0.88rem;
}

.cmg-details td {
	padding: 10px 0;
	font-size: 0.88rem;
	color: #1d2327;
	word-break: break-all;
}

.cmg-details .masked {
	font-family: monospace;
	letter-spacing: 1px;
}

/* Copy button */
.cmg-copy-btn {
	background: none;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 2px 8px;
	cursor: pointer;
	font-size: 0.75rem;
	color: #2271b1;
	margin-left: 8px;
	vertical-align: middle;
	transition: background 0.15s;
}

.cmg-copy-btn:hover {
	background: #f0f6fc;
}

/* Status indicators */
.cmg-status-ok {
	color: #065f46;
}

.cmg-status-warn {
	color: #92400e;
}
