/* Prayer Engine - Modern Mobile Styles */

/* Modern CSS Reset */
html {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

*, *:before, *:after {
	box-sizing: inherit;
}

body {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, h7, p, form, ul, ol, li, blockquote {
	margin: 0;
	padding: 0;
}

a {
	text-decoration: none;
	transition: all 0.3s ease;
}

/* ---------- Header and Nav ---------- */

#header {
	min-height: 120px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h1#full-link a {
	display: block;
	width: 100%;
	text-align: center;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	padding: 10px 16px;
	border-radius: 8px;
	transition: all 0.3s ease;
}

h1#full-link a:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#header .logo {
	width: 100%;
	max-width: 280px;
	margin: 0 auto;
}

#header .logo a {
	display: block;
	width: 100%;
	height: 100px;
	text-indent: -9000px;
	background-size: contain !important;
	background-position: center !important;
	transition: opacity 0.3s ease;
}

#header .logo a:hover {
	opacity: 0.9;
}

/* ---------- Main Listing of Prayer Requests ---------- */

#main-page {
	width: 100%;
	min-height: 100vh;
	position: relative;
	padding: 0;
	animation: fadeIn 0.3s ease-out;
}

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

h3.title-divider {
	width: 100%;
	text-align: center;
	padding: 16px 20px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.3px;
	margin: 0;
}

/* Submit Button */
a.submit-your-request {
	display: block;
	width: calc(100% - 32px);
	max-width: 340px;
	margin: 20px auto;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 16px 24px;
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
}

a.submit-your-request:active {
	transform: scale(0.98);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Prayer Request List - Card Style */
#main-page .content ul {
	padding: 0;
	margin: 0;
}

#main-page .content ul li {
	list-style-type: none;
	margin: 12px 16px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

#main-page .content ul li:active {
	transform: scale(0.98);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

#main-page .content ul li a.ajax-link {
	display: block;
	width: 100%;
	padding: 16px;
	text-decoration: none;
	position: relative;
}

#main-page .content ul li a.ajax-link::after {
	content: '›';
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 28px;
	font-weight: 300;
	opacity: 0.4;
}

#main-page .content ul li.noborder a.ajax-link {
	padding: 16px;
}

#main-page .content ul li a.ajax-link.loading::after {
	content: '';
	width: 20px;
	height: 20px;
	border: 2px solid rgba(0, 0, 0, 0.1);
	border-top-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to { transform: translateY(-50%) rotate(360deg); }
}

#main-page .content ul li a h3,
#main-page .content ul li h3 {
	padding: 0 40px 8px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

#main-page .content ul li a p,
#main-page .content ul li p {
	padding: 0 40px 0 0;
	font-size: 15px;
	line-height: 1.5;
	opacity: 0.85;
}

/* ---------- Selected Item Area ---------- */

#selected-item {
	z-index: 100;
	width: 100%;
	min-height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	overflow-y: auto;
	animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Prayer Detail View */
.prayer-header {
	padding: 20px 16px;
	text-align: center;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.prayer-header h2 {
	font-size: 24px;
	font-weight: 700;
	padding: 0 10px 8px;
	line-height: 1.3;
}

.prayer-header h3 {
	font-size: 14px;
	font-weight: 500;
	padding: 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.7;
}

.prayertext {
	padding: 20px;
}

.prayertext p {
	font-size: 17px;
	line-height: 1.6;
	margin: 0 0 16px 0;
}

.prayertext h3,
.prayertext h4 {
	font-size: 20px;
	line-height: 1.4;
	margin: 20px 0 12px 0;
	font-weight: 700;
}

.prayertext h5 {
	font-size: 18px;
	line-height: 1.4;
	margin: 16px 0 10px 0;
	font-weight: 600;
}

.prayertext ul,
.prayertext ol {
	margin: 0 0 16px 0;
	padding-left: 20px;
}

.prayertext ul li,
.prayertext ol li {
	margin: 0 0 8px 0;
	font-size: 16px;
	line-height: 1.6;
}

/* Back Button */
#selected-item .sub-nav {
	width: 100%;
	padding: 12px 16px;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#selected-item a.back-link {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 8px;
	transition: all 0.3s ease;
}

#selected-item a.back-link::before {
	content: '‹';
	font-size: 24px;
	margin-right: 4px;
	font-weight: 300;
}

#selected-item a.back-link:active {
	transform: scale(0.95);
}

/* Action Buttons */
a.prayer-link,
p.thanks-for-praying {
	display: block;
	width: calc(100% - 64px);
	max-width: 300px;
	margin: 20px auto;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 16px 24px;
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
}

a.prayer-link:active {
	transform: scale(0.98);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

p.thanks-for-praying {
	opacity: 0.8;
	cursor: default;
}

p.prayed-for,
p.prayed-for-after {
	text-align: center;
	margin: 12px 0;
	font-size: 16px;
	font-weight: 600;
}

/* Prayer Submit Form */
p.form-thanks {
	margin: 0;
	padding: 20px;
	font-size: 16px;
	line-height: 1.6;
	border-radius: 12px;
	margin: 16px;
}

.prayer-submit-table {
	padding: 20px;
}

.prayer-submit-table label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 8px;
	color: #2d3748;
}

.prayer-submit-table label.error {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: -6px 0 12px 0;
	color: #7e192b;
}

.prayer-submit-table td.radioanswer {
	font-size: 16px;
	font-weight: 400;
	padding: 8px 24px 12px 4px;
}

.prayer-submit-table input,
.prayer-submit-table select {
	font-size: 16px;
	width: 100%;
	margin: 0 0 20px 0;
	padding: 14px 16px;
	border-radius: 8px;
	border: 2px solid #e2e8f0;
	transition: all 0.2s ease;
}

.prayer-submit-table input:focus,
.prayer-submit-table select:focus {
	outline: none;
	border-color: #94bfc6;
	box-shadow: 0 0 0 3px rgba(148, 191, 198, 0.15);
}

.prayer-submit-table input.radio {
	width: 24px;
	height: 24px;
	margin: 8px 12px 16px 0;
	accent-color: #7e192b;
}

.prayer-submit-table textarea {
	width: 100%;
	font-size: 16px;
	margin: 0 0 20px 0;
	padding: 14px 16px;
	min-height: 160px;
	border-radius: 8px;
	border: 2px solid #e2e8f0;
	resize: vertical;
	line-height: 1.6;
	transition: all 0.2s ease;
}

.prayer-submit-table textarea:focus {
	outline: none;
	border-color: #94bfc6;
	box-shadow: 0 0 0 3px rgba(148, 191, 198, 0.15);
}

.prayer-submit-table textarea#prayer_tweet {
	min-height: 100px;
}

.twitter-counter {
	font-size: 14px;
	font-weight: 500;
	margin-top: -12px;
	margin-bottom: 16px;
}

.twitter-counter #counter {
	font-weight: 700;
}

#twitter-area {
	display: none;
	padding: 16px;
	margin: 16px 0;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

a.prayer-form-submit {
	display: block;
	width: calc(100% - 40px);
	max-width: 300px;
	margin: 20px auto;
	font-size: 17px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 16px 24px;
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
}

a.prayer-form-submit:active {
	transform: scale(0.98);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

a.prayer-form-submit.working {
	opacity: 0.7;
	cursor: wait;
}

/* More Prayers Link */
h3.more-prayers-link {
	margin: 20px 16px;
}

h3.more-prayers-link a {
	display: block;
	width: 100%;
	padding: 16px 24px;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

h3.more-prayers-link a:active {
	transform: scale(0.98);
}

h3.more-prayers-link.loading a {
	position: relative;
	color: transparent !important;
}

h3.more-prayers-link.loading a::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -12px;
	margin-top: -12px;
	width: 24px;
	height: 24px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}
