/* =============================================================
   Spotify Player – Frontend Styles  v1.1.0
   ============================================================= */

/* Wrapper */
.sp-player-wrapper {
	--sp-accent: #1DB954;
	--sp-text: #ffffff;
	width: 100%;
	max-width: 900px;
	margin: 0 auto 2rem;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	animation: sp-fade-in 0.4s ease;
}

@keyframes sp-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Optional title bar */
.sp-player-title {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	color: var(--sp-text);
	font-size: 0.85rem;
	font-weight: 600;
	background: rgba(0, 0, 0, 0.25);
}

/* Iframe – inline style from PHP sets the height,
   !important here prevents any theme CSS from overriding it */
.sp-iframe,
.sp-player-wrapper iframe {
	display: block !important;
	width: 100% !important;
	border: 0 !important;
	/* Height is set by inline style on the element itself */
}

/* Error message */
.sp-error {
	background: #2d1b1b;
	border: 1px solid #c0392b;
	color: #ff6b6b;
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 0.9rem;
	max-width: 900px;
	margin: 0 auto 1.5rem;
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 768px) {
	.sp-player-wrapper {
		margin-bottom: 1.5rem;
	}
}

@media (max-width: 480px) {
	.sp-player-wrapper {
		border-radius: 8px;
	}
}

/* =============================================================
   Admin Page Styles
   ============================================================= */

.sp-admin-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 1300px;
	padding-bottom: 40px;
}

/* Admin Header */
.sp-admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
	padding-bottom: 18px;
	border-bottom: 2px solid #1DB954;
}

.sp-admin-logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Logo SVG – small and tight */
.sp-admin-logo svg {
	width: 28px !important;
	height: 28px !important;
	flex-shrink: 0;
}

.sp-admin-logo h1 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e1e1e;
}

/* Notice */
.sp-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 500;
}

.sp-notice--success {
	background: #d4f5e0;
	color: #1a6e36;
	border: 1px solid #a3d9b1;
}

/* Shortcode Box */
.sp-shortcode-box {
	background: linear-gradient(135deg, #0f3d23 0%, #1a1a2e 100%);
	border: 1px solid #1DB954;
	border-radius: 12px;
	padding: 18px 22px 14px;
	margin-bottom: 24px;
}

.sp-shortcode-box>label {
	display: block;
	color: #a8e6bf;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.sp-shortcode-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.sp-shortcode-row input[type="text"] {
	flex: 1;
	min-width: 200px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 10px 16px;
	color: #1DB954;
	font-family: "Consolas", "Monaco", monospace;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	outline: none;
}

.sp-shortcode-hint {
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.82rem;
}

/* Buttons */
.sp-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	border-radius: 8px;
	border: none;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.sp-btn--green {
	background: #1DB954;
	color: #fff;
}

.sp-btn--green:hover {
	background: #17a348;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4);
}

.sp-btn--green:active {
	transform: translateY(0);
}

/* Admin Grid */
.sp-admin-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

@media (max-width: 1024px) {
	.sp-admin-grid {
		grid-template-columns: 1fr;
	}
}

/* Card */
.sp-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	border: 1px solid #e8e8e8;
}

.sp-card__title {
	margin: 0 0 22px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e1e1e;
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f0f0;
}

.sp-card__title .dashicons {
	color: #1DB954;
}

/* Form fields */
.sp-field {
	margin-bottom: 20px;
}

.sp-field label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	color: #333;
	margin-bottom: 7px;
}

.sp-input-url {
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.92rem;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.sp-input-url:focus {
	border-color: #1DB954;
	outline: none;
	box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.sp-input-sm {
	width: 120px;
	padding: 8px 12px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.9rem;
}

.sp-field-hint {
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: #888;
}

.sp-field-hint--ok {
	color: #1DB954;
	display: flex;
	align-items: center;
	gap: 4px;
}

.sp-field-hint code {
	background: #f0faf4;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 0.85em;
}

/* Radio group */
.sp-radio-group {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.sp-radio {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
	font-size: 0.9rem;
}

.sp-radio--active,
.sp-radio:has(input:checked) {
	border-color: #1DB954;
	background: #f0faf4;
}

.sp-radio input[type="radio"] {
	display: none;
}

.sp-radio-swatch {
	font-size: 1.2rem;
}

/* Colors section */
.sp-colors-section h3 {
	font-size: 0.88rem;
	font-weight: 700;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	margin: 0 0 14px;
}

.sp-colors-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

@media (max-width: 600px) {
	.sp-colors-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* WP Color Picker override */
.sp-field .wp-picker-container {
	display: block;
}

/* Form footer */
.sp-form-footer {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid #f0f0f0;
}

.sp-btn-submit.button-primary {
	background: #1DB954;
	border-color: #17a348;
	font-size: 0.95rem;
	padding: 8px 22px;
	height: auto;
	border-radius: 8px;
}

.sp-btn-submit.button-primary:hover {
	background: #17a348;
}

/* Preview card */
.sp-card--preview .sp-no-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 280px;
	color: #aaa;
	text-align: center;
}

.sp-no-preview .dashicons {
	font-size: 48px;
	color: #ccc;
	width: 48px;
	height: 48px;
}

.sp-preview-wrapper {
	border-radius: 10px;
	overflow: hidden;
	border: 2px solid #1DB954;
}

/* How to use card */
.sp-card--howto {
	margin-top: 0;
}

.sp-steps {
	padding-left: 22px;
	margin: 0 0 18px;
}

.sp-steps li {
	margin-bottom: 10px;
	color: #444;
	font-size: 0.9rem;
	line-height: 1.6;
}

.sp-steps li code {
	background: #f4f4f4;
	padding: 1px 6px;
	border-radius: 4px;
}

.sp-tip {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	background: #f0faf4;
	border: 1px solid #a3d9b1;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 0.85rem;
	color: #2d6a4f;
}

.sp-tip .dashicons {
	color: #1DB954;
	margin-top: 1px;
	flex-shrink: 0;
}