/**
 * LMIn - Homepage Modal Styles
 * Standalone modal CSS with hardcoded values (no CSS variable dependencies)
 * Used on the main shortlink creation page
 */

/* ============================================
   MODAL BASE
   ============================================ */
.lmin-hp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lmin-hp-modal.show {
	opacity: 1;
	visibility: visible;
	/* No animation - CSS transition handles fade-in */
}

/* ============================================
   MODAL CONTENT
   ============================================ */
.lmin-hp-modal-content {
	background: #ffffff;
	border-radius: 16px;
	width: 90%;
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
	border: 2px solid #e5e7eb;
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.lmin-hp-modal.show .lmin-hp-modal-content {
	opacity: 1;
	transform: scale(1);
	/* No animation - CSS transition handles fade-in */
}

/* Small modal variant */
.lmin-hp-modal-small {
	max-width: 400px;
}

/* ============================================
   MODAL HEADER
   ============================================ */
.lmin-hp-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 2px solid #f3f4f6;
}

.lmin-hp-modal-header h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f172a;
}

/* Close button */
.lmin-hp-modal-close {
	background: none;
	border: 2px solid #e5e7eb;
	font-size: 1.5rem;
	cursor: pointer;
	color: #6b7280;
	padding: 0;
	line-height: 1;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.lmin-hp-modal-close:hover {
	color: #0f172a;
	background: #f3f4f6;
	border-color: #d1d5db;
}

/* ============================================
   MODAL BODY
   ============================================ */
.lmin-hp-modal-body {
	padding: 1.5rem;
}

/* ============================================
   MODAL FOOTER
   ============================================ */
.lmin-hp-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	border-top: 2px solid #f3f4f6;
	background: #f9fafb;
	border-radius: 0 0 16px 16px;
}

/* Footer buttons */
.lmin-hp-modal-footer .lmin-hp-btn {
	padding: 0.625rem 1.25rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	cursor: pointer;
	border: 2px solid #e5e7eb;
	background: #ffffff;
	color: #374151;
}

.lmin-hp-modal-footer .lmin-hp-btn:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #0f172a;
}

.lmin-hp-modal-footer .lmin-hp-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background: #f3f4f6;
}

/* Primary button */
.lmin-hp-modal-footer .lmin-hp-btn-primary {
	background: #3b82f6;
	border-color: #3b82f6;
	color: #fff;
}

.lmin-hp-modal-footer .lmin-hp-btn-primary:hover {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

/* Danger button */
.lmin-hp-modal-footer .lmin-hp-btn-danger {
	background: #dc2626;
	border-color: #dc2626;
	color: #fff;
}

.lmin-hp-modal-footer .lmin-hp-btn-danger:hover {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #fff;
}

/* ============================================
   MODAL TYPE STYLES
   ============================================ */

/* Error type */
.lmin-hp-modal-error .lmin-hp-modal-header {
	border-bottom-color: #fef2f2;
}

.lmin-hp-modal-error-icon {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.lmin-hp-modal-error-title {
	color: #dc2626;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.lmin-hp-modal-error-message {
	color: #4b5563;
	margin-bottom: 1rem;
}

/* Warning type */
.lmin-hp-modal-warning .lmin-hp-modal-header {
	border-bottom-color: #fffbeb;
}

.lmin-hp-modal-warning-icon {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.lmin-hp-modal-warning-title {
	color: #d97706;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

/* Suggestions box */
.lmin-hp-suggestions {
	text-align: left;
	padding: 1rem;
	background: #f9fafb;
	border-radius: 8px;
	margin-bottom: 1rem;
	border: 1px solid #e5e7eb;
}

.lmin-hp-suggestions h4 {
	margin: 0 0 0.5rem 0;
	font-size: 0.875rem;
	color: #4b5563;
}

.lmin-hp-suggestions ul {
	margin: 0;
	padding-left: 1.25rem;
	font-size: 0.875rem;
	color: #6b7280;
}

.lmin-hp-suggestions li {
	margin-bottom: 0.25rem;
}

/* Existing links list */
.lmin-hp-existing-links {
	max-height: 250px;
	overflow-y: auto;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 0.75rem;
	margin-bottom: 1rem;
	background: #f9fafb;
}

.lmin-hp-existing-links h4 {
	margin: 0 0 0.75rem 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
}

.lmin-hp-existing-link-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.625rem;
	border-bottom: 1px solid #e5e7eb;
	gap: 0.75rem;
}

.lmin-hp-existing-link-item:last-child {
	border-bottom: none;
}

.lmin-hp-existing-link-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.lmin-hp-existing-link-url {
	flex: 1;
	min-width: 0;
}

.lmin-hp-existing-link-url a {
	color: #3b82f6;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	word-break: break-all;
}

.lmin-hp-existing-link-url a:hover {
	text-decoration: underline;
}

.lmin-hp-existing-link-date {
	font-size: 0.75rem;
	color: #6b7280;
}

/* New link highlight */
.lmin-hp-new-link {
	background: #d1fae5;
	border: 1px solid #34d399;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.lmin-hp-new-link-title {
	color: #065f46;
	font-weight: 700;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.lmin-hp-new-link-url {
	color: #059669;
	font-weight: 600;
	text-decoration: none;
	font-size: 1rem;
	word-break: break-all;
}

.lmin-hp-new-link-url:hover {
	text-decoration: underline;
}

/* Copy button */
.lmin-hp-copy-btn {
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	background: #3b82f6;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.lmin-hp-copy-btn:hover {
	background: #2563eb;
}

.lmin-hp-copy-btn.copied {
	background: #10b981;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes lmin-hp-modal-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes lmin-hp-modal-content-fade-in {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes lmin-hp-modal-fade-out {
	from {
		opacity: 1;
		transform: scale(1);
	}
	to {
		opacity: 0;
		transform: scale(0.95);
	}
}

/* Fade out animation class */
.lmin-hp-modal-content.fade-out {
	transition: none;
	animation: lmin-hp-modal-fade-out 0.3s ease-out forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
	.lmin-hp-modal-content {
		width: 95%;
		max-width: none;
		margin: 0.5rem;
	}

	.lmin-hp-modal-small {
		max-width: none;
	}

	.lmin-hp-modal-header,
	.lmin-hp-modal-body,
	.lmin-hp-modal-footer {
		padding: 1rem;
	}

	.lmin-hp-modal-footer {
		flex-direction: column;
	}

	.lmin-hp-modal-footer .lmin-hp-btn {
		width: 100%;
	}
}