/* Enhanced styles for UMCC Birdie Challenge */

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Base styles */
body {
	font-family: 'Poppins', sans-serif;
	padding-bottom: 70px;
	background-color: #f8f9fa;
	color: #333;
	overflow-x: hidden;
}

/* Mobile menu styles */
#mobileMenuButton:focus {
	outline: none;
}

/* Tailwind MD breakpoint fixes */
@media (min-width: 768px) {
    .hidden.md\:flex {
        display: flex !important;
    }
    .md\:hidden {
        display: none !important;
    }
}

/* Mobile menu animations */
#mobileMenu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

#mobileMenu.hidden {
	max-height: 0;
}

#mobileMenu:not(.hidden) {
	max-height: 500px;
}

/* Mobile nav link styling */
#mobileMenu .nav-link {
	display: block;
	padding: 0.75rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.2s ease;
}

#mobileMenu .nav-link:last-child {
	border-bottom: none;
}

#mobileMenu .nav-link:hover {
	background-color: rgba(255, 255, 255, 0.05);
	padding-left: 0.25rem;
}

/* Header & Navigation */
nav.navbar {
	background: linear-gradient(135deg, #1e5631 0%, #2e7d32 100%);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-link {
	position: relative;
	transition: all 0.3s ease;
}

.nav-link:after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	background: #fff;
	left: 0;
	bottom: -4px;
	transition: width 0.3s ease;
}

.nav-link:hover:after {
	width: 100%;
}

/* Cards and containers */
.card {
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	overflow: hidden;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
	background: linear-gradient(to right, #f8f9fa, #ffffff);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Course cards */
.course-card {
	position: relative;
	overflow: hidden;
}

.course-card h4 {
	position: relative;
	display: inline-block;
}

.course-card h4:after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 50px;
	height: 3px;
	background-color: #2e7d32;
	border-radius: 3px;
}

/* Hole cards */
.hole-card {
	height: 180px; /* Fixed height for all hole cards */
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.hole-card:hover {
	background-color: #f0f4f0;
	border-color: rgba(46, 125, 50, 0.2);
}

/* Score badges */
.score-badge {
	position: relative;
	padding: 4px 12px;
	border-radius: 50px;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.birdie-badge {
	background: linear-gradient(135deg, #c8e6c9 0%, #81c784 100%);
	color: #2e7d32;
}

.eagle-badge {
	background: linear-gradient(135deg, #bbdefb 0%, #64b5f6 100%);
	color: #1565c0;
}

.double-eagle-badge {
	background: linear-gradient(135deg, #e1bee7 0%, #ba68c8 100%);
	color: #7b1fa2;
}

/* Progress bars */
.progress-container {
	height: 10px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 5px;
	overflow: hidden;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
	height: 100%;
	background: linear-gradient(135deg, #81c784 0%, #2e7d32 100%);
	border-radius: 5px;
	transition: width 1s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
	border-radius: 8px;
	padding: 8px 16px;
	font-weight: 500;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
	border: none;
}

.btn-primary:hover {
	background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.btn-secondary {
	background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
	border: none;
}

.btn-danger {
	background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
	border: none;
}

.btn-action {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.btn-evidence {
	color: #2e7d32;
	background: rgba(46, 125, 50, 0.1);
}

.btn-evidence:hover {
	background: rgba(46, 125, 50, 0.2);
}

.btn-delete {
	color: #c62828;
	background: rgba(198, 40, 40, 0.1);
}

.btn-delete:hover {
	background: rgba(198, 40, 40, 0.2);
}

.btn-add {
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.btn-add:before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
	transition: all 0.6s ease;
	z-index: -1;
}

.btn-add:hover:before {
	left: 100%;
}

/* Modals */
.modal {
	border-radius: 16px;
	overflow: hidden;
}

.modal-header {
	background: linear-gradient(to right, #f8f9fa, #ffffff);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-content {
	padding: 24px;
}

.modal-backdrop {
	backdrop-filter: blur(4px);
	background-color: rgba(0, 0, 0, 0.4);
}

/* Form elements */
.form-control {
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	padding: 10px 16px;
	transition: all 0.3s ease;
}

.form-control:focus {
	border-color: #2e7d32;
	box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.form-label {
	font-weight: 500;
	color: #555;
	margin-bottom: 8px;
}

/* Footer */
footer {
	background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
	box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
	animation: fadeIn 0.5s ease forwards;
}

/* Helper classes */
.text-gradient {
	background: linear-gradient(135deg, #1b5e20 0%, #388e3c 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	display: inline; /* Allows the text to be treated as inline */
}

/* Fix for text-gradient with icons to maintain proper wrapping */
.text-gradient i {
	margin-right: 0.5rem; /* Space after icon */
}

/* Ensure the icon stays with its text */
h2 .text-gradient, 
h3 .text-gradient, 
h4 .text-gradient {
	display: inline-flex; /* Use flex for icon alignment */
	align-items: center; /* Center align the icon vertically */
	word-break: break-word; /* Allow word breaking */
	flex-wrap: wrap; /* Allow wrapping */
}

.shadow-hover {
	transition: all 0.3s ease;
}

.shadow-hover:hover {
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Title with icon styling */
h2 .fas, h3 .fas, h4 .fas {
	position: relative; /* Ensure icon positioning doesn't break layout */
	vertical-align: middle; /* Align icon properly with text */
}

h2, h3, h4 {
	line-height: 1.4; /* Improved line height for multiline headers */
}

/* Headers with icons (created using CSS) */
.header-with-icon {
	position: relative;
	padding-left: 2rem;
}

.header-with-icon i {
	position: absolute;
	left: 0;
	top: 0.25rem;
}

/* For wrapping titles on mobile without breaking indentation */
@media (max-width: 576px) {
	h2, h3, h4 {
		word-wrap: break-word; /* Allow long words to break */
		overflow-wrap: break-word; /* Modern browsers */
		hyphens: auto; /* Add hyphens when needed */
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.course-grid {
		grid-template-columns: 1fr;
	}
	
	.hole-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	
	/* Container adjustments for mobile */
	.container {
		padding-left: 1rem;
		padding-right: 1rem;
		width: 100%;
	}
	
	/* Adjust form elements on mobile */
	.form-control, 
	input[type="text"],
	input[type="email"],
	input[type="password"],
	select,
	textarea {
		font-size: 16px; /* Prevent iOS zoom on focus */
	}
	
	/* Make tables mobile-friendly */
	.table-container {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	/* Responsive table styles */
	.responsive-table {
		width: 100%;
	}
	
	.responsive-table thead {
		display: none;
	}
	
	.responsive-table tbody tr {
		display: block;
		margin-bottom: 1rem;
		border: 1px solid #e2e8f0;
		border-radius: 0.5rem;
		padding: 1rem;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	}
	
	.responsive-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: right;
		padding: 0.5rem 0;
		border-bottom: 1px solid #edf2f7;
	}
	
	.responsive-table tbody td:last-child {
		border-bottom: none;
	}
	
	.responsive-table tbody td:before {
		content: attr(data-label);
		font-weight: 600;
		text-align: left;
		padding-right: 1rem;
	}
	
	/* Adjust buttons on mobile */
	.btn {
		padding: 0.5rem 1rem;
		white-space: nowrap;
	}
	
	/* Stack button groups on mobile */
	.button-group {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}
	
	/* Card adjustments for mobile */
	.card {
		margin-bottom: 1rem;
	}
	
	/* Mobile-friendly footer */
	footer {
		padding: 1rem 0;
	}
	
	/* Better modal handling on mobile devices */
	#modal-container > div {
		width: 95%;
		margin: 0 auto;
		max-height: 90vh;
	}
	
	.modal-content form {
		padding: 0.5rem;
	}
	
	.modal-title {
		font-size: 1.1rem;
	}
}

@media (max-width: 576px) {
	.hole-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	/* Further small screen adjustments */
	h1, .h1 {
		font-size: 1.5rem;
	}
	
	h2, .h2 {
		font-size: 1.25rem;
	}
	
	.table th, .table td {
		padding: 0.5rem;
	}
}

/* Responsive hole cards */
.hole-card {
	min-height: 180px; /* Minimum height instead of fixed height */
	height: auto; /* Allow auto-height on smaller screens */
	display: flex;
	flex-direction: column;
	overflow: visible; /* Prevent content from being cut off */
}

/* Header styling */
.hole-card .card-header {
	padding: 0.75rem;
	background-color: rgba(0, 0, 0, 0.02);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	flex-shrink: 0;
}

/* Content area with fixed height */
.hole-card .card-content {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 1rem;
}

/* Prize Pool styling */
.prize-pool {
	background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
	border: 1px solid #9ae6b4;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.prize-amount {
	font-size: 1.5rem;
	font-weight: 700;
	color: #2f855a;
}

/* Payout badges */
.payout-first {
	background: linear-gradient(135deg, #fefcbf 0%, #f6e05e 100%);
	color: #744210;
}

.payout-second {
	background: linear-gradient(135deg, #bee3f8 0%, #63b3ed 100%);
	color: #2b6cb0;
}

.payout-third {
	background: linear-gradient(135deg, #e9d8fd 0%, #b794f4 100%);
	color: #553c9a;
}

/* Enhanced score badges */
.score-badge {
	position: relative;
	padding: 0.5rem 1rem;
	border-radius: 2rem;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3rem;
}

.birdie-badge {
	background: linear-gradient(135deg, #c6f6d5 0%, #68d391 100%);
	color: #22543d;
}

.eagle-badge {
	background: linear-gradient(135deg, #bee3f8 0%, #63b3ed 100%);
	color: #2b6cb0;
}

.double-eagle-badge {
	background: linear-gradient(135deg, #e9d8fd 0%, #b794f4 100%);
	color: #553c9a;
}

/* Action buttons */
.action-buttons {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
	.hole-card {
		min-height: 160px; /* Minimum height for mobile */
		height: auto; /* Allow height to grow based on content */
		padding-bottom: 0.75rem; /* Add some bottom padding for spacing */
	}
	
	/* Ensure action buttons don't get cut off */
	.hole-card .btn-action {
		margin-bottom: 0.5rem;
	}
}

/* Rules page styles */

/* Add these to your assets/css/styles.css file */

/* Typography plugin enhancements for rules page */
.prose h2 {
    color: #1e5631;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.prose h3 {
    color: #2e7d32;
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.prose h4 {
    color: #333;
    font-size: 1.125rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Fix for the double list markers issue */
.prose ul li::marker,
.prose ol li::marker {
    color: #2e7d32;
}

.prose ul li::before,
.prose ol li::before {
    display: none !important;
    content: none !important;
}

.prose ul,
.prose ol {
    margin-bottom: 1.25rem; 
}

/* Create a clean slate for the JS to apply styling */
.rules-content ul,
.rules-content ol {
    margin-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.prose a {
    color: #2563eb;
    text-decoration: none;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

.prose em {
    font-style: italic;
}

/* Rules sections */
.rules-section {
    margin-bottom: 2.5rem;
}

/* Callout box */
.rules-callout {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2e7d32;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.rules-callout h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}