/* Common Missal Styling for Service Builder and Generated Services */

/* ============================================
   COLOR PALETTE - Liturgical Amber/Gold
   ============================================ */
:root {
	--amber-900: #78350f;  /* Dark amber/bronze - headers, primary */
	--amber-800: #92400e;  /* Deep amber - header backgrounds */
	--amber-700: #b45309;  /* Rich amber - text accents, icons */
	--amber-600: #d97706;  /* Warm amber - border accents */
	--amber-200: #fde68a;  /* Light amber - subtle borders */
	--amber-100: #fef3c7;  /* Pale amber - very light accents */
	--parchment: #fefdfb;  /* Main background */
	--parchment-dark: #f5f3ed; /* Page background */
	--text-primary: #1a1a1a;   /* Body text */
	--rubric-red: #991b1b;     /* Red for liturgical rubrics */
}

/* ============================================
   TYPOGRAPHY & BASE COLORS
   ============================================ */
body {
	background: var(--parchment-dark);
	font-family: 'Garamond', 'Georgia', serif;
	color: var(--text-primary);
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Garamond', 'Georgia', serif;
	font-weight: normal;
	color: #1a1a1a;
}

h1 {
	font-size: 2.2rem;
	text-align: center;
	margin-bottom: 15px;
	letter-spacing: 3px;
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.3;
	color: #1a1a1a;
}

h2 {
	font-size: 1.5rem;
	text-align: center;
	margin-bottom: 30px;
	padding-bottom: 15px;
	border-bottom: 2px solid var(--amber-600);
	font-weight: normal;
	line-height: 1.4;
	color: #1a1a1a;
}

/* ============================================
   CONTAINER & PAGE LAYOUT
   ============================================ */
.container {
	max-width: 900px;
	background: var(--parchment);
	padding: 50px 60px;
	box-shadow: 0 2px 20px rgba(120, 53, 15, 0.12);
	border: 1px solid var(--amber-200);
	margin-top: 30px;
	margin-bottom: 30px;
}

@media (min-width: 1200px) {
	.container {
		max-width: 850px;
		padding: 60px 80px;
	}
}

/* ============================================
   SECTION STYLING (Form & Service)
   ============================================ */
.form-section,
.card-body {
	margin-bottom: 40px;
	padding: 30px;
	background: var(--parchment);
	border: 2px solid var(--amber-600);
	border-left: 5px solid var(--amber-700);
	position: relative;
}

.form-section h4,
.card-title {
	font-family: 'Garamond', 'Georgia', serif;
	font-weight: bold;
	font-size: 1.2rem;
	color: #1a1a1a;
	margin-bottom: 25px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	border-bottom: 1px solid var(--amber-200);
	padding-bottom: 12px;
}

.card-text {
	font-family: 'Garamond', 'Georgia', serif;
	font-size: 1.15rem;
	line-height: 1.9;
	color: var(--text-primary);
}

.card-text p {
	margin-bottom: 1.2rem;
}

/* ============================================
   SERVICE OUTPUT LAYOUT
   ============================================ */
.card-body-centered {
	margin: 0 auto;
	max-width: 100%;
}

@media (min-width: 992px) {
	.card-body-centered {
		max-width: 85%;
	}
}

/* ============================================
   RUBRICS (Red Text for Instructions)
   ============================================ */
.rubric,
em{
	color: var(--rubric-red);
	font-style: italic;
	font-size: 1.05rem;
}

strong {
	color: #1a1a1a;
	font-weight: bold;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control {
	border: 1px solid var(--amber-600);
	border-radius: 0;
	background: var(--parchment);
	font-family: 'Garamond', 'Georgia', serif;
	color: var(--text-primary);
	font-size: 1.05rem;
}

.form-control:focus {
	border-color: var(--amber-700);
	box-shadow: 0 0 0 0.2rem rgba(217, 119, 6, 0.15);
	background: #fff;
}

label {
	font-family: 'Garamond', 'Georgia', serif;
	font-weight: bold;
	font-size: 1.05rem;
	margin-bottom: 10px;
}

/* ============================================
   SELECT2 CUSTOMIZATION
   ============================================ */
.select2-container--default .select2-selection--single {
	border: 1px solid var(--amber-600);
	border-radius: 0;
	background: var(--parchment);
	height: auto;
	padding: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	font-family: 'Garamond', 'Georgia', serif;
	color: var(--text-primary);
	padding-left: 10px;
	font-size: 1.05rem;
}

.select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--amber-700);
}

.select2-dropdown {
	border: 1px solid var(--amber-600);
	border-radius: 0;
	background: var(--parchment);
}

.select2-results__option {
	font-family: 'Garamond', 'Georgia', serif;
}

.select2-results__option--highlighted {
	background: var(--amber-900) !important;
}

/* ============================================
   DAY OPTION CARDS
   ============================================ */
.day-option {
	padding: 20px 25px;
	margin: 15px 0;
	border: 2px solid var(--amber-600);
	background: var(--parchment);
	cursor: pointer;
	transition: all 0.3s;
	position: relative;
}

.day-option::before {
	position: absolute;
	left: -18px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.6rem;
	opacity: 0;
	transition: opacity 0.3s;
}

.day-option:hover {
	background: var(--amber-100);
	border-color: var(--amber-700);
}

.day-option.selected {
	background: var(--amber-100);
	border-color: var(--amber-800);
	border-left-width: 5px;
	border-left-color: var(--amber-700);
}

.day-option.selected::before {
	opacity: 1;
}

.day-option input[type="radio"] {
	margin-right: 15px;
	accent-color: var(--amber-700);
}

.day-option strong {
	font-size: 1.1rem;
	letter-spacing: 0.5px;
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */
.form-check {
	padding: 18px;
	background: var(--amber-100);
	border-left: 3px solid var(--amber-700);
	margin-bottom: 20px;
}

.form-check-input {
	accent-color: var(--amber-700);
}

.form-check-label {
	font-family: 'Garamond', 'Georgia', serif;
	color: var(--text-primary);
	font-size: 1.05rem;
	margin-left: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-success,
.btn-primary {
	background: var(--amber-800);
	border: none;
	border-radius: 0;
	font-family: 'Garamond', 'Georgia', serif;
	font-size: 1.2rem;
	font-weight: bold;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 15px 30px;
	transition: all 0.3s;
	color: var(--amber-100);
}

.btn-success:hover,
.btn-primary:hover {
	background: var(--amber-900);
	box-shadow: 0 4px 12px rgba(120, 53, 15, 0.3);
	color: var(--parchment);
}

/* Copy button specific styling */
.copy-btn {
	background: var(--amber-800);
	color: var(--parchment);
	border: none;
	padding: 8px 20px;
	font-family: 'Garamond', 'Georgia', serif;
	cursor: pointer;
	margin-left: 10px;
	transition: all 0.3s;
	font-size: 1rem;
	letter-spacing: 1px;
}

.copy-btn:hover {
	background: var(--amber-900);
}

.copy-btn.copied {
	background: #15803d;
}

/* ============================================
   SHARE SECTION
   ============================================ */
.share-section {
	background: var(--amber-100);
	padding: 15px 20px;
	margin-bottom: 30px;
	border-left: 3px solid var(--amber-700);
	text-align: center;
	border: 1px solid var(--amber-200);
}

.share-url {
	font-family: 'Courier New', monospace;
	background: var(--parchment);
	padding: 10px;
	border: 1px solid var(--amber-200);
	display: inline-block;
	margin: 10px 0;
	word-break: break-all;
	font-size: 0.9rem;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */
.alert-danger {
	background: #fee2e2;
	border: 1px solid var(--rubric-red);
	border-left: 4px solid var(--rubric-red);
	color: #7f1d1d;
	font-family: 'Garamond', 'Georgia', serif;
	border-radius: 0;
}

.alert-warning {
	background: var(--amber-100);
	border: 1px solid var(--amber-600);
	border-left: 4px solid var(--amber-600);
	color: var(--amber-900);
	font-family: 'Garamond', 'Georgia', serif;
	border-radius: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.hidden-section {
	display: none;
}

.fade-in {
	animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
	from { 
		opacity: 0; 
		transform: translateY(-15px);
	}
	to { 
		opacity: 1; 
		transform: translateY(0);
	}
}

.loading-spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid var(--amber-100);
	border-top: 3px solid var(--amber-700);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-left: 10px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.form-section::after {
	content: '✦';
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 1rem;
	color: var(--amber-600);
	opacity: 0.4;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
	body {
		background: white;
	}
	
	.container {
		box-shadow: none;
		border: none;
		padding: 20px;
	}
	
	.card-body,
	.form-section {
		page-break-inside: avoid;
		border: 1px solid var(--amber-600);
	}
	
	h1 {
		border-bottom: 2px solid var(--amber-700);
		padding-bottom: 10px;
	}
	
	.share-section {
		display: none;
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.container {
		padding: 25px 20px;
		margin-top: 15px;
		margin-bottom: 15px;
	}
	
	h1 {
		font-size: 1.8rem;
		letter-spacing: 2px;
	}
	
	h2 {
		font-size: 1.2rem;
	}
	
	.form-section,
	.card-body {
		padding: 20px;
	}
	
	.card-text {
		font-size: 1.05rem;
	}
}