/**
 * Reusable Components for SubmitMyShit
 * Cards, tables, testimonials, and other UI components
 * Location: /assets/css/components.css
 */

/* ===================================================================
   API CARDS & STATES
   =================================================================== */

.api-card {
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.api-card:hover {
	border-color: #e5e7eb;
	transform: translateY(-2px);
}

.api-card.featured {
	border-color: #10b981;
	box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* ===================================================================
   PROBLEM/SOLUTION CARDS
   =================================================================== */

.problem-card {
	background: rgba(239, 68, 68, 0.1);
	border: 2px solid rgba(239, 68, 68, 0.2);
	border-radius: 1rem;
	padding: 1.5rem;
	margin: 1rem 0;
}

.solution-card {
	background: rgba(16, 185, 129, 0.1);
	border: 2px solid rgba(16, 185, 129, 0.2);
	border-radius: 1rem;
	padding: 1.5rem;
	margin: 1rem 0;
}

/* ===================================================================
   COMPARISON TABLES
   =================================================================== */

.comparison-table {
	overflow-x: auto;
}

.comparison-table table {
	width: 100%;
	border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
}

.comparison-table th {
	background: #f9fafb;
	font-weight: 600;
}

.check-mark {
	color: #10b981;
	font-size: 1.25rem;
}

.x-mark {
	color: #ef4444;
	font-size: 1.25rem;
}

/* ===================================================================
   TESTIMONIALS
   =================================================================== */

.testimonial-card {
	background: white;
	border-radius: 1rem;
	padding: 2rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin: 1rem;
}

/* ===================================================================
   NOTIFICATION SYSTEM
   =================================================================== */

.notification {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 9999;
	max-width: 24rem;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	transform: translateX(100%);
}

.notification.show {
	transform: translateX(0);
}

.notification.success {
	background: #10b981;
	color: white;
}

.notification.error {
	background: #ef4444;
	color: white;
}

.notification.warning {
	background: #f59e0b;
	color: white;
}

.notification.info {
	background: #3b82f6;
	color: white;
}

/* ===================================================================
   PROGRESS BARS
   =================================================================== */

.progress-bar {
	width: 100%;
	background-color: #e5e7eb;
	border-radius: 0.5rem;
	overflow: hidden;
}

.progress-fill {
	height: 0.5rem;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	transition: width 0.3s ease;
}

/* ===================================================================
   STAT CARDS
   =================================================================== */

.stat-card {
	background: white;
	border-radius: 1rem;
	padding: 1.5rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

/* ===================================================================
   LOADING STATES
   =================================================================== */

.skeleton {
	background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
}

@keyframes loading {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.spinner {
	width: 20px;
	height: 20px;
	border: 2px solid #f3f4f6;
	border-top-color: #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

/* ===================================================================
   BADGES & TAGS
   =================================================================== */

.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
}

.badge.success {
	background: #dcfce7;
	color: #166534;
}

.badge.error {
	background: #fee2e2;
	color: #991b1b;
}

.badge.warning {
	background: #fef3c7;
	color: #92400e;
}

.badge.info {
	background: #dbeafe;
	color: #1e40af;
}

/* ===================================================================
   FORM COMPONENTS
   =================================================================== */

.form-group {
	margin-bottom: 1rem;
}

.form-label {
	display: block;
	font-weight: 600;
	color: #374151;
	margin-bottom: 0.5rem;
}

.form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	font-size: 1rem;
	transition: all 0.2s ease;
}

.form-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
	resize: vertical;
	min-height: 100px;
}

/* ===================================================================
   ADMIN COMPONENTS
   =================================================================== */

.admin-card {
	background: white;
	border-radius: 1rem;
	padding: 1.5rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.admin-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.admin-card.cursor-pointer:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===================================================================
   SIDEBAR COMPONENTS
   =================================================================== */

.sidebar-link {
	transition: all 0.2s ease;
	border-left: 4px solid transparent;
}

.sidebar-link:hover {
	background: rgba(59, 130, 246, 0.1);
	border-left: 4px solid #3b82f6;
}

.sidebar-link.active {
	background: rgba(59, 130, 246, 0.1);
	border-left: 4px solid #3b82f6;
}

.sidebar-link:hover .fas {
	transform: scale(1.1);
	transition: transform 0.2s ease;
}

/* ===================================================================
   RESPONSIVE COMPONENTS
   =================================================================== */

@media (max-width: 640px) {
	.stat-card,
	.admin-card,
	.testimonial-card {
		padding: 1rem;
	}
	
	.notification {
		left: 1rem;
		right: 1rem;
		max-width: none;
	}
	
	.comparison-table {
		font-size: 0.875rem;
	}
	
	.comparison-table th,
	.comparison-table td {
		padding: 0.75rem 0.5rem;
	}
}

/* ===================================================================
   DARK MODE SUPPORT (if needed)
   =================================================================== */

@media (prefers-color-scheme: dark) {
	.stat-card,
	.admin-card,
	.testimonial-card {
		background: #1f2937;
		color: white;
	}
	
	.form-input {
		background: #374151;
		border-color: #4b5563;
		color: white;
	}
	
	.form-input:focus {
		border-color: #667eea;
		background: #374151;
	}
	
	.comparison-table th {
		background: #374151;
		color: white;
	}
}