/*
 * Frontend public styles for the Crypto Price plugin.
 * Features: Rich Aesthetics, Glassmorphism, Dark/Light Themes, and Responsive layouts.
 */

:root {
	--crypto-green: #10b981;
	--crypto-red: #ef4444;
	--crypto-text-muted: #8a99ad;
	--crypto-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Card General Wrapper */
.crypto-price-card {
	display: inline-flex;
	flex-direction: column;
	width: 100%;
	max-width: 350px;
	border-radius: 16px;
	padding: 20px;
	box-sizing: border-box;
	font-family: var(--crypto-font-stack);
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	margin: 15px 0;
	position: relative;
	overflow: hidden;
}

/* Hover effects */
.crypto-price-card:hover {
	transform: translateY(-4px);
}

/* 1. Theme: Glassmorphism */
.crypto-theme-glass {
	background: rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(14px) saturate(180%);
	-webkit-backdrop-filter: blur(14px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
	color: #1e293b;
}
.crypto-theme-glass .crypto-coin-name {
	color: #0f172a;
}
.crypto-theme-glass .crypto-coin-symbol {
	background: rgba(0, 0, 0, 0.05);
	color: #475569;
}
.crypto-theme-glass .crypto-price-display {
	color: #0f172a;
}
.crypto-theme-glass:hover {
	box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
	border-color: rgba(255, 255, 255, 0.45);
}

/* 2. Theme: Dark Mode */
.crypto-theme-dark {
	background: #0d121f;
	border: 1px solid rgba(255, 255, 255, 0.05);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
	color: #f1f5f9;
}
.crypto-theme-dark .crypto-coin-name {
	color: #ffffff;
}
.crypto-theme-dark .crypto-coin-symbol {
	background: rgba(255, 255, 255, 0.08);
	color: #94a3b8;
}
.crypto-theme-dark .crypto-price-display {
	color: #ffffff;
}
.crypto-theme-dark:hover {
	border-color: rgba(16, 185, 129, 0.3);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.05);
}

/* 3. Theme: Light Mode */
.crypto-theme-light {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
	color: #334155;
}
.crypto-theme-light .crypto-coin-name {
	color: #0f172a;
}
.crypto-theme-light .crypto-coin-symbol {
	background: #f1f5f9;
	color: #64748b;
}
.crypto-theme-light .crypto-price-display {
	color: #0f172a;
}
.crypto-theme-light:hover {
	border-color: #cbd5e1;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Card Header */
.crypto-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.crypto-coin-info {
	display: flex;
	align-items: center;
}

.crypto-coin-logo {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	margin-right: 12px;
	background: transparent;
	display: block;
}

.crypto-coin-meta {
	display: flex;
	flex-direction: column;
}

.crypto-coin-name {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
}

.crypto-coin-symbol {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	width: max-content;
	margin-top: 3px;
	letter-spacing: 0.5px;
}

/* Change Badges */
.crypto-change-badge {
	font-weight: 700;
	font-size: 0.85rem;
	padding: 6px 12px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.crypto-up {
	background: rgba(16, 185, 129, 0.12);
	color: var(--crypto-green);
}

.crypto-down {
	background: rgba(239, 68, 68, 0.12);
	color: var(--crypto-red);
}

.crypto-arrow {
	font-size: 0.75rem;
}

/* Card Body */
.crypto-card-body {
	margin-bottom: 16px;
}

.crypto-price-display {
	font-size: 2.1rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.5px;
}

.crypto-currency-symbol {
	font-size: 1.4rem;
	font-weight: 500;
	margin-right: 2px;
	vertical-align: super;
}

/* Fallback message */
.crypto-fallback-warning {
	display: flex;
	align-items: center;
	font-size: 0.75rem;
	color: #d97706;
	background: rgba(217, 119, 6, 0.08);
	padding: 4px 8px;
	border-radius: 4px;
	margin-top: 8px;
	width: max-content;
	gap: 4px;
}
.crypto-fallback-warning .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* Card Footer */
.crypto-card-footer {
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	padding-top: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75rem;
}

.crypto-theme-dark .crypto-card-footer {
	border-top-color: rgba(255, 255, 255, 0.06);
}

.crypto-footer-metric {
	display: flex;
	gap: 4px;
}

.crypto-label {
	color: var(--crypto-text-muted);
}

.crypto-value {
	font-weight: 600;
}

.crypto-footer-updated {
	color: var(--crypto-text-muted);
	font-style: italic;
}


/* Inline Badge Layout */
.crypto-price-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 50px;
	font-family: var(--crypto-font-stack);
	font-size: 0.85rem;
	font-weight: 600;
	gap: 8px;
	margin: 5px;
	transition: all 0.2s ease;
	vertical-align: middle;
}

.crypto-badge-logo {
	width: 18px;
	height: 18px;
	border-radius: 50%;
}

.crypto-badge-symbol {
	font-weight: 700;
}

.crypto-badge-price {
	font-weight: 700;
}

.crypto-badge-change {
	font-size: 0.75rem;
	padding: 2px 6px;
	border-radius: 10px;
	font-weight: 700;
}

/* Badge Fallback indicator */
.crypto-badge-fallback-dot {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	background: #d97706;
	color: #fff;
	font-size: 9px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	font-weight: bold;
	cursor: help;
}

/* General Error Notice */
.crypto-error-notice {
	background: #fef2f2;
	border-left: 4px solid var(--crypto-red);
	color: #991b1b;
	padding: 12px 16px;
	font-family: var(--crypto-font-stack);
	font-size: 0.85rem;
	border-radius: 4px;
	margin: 10px 0;
	box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.crypto-price-unavailable {
	color: var(--crypto-text-muted);
	font-family: var(--crypto-font-stack);
	font-size: 0.85rem;
	font-style: italic;
	cursor: help;
}
