@import "variables.css";
@import "nav.css";
@import "header.css";
@import "main.css";
@import "footer.css";

/*
 * PressLine Marketplace - Minimal Black & White Design
 */

/* Reset */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	line-height: var(--leading-normal);
	color: var(--text-secondary);
	background: var(--bg-primary);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-primary);
	font-weight: var(--font-bold);
	line-height: var(--leading-tight);
}

h1 {
	font-size: var(--text-4xl);
}
h2 {
	font-size: var(--text-2xl);
}
h3 {
	font-size: var(--text-xl);
}
h4 {
	font-size: var(--text-lg);
}

p {
	color: var(--text-secondary);
	line-height: var(--leading-relaxed);
}

/* Utility */
.row {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.column {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-3);
}

.hide {
	display: none !important;
}
.show {
	display: flex !important;
}

/* Images */
img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

img.circle {
	border-radius: var(--radius-full);
}

/* Links */
a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover {
	color: var(--text-primary);
}

/* Form Elements */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
	width: 100%;
	padding: var(--space-3) var(--space-4);
	font-size: var(--text-sm);
	font-family: var(--font-sans);
	color: var(--text-primary);
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color var(--transition-fast);
	outline: none;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
	color: var(--text-muted);
}

select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23737373' d='m12 15l-5-5h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right var(--space-3) center;
	padding-right: var(--space-8);
}

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

label {
	display: block;
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--text-primary);
	margin-bottom: var(--space-2);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	font-family: var(--font-sans);
	color: var(--text-primary);
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: all var(--transition-fast);
	text-decoration: none;
	white-space: nowrap;
}

.btn:hover {
	border-color: var(--text-primary);
	color: var(--text-primary);
}

.btn-primary {
	color: var(--text-inverse);
	background: var(--text-primary);
	border-color: var(--text-primary);
}

.btn-primary:hover {
	opacity: 0.85;
	color: var(--text-inverse);
}

.btn-accent {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}

.btn-accent:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #fff;
}

.btn-ghost {
	background: transparent;
	border-color: transparent;
}

.btn-ghost:hover {
	background: var(--bg-hover);
	border-color: transparent;
}

.btn-sm {
	padding: var(--space-1) var(--space-3);
	font-size: var(--text-xs);
}

.btn-lg {
	padding: var(--space-3) var(--space-6);
	font-size: var(--text-base);
}

/* Tags - Pill style with border */
.tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.tags a,
.tag {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-1) var(--space-3);
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	transition: all var(--transition-fast);
	text-decoration: none;
}

.tags a:hover,
.tag:hover {
	border-color: var(--text-primary);
	color: var(--text-primary);
}

.tag.active,
.tags a.active {
	background: var(--text-primary);
	border-color: var(--text-primary);
	color: var(--text-inverse);
}

/* Filter tags with icons */
.filter-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.filter-tag {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--text-primary);
	background: var(--bg-primary);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.filter-tag:hover {
	border-color: var(--text-primary);
}

.filter-tag.active {
	background: var(--text-primary);
	border-color: var(--text-primary);
	color: var(--text-inverse);
}

.filter-tag .icon {
	width: 16px;
	height: 16px;
	border-radius: var(--radius-full);
	background: var(--bg-tertiary);
}

.filter-tag.active .icon {
	background: var(--text-inverse);
}

/* Cards */
.card {
	background: var(--bg-secondary);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition);
	border: 1px solid var(--border);
}

.card:hover {
	border-color: var(--border-strong);
}

.card-body {
	padding: var(--space-5);
}

/* Badges */
.badge {
	display: inline-flex;
	align-items: center;
	padding: var(--space-1) var(--space-2);
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	border-radius: var(--radius-sm);
}

.badge-primary {
	color: var(--accent);
	background: var(--accent-light);
}

.badge-success {
	color: var(--success);
	background: var(--success-light);
}

.badge-danger {
	color: var(--danger);
	background: var(--danger-light);
}

/* Avatar */
.avatar {
	width: 32px;
	height: 32px;
	border-radius: var(--radius-full);
	object-fit: cover;
	background: var(--bg-tertiary);
}

.avatar-sm {
	width: 24px;
	height: 24px;
}
.avatar-lg {
	width: 40px;
	height: 40px;
}
.avatar-xl {
	width: 48px;
	height: 48px;
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: var(--border-strong);
	border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-muted);
}

/* Toast */
.toast {
	position: fixed;
	bottom: var(--space-6);
	right: var(--space-6);
	padding: var(--space-3) var(--space-5);
	background: var(--text-primary);
	color: var(--text-inverse);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	z-index: 9999;
	animation: slideUp 0.3s var(--ease);
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Spinner */
.spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-top-color: var(--text-primary);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

/* Empty State */
.empty-state {
	text-align: center;
	padding: var(--space-16) var(--space-6);
}

.empty-state .icon {
	font-size: 40px;
	color: var(--text-disabled);
	margin-bottom: var(--space-4);
}

.empty-state h3 {
	font-size: var(--text-lg);
	margin-bottom: var(--space-2);
}

.empty-state p {
	color: var(--text-muted);
}

/* Table */
table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: var(--space-3) var(--space-4);
	text-align: left;
	border-bottom: 1px solid var(--border);
}

th {
	font-weight: var(--font-semibold);
	font-size: var(--text-xs);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
}

tbody tr:hover {
	background: var(--bg-hover);
}

/* Divider */
.divider {
	height: 1px;
	background: var(--border);
	margin: var(--space-6) 0;
}

/* Selection */
::selection {
	background: var(--accent-0t2);
}

/* Focus */
:focus-visible {
	outline: 2px solid var(--text-primary);
	outline-offset: 2px;
}

/* Container */
.container {
	width: 100%;
	max-width: var(--container-xl);
	margin: 0 auto;
	padding: 0 var(--space-6);
}

/* Dropdown / Select styled */
.select-wrapper {
	position: relative;
	display: inline-block;
}

.select-wrapper select {
	padding-right: var(--space-10);
	min-width: 160px;
}

@media (max-width: 768px) {
	.container {
		padding: 0 var(--space-4);
	}
}
