/**
 * Langskegg Project Portal
 * Clean, functional styling that complements GeneratePress.
 */

/* ============================================
   Status Badges (shared)
   ============================================ */

.lk-status-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	white-space: nowrap;
}
.lk-status--active    { background: #d4edda; color: #155724; }
.lk-status--review    { background: #fff3cd; color: #856404; }
.lk-status--completed { background: #cce5ff; color: #004085; }
.lk-status--archived  { background: #e2e3e5; color: #383d41; }

/* ============================================
   Project List (My Account tab)
   ============================================ */

.lk-projects-list table { width: 100%; }
.lk-projects-list td a:not(.button) {
	color: #222;
	font-weight: 500;
}
.lk-projects-list td a:not(.button):hover { text-decoration: underline; }

/* ============================================
   Single Project Layout
   ============================================ */

.lk-project { max-width: 960px; }

.lk-project__back {
	display: inline-block;
	margin-bottom: 12px;
	font-size: 13px;
	color: #666;
	text-decoration: none;
}
.lk-project__back:hover { color: #222; }

.lk-project__title-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.lk-project__title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
}
.lk-project__desc {
	color: #555;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 10px;
}

/* Sections */
.lk-section {
	margin-top: 30px;
	padding: 24px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fff;
}
.lk-section h3 {
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid #eee;
	font-size: 16px;
	font-weight: 600;
}
.lk-hint {
	font-size: 13px;
	color: #888;
	margin-bottom: 14px;
}
.lk-empty {
	text-align: center;
	padding: 28px 16px;
	color: #999;
	background: #fafafa;
	border-radius: 4px;
	font-size: 14px;
}

/* ============================================
   File Gallery
   ============================================ */

.lk-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

.lk-gallery__item {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.lk-gallery__item:hover {
	border-color: #aaa;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.lk-gallery__thumb {
	aspect-ratio: 1;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.lk-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s;
}
.lk-gallery__item:hover .lk-gallery__thumb img { transform: scale(1.04); }

.lk-gallery__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: 700;
	font-size: 13px;
	color: #666;
	text-decoration: none;
	background: linear-gradient(135deg, #f8f8f8, #eee);
}

.lk-gallery__info {
	padding: 10px;
}
.lk-gallery__name {
	font-size: 12px;
	font-weight: 600;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-bottom: 4px;
}
.lk-gallery__meta {
	font-size: 10px;
	color: #999;
	margin-bottom: 6px;
}
.lk-gallery__dl {
	font-size: 11px;
	color: #555;
	text-decoration: none;
	border: 1px solid #ddd;
	padding: 2px 8px;
	border-radius: 3px;
	transition: all 0.15s;
}
.lk-gallery__dl:hover {
	border-color: #222;
	color: #222;
}

/* ============================================
   Upload Dropzone
   ============================================ */

.lk-dropzone {
	border: 2px dashed #ccc;
	border-radius: 4px;
	padding: 36px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
	background: #fafafa;
}
.lk-dropzone:hover,
.lk-dropzone.lk-dragover {
	border-color: #555;
	background: #f0f0f0;
}
.lk-dropzone .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #aaa;
	margin-bottom: 8px;
}
.lk-dropzone p {
	margin: 0;
	font-size: 14px;
	color: #666;
}

.lk-upload-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}
.lk-progress-bar {
	flex: 1;
	height: 16px;
	background: #eee;
	border-radius: 8px;
	overflow: hidden;
}
.lk-progress-fill {
	height: 100%;
	width: 0;
	background: #333;
	transition: width 0.2s;
	border-radius: 8px;
}
.lk-progress-pct {
	font-size: 12px;
	color: #666;
	min-width: 36px;
	text-align: right;
}

#lk-upload-status { margin-top: 12px; font-size: 13px; }
.lk-msg-ok  { color: #155724; background: #d4edda; padding: 8px 12px; border-radius: 3px; margin-bottom: 6px; }
.lk-msg-err { color: #721c24; background: #f8d7da; padding: 8px 12px; border-radius: 3px; margin-bottom: 6px; }

/* ============================================
   Message Thread
   ============================================ */

.lk-messages {
	max-height: 500px;
	overflow-y: auto;
	margin-bottom: 20px;
	padding-right: 4px;
}

.lk-message {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	align-items: flex-start;
}
.lk-message--admin  { flex-direction: row-reverse; }

.lk-message__avatar img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
}

.lk-message__bubble {
	max-width: 75%;
}
.lk-message__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 4px;
	font-size: 12px;
}
.lk-message--admin .lk-message__meta { flex-direction: row-reverse; }

.lk-message__meta strong { font-size: 13px; color: #222; }
.lk-message__meta time   { font-size: 11px; color: #aaa; }

.lk-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	background: #333;
	color: #fff;
}

.lk-message__body {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.55;
	word-wrap: break-word;
}
.lk-message--customer .lk-message__body { background: #f0f0f0; color: #333; }
.lk-message--admin    .lk-message__body { background: #222;    color: #f0f0f0; }

/* Message Form */
.lk-msg-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-top: 1px solid #eee;
	padding-top: 16px;
}
#lk-msg-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 13px;
	resize: vertical;
	min-height: 72px;
}
#lk-msg-input:focus {
	outline: none;
	border-color: #333;
	box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}
.lk-msg-form button {
	align-self: flex-start;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
	.lk-gallery {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 12px;
	}
	.lk-project__title { font-size: 20px; }
	.lk-message__bubble { max-width: 85%; }
	.lk-section { padding: 18px; }
}

@media (max-width: 480px) {
	.lk-gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.lk-project__title { font-size: 18px; }
	.lk-message__bubble { max-width: 90%; }
	.lk-section { padding: 14px; }
	.lk-dropzone { padding: 24px 12px; }
}
