/*
 * ML Event Photo Book - Frontend Styles
 * 
 * Modern, responsive styles for photo album viewing and uploading
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.ml-album-wrapper {
	padding: 40px 20px;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	min-height: 70vh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ml-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* ==========================================================================
   Album Header
   ========================================================================== */

.ml-album-header {
	text-align: center;
	margin-bottom: 40px;
	padding: 60px 40px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
	color: white;
	position: relative;
	overflow: hidden;
}

.ml-album-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
	pointer-events: none;
}

.ml-album-title {
	font-size: 3rem;
	font-weight: 300;
	margin-bottom: 20px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	position: relative;
	z-index: 1;
}

.ml-album-description {
	font-size: 1.2rem;
	line-height: 1.6;
	opacity: 0.9;
	max-width: 600px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.ml-album-cover {
	margin-top: 30px;
	position: relative;
	z-index: 1;
}

.ml-album-cover img {
	max-width: 100%;
	height: auto;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Mode Toggle
   ========================================================================== */

.ml-mode-toggle {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-bottom: 40px;
}

.ml-btn {
	padding: 16px 32px;
	border: 3px solid #667eea;
	background: rgba(255, 255, 255, 0.95);
	color: #667eea;
	border-radius: 50px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
	backdrop-filter: blur(10px);
}

.ml-btn:hover,
.ml-btn.active {
	background: #667eea;
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.ml-btn-primary {
	background: #667eea;
	color: white;
}

.ml-btn-primary:hover {
	background: #5a67d8;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(90, 103, 216, 0.4);
}

.ml-btn-secondary {
	background: rgba(255, 255, 255, 0.95);
	color: #667eea;
}

.ml-btn-icon {
	font-size: 20px;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.ml-section {
	display: none;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	padding: 50px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.ml-section.active {
	display: block;
	animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   Photo Gallery
   ========================================================================== */

.ml-gallery-container h3 {
	text-align: center;
	font-size: 2.2rem;
	color: #2d3748;
	margin-bottom: 40px;
	font-weight: 300;
}

.ml-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 25px;
	margin-top: 30px;
}

.ml-photo-item {
	background: white;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.ml-photo-item:hover {
	transform: translateY(-10px) scale(1.02);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.ml-photo-link {
	display: block;
	position: relative;
	overflow: hidden;
}

.ml-photo-item img {
	width: 100%;
	height: 250px;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ml-photo-item:hover img {
	transform: scale(1.05);
}

.ml-photo-meta {
	padding: 20px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ml-photo-meta p {
	margin: 8px 0;
	font-size: 14px;
	color: #6c757d;
}

.ml-photo-uploader {
	font-weight: 600;
	color: #495057;
}

.ml-photo-date {
	font-size: 12px;
	opacity: 0.8;
}

.ml-no-photos {
	text-align: center;
	color: #6c757d;
	font-size: 1.3rem;
	padding: 80px 20px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 15px;
	border: 2px dashed #dee2e6;
}

/* ==========================================================================
   Upload Form
   ========================================================================== */

.ml-upload-form-container h3 {
	text-align: center;
	font-size: 2.2rem;
	color: #2d3748;
	margin-bottom: 40px;
	font-weight: 300;
}

.ml-upload-form {
	max-width: 600px;
	margin: 0 auto;
}

.ml-form-row {
	margin-bottom: 30px;
}

.ml-form-row label {
	display: block;
	margin-bottom: 10px;
	font-weight: 600;
	color: #2d3748;
	font-size: 16px;
}

.ml-form-row input[type="text"],
.ml-form-row input[type="email"] {
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	font-size: 16px;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(10px);
}

.ml-form-row input[type="text"]:focus,
.ml-form-row input[type="email"]:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	background: white;
}

.ml-form-row input[type="file"] {
	width: 100%;
	padding: 20px;
	border: 3px dashed #667eea;
	border-radius: 12px;
	background: rgba(102, 126, 234, 0.05);
	cursor: pointer;
	transition: all 0.3s ease;
}

.ml-form-row input[type="file"]:hover {
	border-color: #5a67d8;
	background: rgba(102, 126, 234, 0.1);
}

.ml-form-help {
	font-size: 14px;
	color: #718096;
	margin-top: 8px;
	font-style: italic;
}

/* ==========================================================================
   Upload Progress & Results
   ========================================================================== */

.ml-upload-progress {
	margin-top: 30px;
	padding: 20px;
	background: rgba(102, 126, 234, 0.05);
	border-radius: 12px;
}

.ml-progress-bar {
	width: 100%;
	height: 8px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 15px;
}

.ml-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
	width: 0%;
	transition: width 0.3s ease;
	border-radius: 4px;
}

.ml-progress-text {
	text-align: center;
	font-weight: 600;
	color: #667eea;
	margin: 0;
}

.ml-upload-result {
	margin-top: 25px;
	padding: 20px;
	border-radius: 12px;
	font-weight: 500;
}

.ml-upload-result.success {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	color: #155724;
	border: 2px solid #b8daff;
}

.ml-upload-result.error {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	color: #721c24;
	border: 2px solid #f5c6cb;
}

/* ==========================================================================
   Password Form
   ========================================================================== */

.ml-password-form-container {
	max-width: 450px;
	margin: 0 auto;
	text-align: center;
	background: rgba(255, 255, 255, 0.95);
	padding: 50px 40px;
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
}

.ml-password-form-container h3 {
	color: #2d3748;
	margin-bottom: 20px;
	font-weight: 300;
	font-size: 1.8rem;
}

.ml-password-form input[type="password"] {
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	margin-bottom: 25px;
	font-size: 16px;
	text-align: center;
	transition: all 0.3s ease;
}

.ml-password-form input[type="password"]:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ml-error-message {
	color: #721c24;
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border: 2px solid #f5c6cb;
	padding: 15px;
	border-radius: 12px;
	margin-top: 15px;
	font-weight: 500;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.ml-album-wrapper {
		padding: 20px 15px;
	}
	
	.ml-album-header {
		padding: 40px 25px;
		margin-bottom: 30px;
	}
	
	.ml-album-title {
		font-size: 2.2rem;
	}
	
	.ml-album-description {
		font-size: 1rem;
	}
	
	.ml-mode-toggle {
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}
	
	.ml-btn {
		width: 250px;
		justify-content: center;
	}
	
	.ml-photo-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 20px;
	}
	
	.ml-section {
		padding: 30px 25px;
	}
	
	.ml-upload-form {
		padding: 0;
	}
	
	.ml-password-form-container {
		padding: 40px 25px;
		margin: 0 15px;
	}
}

@media (max-width: 480px) {
	.ml-album-title {
		font-size: 1.8rem;
	}
	
	.ml-photo-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.ml-btn {
		width: 100%;
		padding: 14px 24px;
	}
	
	.ml-section {
		padding: 25px 20px;
	}
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.ml-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: none;
}

.ml-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	cursor: pointer;
}

.ml-lightbox-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 90vw;
	max-height: 90vh;
}

.ml-lightbox-content img {
	max-width: 100%;
	max-height: 90vh;
	border-radius: 10px;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.ml-lightbox-close {
	position: absolute;
	top: -50px;
	right: -50px;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	color: #333;
	transition: all 0.3s ease;
}

.ml-lightbox-close:hover {
	background: white;
	transform: scale(1.1);
}

/* ==========================================================================
   Messages
   ========================================================================== */

.ml-message {
	padding: 15px 20px;
	border-radius: 10px;
	margin: 15px 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 500;
}

.ml-message-success {
	background: linear-gradient(135deg, #48bb78, #38a169);
	color: white;
	box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.ml-message-error {
	background: linear-gradient(135deg, #f56565, #e53e3e);
	color: white;
	box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.ml-message-info {
	background: linear-gradient(135deg, #4299e1, #3182ce);
	color: white;
	box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.ml-icon {
	font-size: 18px;
}

/* ==========================================================================
   Photo Preview
   ========================================================================== */

#ml-photo-preview {
	display: none;
	margin: 20px 0;
	padding: 20px;
	background: #f7fafc;
	border-radius: 10px;
	border: 2px dashed #e2e8f0;
}

.ml-preview-item {
	display: inline-block;
	margin: 10px;
	text-align: center;
	max-width: 120px;
}

.ml-preview-item img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ml-preview-name {
	display: block;
	font-size: 12px;
	color: #666;
	margin-top: 5px;
	word-break: break-all;
}

/* ==========================================================================
   Form Validation
   ========================================================================== */

.ml-form-row input.error {
	border-color: #f56565;
	box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.ml-error-message {
	color: #f56565;
	font-size: 14px;
	margin-top: 5px;
	display: block;
}

/* ==========================================================================
   Upload Progress
   ========================================================================== */

#ml-upload-progress {
	display: none;
	margin: 20px 0;
}

#ml-upload-status {
	margin: 15px 0;
}

/* ==========================================================================
   Button States
   ========================================================================== */

.ml-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

.ml-btn:disabled:hover {
	transform: none !important;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
}

/* ==========================================================================
   Mobile Lightbox
   ========================================================================== */

@media (max-width: 768px) {
	.ml-lightbox-close {
		top: 20px;
		right: 20px;
		width: 50px;
		height: 50px;
		font-size: 28px;
	}
	
	.ml-lightbox-content {
		max-width: 95vw;
		max-height: 95vh;
	}
} 