/* SPCA Adoption Manager — Public Styles */
/* All selectors prefixed with .sam- to avoid Divi conflicts */

/* ---- Staff Login page ---- */
/* Login page: theme is bypassed entirely via template_redirect — no Divi on this page */
* { box-sizing: border-box; }

body.sam-login-page {
	margin: 0;
	padding: 0;
	background: #f0f4f8;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	color: #1e1e1e;
}

.sam-login-wrap {
	width: 100%;
	max-width: 440px;
	padding: 24px 16px;
}

.sam-login-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,.10);
	padding: 40px 36px 32px;
}

.sam-login-logo { text-align: center; margin-bottom: 20px; }
.sam-login-logo-img { max-height: 80px; width: auto; }
.sam-login-logo-text {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1e3a5f;
}

.sam-login-title {
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e1e1e;
	margin: 0 0 6px;
}
.sam-login-subtitle {
	text-align: center;
	color: #6b7280;
	font-size: 0.875rem;
	margin: 0 0 28px;
}

.sam-login-error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	color: #991b1b;
	font-size: 0.875rem;
	padding: 11px 14px;
	margin-bottom: 20px;
}

.sam-login-field { margin-bottom: 18px; }
.sam-login-field label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.sam-login-input {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid #d1d5db;
	border-radius: 7px;
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
	color: #1e1e1e;
	background: #fff;
}
.sam-login-input:focus {
	border-color: #1e3a5f;
	box-shadow: 0 0 0 3px rgba(30,58,95,.12);
	outline: none;
}
.sam-input-error { border-color: #f87171; }

.sam-password-wrap { position: relative; }
.sam-password-wrap .sam-login-input { padding-right: 42px; }
.sam-toggle-pw {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #9ca3af;
	padding: 4px;
	display: flex;
	align-items: center;
}
.sam-toggle-pw:hover { color: #374151; }

.sam-login-remember {
	margin-bottom: 22px;
	font-size: 0.875rem;
	color: #374151;
}
.sam-login-remember input { margin-right: 6px; }

.sam-login-btn {
	display: block;
	width: 100%;
	padding: 12px;
	background: #1e3a5f;
	color: #fff;
	border: none;
	border-radius: 7px;
	font-size: 1rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s;
}
.sam-login-btn:hover { background: #152d4d; }

.sam-login-forgot {
	text-align: center;
	font-size: 0.825rem;
	margin-top: 16px;
	margin-bottom: 0;
}
.sam-login-forgot a { color: #6b7280; text-decoration: none; }
.sam-login-forgot a:hover { color: #1e3a5f; text-decoration: underline; }

.sam-login-back {
	text-align: center;
	margin-top: 20px;
	font-size: 0.825rem;
}
.sam-login-back a { color: #9ca3af; text-decoration: none; }
.sam-login-back a:hover { color: #374151; }

/* ---- Listing ---- */
.sam-listing { font-family: inherit; }

.sam-species-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
}
.sam-species-tab {
	display: inline-block;
	padding: 7px 16px;
	border-radius: 20px;
	border: 1px solid #d1d5db;
	text-decoration: none;
	color: #374151;
	font-size: 0.9rem;
	transition: background .15s, border-color .15s;
}
.sam-species-tab:hover, .sam-tab-active {
	background: #1e3a5f;
	color: #fff;
	border-color: #1e3a5f;
	text-decoration: none;
}

.sam-animal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.sam-animal-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s;
}
.sam-animal-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.1); }

.sam-animal-img-wrap { display: block; overflow: hidden; height: 200px; }
.sam-animal-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sam-no-photo {
	height: 200px;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 0.85rem;
}

.sam-animal-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.sam-animal-name { margin: 0 0 6px; font-size: 1.1rem; }
.sam-animal-name a { text-decoration: none; color: #1e1e1e; }
.sam-animal-meta { font-size: 0.85rem; color: #6b7280; margin: 0 0 10px; }

.sam-animal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sam-badge {
	font-size: 0.72rem;
	padding: 2px 8px;
	border-radius: 10px;
	background: #d1fae5;
	color: #065f46;
	font-weight: 600;
}

.sam-adoption-fee { font-size: 0.85rem; font-weight: 600; color: #374151; margin: 0 0 14px; }

/* Buttons */
.sam-btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	border: none;
	transition: background .15s, opacity .15s;
	text-align: center;
}
.sam-btn-primary { background: #1e3a5f; color: #fff; }
.sam-btn-primary:hover { background: #152d4d; color: #fff; text-decoration: none; }
.sam-btn-large { padding: 13px 28px; font-size: 1rem; }
.sam-btn { margin-top: auto; }

.sam-no-animals { padding: 40px; text-align: center; color: #6b7280; }

/* ---- Enquiry form ---- */
.sam-enquiry-wrap { max-width: 680px; }
.sam-enquiry-wrap h2 { margin-top: 0; }

.sam-enquiry-animal-header {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 24px;
}
.sam-enquiry-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sam-enquiry-animal-header h2 { margin: 0 0 4px; font-size: 1.2rem; }
.sam-enquiry-animal-header p  { margin: 0; color: #6b7280; font-size: 0.9rem; }

.sam-form { }
.sam-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .sam-form-row { grid-template-columns: 1fr; } }

.sam-form-group { margin-bottom: 16px; }
.sam-form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.sam-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.95rem;
	box-sizing: border-box;
	font-family: inherit;
	transition: border-color .15s;
}
.sam-input:focus { border-color: #1e3a5f; outline: none; box-shadow: 0 0 0 2px rgba(30,58,95,.15); }

.sam-required { color: #dc2626; }
.sam-form-note { font-size: 0.82rem; color: #9ca3af; margin-bottom: 20px; }

/* Success / Error boxes */
.sam-success-box {
	background: #d1fae5;
	border: 1px solid #6ee7b7;
	border-radius: 8px;
	padding: 20px 24px;
}
.sam-success-box h2 { margin-top: 0; color: #065f46; }
.sam-error-box {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	padding: 14px 18px;
	color: #991b1b;
	margin-bottom: 18px;
}
