/* LDA City Exchange — shared styling for frontend shortcodes & admin screens */

.lda-ce-wrap { max-width: 1100px; margin: 0 auto; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1f2937; }

.lda-panel { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.lda-panel-header h2 { margin: 0 0 4px; font-size: 22px; color: #0f4c81; }
.lda-panel-header .lda-sub { margin: 0 0 16px; color: #6b7280; font-size: 14px; }
.lda-header-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }

.lda-empty { padding: 24px; text-align: center; color: #6b7280; background: #f9fafb; border-radius: 8px; }

/* Buttons */
.lda-btn { display: inline-block; background: #0f4c81; color: #fff !important; border: none; padding: 9px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s ease; }
.lda-btn:hover { background: #0c3c67; color: #fff; }
.lda-btn-sm { padding: 6px 12px; font-size: 13px; }
.lda-btn-block { display: block; width: 100%; text-align: center; margin-top: 10px; }
.lda-btn-outline { background: #fff; color: #0f4c81 !important; border: 1px solid #0f4c81; }
.lda-btn-outline:hover { background: #eef4fa; }
.lda-btn-danger-outline { background: #fff; color: #b42318 !important; border: 1px solid #b42318; }
.lda-btn-danger-outline:hover { background: #fef3f2; }

/* Table (queue, offers comparison) */
.lda-table-scroll { overflow-x: auto; }
.lda-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lda-table th, .lda-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.lda-table thead th { background: #f3f6f9; color: #374151; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.lda-table-compact th, .lda-table-compact td { padding: 8px 10px; font-size: 13px; }

/* Status badges */
.lda-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lda-badge-demand { background: #eef2ff; color: #3730a3; }
.lda-badge-offer { background: #fef3c7; color: #92400e; }
.lda-badge-negotiation { background: #ffedd5; color: #9a3412; }
.lda-badge-locked { background: #fee2e2; color: #991b1b; }
.lda-badge-closed { background: #dcfce7; color: #166534; }
.lda-badge-cancelled { background: #f3f4f6; color: #6b7280; }

.lda-tag-muted { color: #6b7280; font-size: 13px; font-style: italic; }
.lda-tag-active { background: #ecfdf5; color: #065f46; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* Cards (seller/buyer dashboards) */
.lda-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-top: 16px; }
.lda-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lda-card-head h3 { margin: 0 0 4px; font-size: 16px; color: #111827; }
.lda-meta { color: #6b7280; font-size: 13px; }
.lda-subhead { margin: 16px 0 8px; font-weight: 600; font-size: 14px; color: #0f4c81; }
.lda-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.lda-offer-amount-block { margin: 14px 0; padding: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.lda-offer-label { font-size: 13px; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.lda-offer-amount { font-size: 22px; font-weight: 700; color: #0f4c81; }

.lda-locked-banner { margin-top: 14px; padding: 12px 14px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; }
.lda-closed-banner { margin-top: 14px; padding: 12px 14px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; }
.lda-cancelled-banner { margin-top: 14px; padding: 12px 14px; background: #f9fafb; border: 1px solid #e5e7eb; color: #6b7280; border-radius: 8px; }

/* Modal (create demand / make offer / counter offer) */
.lda-modal { display: none; position: fixed; z-index: 100000; inset: 0; background: rgba(15,23,42,0.55); align-items: center; justify-content: center; padding: 20px; }
.lda-modal.lda-modal-open { display: flex; }
.lda-modal-inner { background: #fff; border-radius: 10px; padding: 24px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; position: relative; }
.lda-modal-inner h3 { margin-top: 0; color: #0f4c81; }
.lda-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; line-height: 1; }
.lda-modal-inner label { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; color: #374151; }
.lda-modal-inner input[type="text"], .lda-modal-inner input[type="number"], .lda-modal-inner select, .lda-modal-inner textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; box-sizing: border-box;
}
.lda-form-msg { margin-top: 10px; font-size: 13px; }
.lda-form-msg.lda-msg-success { color: #166534; }
.lda-form-msg.lda-msg-error { color: #b42318; }

/* Admin screens */
.lda-admin-wrap .lda-admin-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.lda-stat-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 20px; min-width: 180px; }
.lda-stat-num { display: block; font-size: 26px; font-weight: 700; color: #0f4c81; }
.lda-stat-label { display: block; font-size: 13px; color: #6b7280; margin-top: 4px; }
.lda-admin-table { margin-top: 10px; }
.lda-admin-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.lda-status-open { background: #eef2ff; color: #3730a3; }
.lda-status-locked { background: #fee2e2; color: #991b1b; }
.lda-status-closed, .lda-status-active { background: #dcfce7; color: #166534; }
.lda-status-cancelled, .lda-status-rejected, .lda-status-superseded, .lda-status-closed_out { background: #f3f4f6; color: #6b7280; }
.lda-status-pending_finalization { background: #fef3c7; color: #92400e; }

@media (max-width: 700px) {
	.lda-table thead { display: none; }
	.lda-table, .lda-table tbody, .lda-table tr, .lda-table td { display: block; width: 100%; }
	.lda-table tr { border-bottom: 2px solid #e5e7eb; padding: 8px 0; }
	.lda-table td { border: none; padding: 4px 0; }
	.lda-table td::before { content: attr(data-label) ": "; font-weight: 600; color: #374151; }
}
