/**
 * Ultimate Link Directory AI — Frontend Styles
 * Shared base styles across all layouts and shortcodes.
 */

/* =========================================================
   Box-sizing reset
   ========================================================= */
.ulda-directory *,
.ulda-directory *::before,
.ulda-directory *::after {
	box-sizing: border-box;
}

/* =========================================================
   Directory wrapper base
   ========================================================= */
.ulda-directory {
	font-family: var(--ulda-font, inherit);
	color: inherit;
	line-height: 1.5;
}

/* =========================================================
   Auth Forms
   ========================================================= */
.ulda-auth-wrap {
	max-width: 440px;
	margin: 32px auto;
	padding: 28px 32px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
}
.ulda-auth-wrap h2 { margin-top: 0; }
.ulda-auth-wrap label { display: block; margin-bottom: 4px; font-weight: 600; }
.ulda-auth-wrap input { width: 100%; margin-bottom: 14px; }
.ulda-auth-msg { padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 14px; }
.ulda-auth-msg.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.ulda-auth-msg.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* =========================================================
   Dashboard
   ========================================================= */
.ulda-dashboard-tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--ulda-accent, #6366f1);
	margin-bottom: 20px;
}
.ulda-dashboard-tabs .ulda-tab {
	padding: 8px 20px;
	cursor: pointer;
	border: 1px solid transparent;
	border-bottom: none;
	background: #f8f9fa;
	font-size: 14px;
}
.ulda-dashboard-tabs .ulda-tab.active {
	background: #fff;
	border-color: var(--ulda-accent, #6366f1) var(--ulda-accent, #6366f1) #fff;
	color: var(--ulda-accent, #6366f1);
	font-weight: 600;
	margin-bottom: -2px;
}

/* =========================================================
   Submit Form
   ========================================================= */
.ulda-submit-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.ulda-submit-form input,
.ulda-submit-form textarea,
.ulda-submit-form select { width: 100%; margin-bottom: 14px; }

/* =========================================================
   Payment Buttons
   ========================================================= */
.ulda-payment-options { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.ulda-payment-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}
.ulda-payment-btn-paypal { background: #009cde; color: #fff; }
.ulda-payment-btn-stripe { background: #6772e5; color: #fff; }

/* =========================================================
   Spotlight layout JS panel
   ========================================================= */
.ulda-layout-spotlight .ulda-spotlight-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
	align-items: start;
}
.ulda-spotlight-panel {
	position: sticky;
	top: 24px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}
.ulda-spotlight-detail { padding: 20px; }
.ulda-spotlight-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	border-radius: 8px;
	margin-bottom: 16px;
}
.ulda-spotlight-title { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.ulda-spotlight-title a { color: inherit; text-decoration: none; }
.ulda-spotlight-title a:hover { text-decoration: underline; }
.ulda-spotlight-subtitle { font-size: 13px; color: #6b7280; margin: 0 0 10px; }
.ulda-spotlight-desc { font-size: 14px; color: #374151; line-height: 1.6; margin-bottom: 16px; }
.ulda-spotlight-cta {
	display: inline-block;
	padding: 8px 20px;
	background: var(--ulda-accent, #6366f1);
	color: #fff;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}
.ulda-spotlight-list { display: flex; flex-direction: column; gap: 4px; }
.ulda-spotlight-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}
.ulda-spotlight-nav-item:hover { background: #f3f4f6; }
.ulda-spotlight-nav-item.ulda-spotlight-active {
	background: #eef2ff;
	border-color: var(--ulda-accent, #6366f1);
}
.ulda-spotlight-nav-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ulda-spotlight-nav-body { flex: 1; min-width: 0; }
.ulda-spotlight-nav-title { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ulda-spotlight-nav-sub { display: block; font-size: 12px; color: #6b7280; }
@media (max-width: 700px) {
	.ulda-layout-spotlight .ulda-spotlight-layout { grid-template-columns: 1fr; }
	.ulda-spotlight-panel { position: static; }
}

/* =========================================================
   Star rating (item cards, review block, website badge)
   ========================================================= */
.ulda-stars {
	color: #f5a623;
	letter-spacing: 1px;
	font-size: 14px;
}

.ulda-item-rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 2px 0 6px;
	font-size: 13px;
}

.ulda-item-rating-count {
	color: #888;
}

/* =========================================================
   Reviews block
   ========================================================= */
.ulda-reviews-block {
	margin-top: 1em;
}

.ulda-reviews-summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 1em;
}

.ulda-reviews-avg {
	font-size: 1.5em;
	font-weight: 700;
}

.ulda-reviews-summary .ulda-stars {
	font-size: 20px;
}

.ulda-reviews-count {
	color: #888;
}

.ulda-review {
	padding: 1em 0;
	border-bottom: 1px solid #eee;
}

.ulda-review-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.ulda-review-avatar {
	border-radius: 50%;
}

.ulda-review-author {
	font-weight: 600;
}

.ulda-review-date {
	color: #999;
	font-size: 0.85em;
	margin-left: auto;
}

.ulda-review-delete {
	background: none;
	border: none;
	color: #c0392b;
	cursor: pointer;
	font-size: 1em;
}

.ulda-review-title {
	margin: 4px 0;
}

.ulda-review-content {
	margin: 4px 0;
	white-space: pre-wrap;
}

.ulda-review-owner-reply {
	margin-top: 8px;
	padding: 8px 12px;
	background: #f6f6f6;
	border-left: 3px solid var(--ulda-accent, #6366f1);
	border-radius: 4px;
}

.ulda-review-owner-reply p {
	margin: 4px 0 0;
}

.ulda-review-reply-form textarea {
	margin-top: 6px;
}

.ulda-review-reply-msg {
	margin-left: 8px;
	font-size: 0.85em;
}

/* Write-a-review form */
.ulda-review-form-wrap {
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

.ulda-review-form input[type="text"],
.ulda-review-form textarea {
	margin: 8px 0;
}

.ulda-review-form-msg {
	margin-left: 8px;
	font-size: 0.9em;
}

/* Star picker: reversed radio row + sibling selector for the classic hover-fill effect */
.ulda-star-picker {
	display: inline-flex;
	flex-direction: row-reverse;
	font-size: 26px;
}

.ulda-star-picker input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ulda-star-picker label {
	color: #ddd;
	cursor: pointer;
	padding: 0 2px;
}

.ulda-star-picker input:checked ~ label,
.ulda-star-picker label:hover,
.ulda-star-picker label:hover ~ label {
	color: #f5a623;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 600px) {
	.ulda-dashboard-tabs { flex-wrap: wrap; }
	.ulda-auth-wrap { padding: 20px; margin: 16px; }
}
