/* Share Modal Styles */

.share-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10001; /* Higher than project-modal */
	animation: fadeIn 0.2s ease;
}

.modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.share-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	width: 90%;
	max-width: 600px;
	height: auto;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: slideUp 0.3s ease;
	overflow: hidden;
}

/* Modal Header */
.share-modal .modal-header {
	padding: 10px 20px;
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
	background: #f8f8f8;
}

.share-modal .modal-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

.share-modal .modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s;
}

.share-modal .modal-close:hover {
	background: #f5f5f5;
	color: #333;
}

/* Modal Body */
.share-modal .modal-body {
	flex: 1;
	overflow: auto;
	padding: 30px 20px;
	background: white;
}

/* Loading State */
.share-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 200px;
	color: #666;
}

.share-loading .spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0088cc;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 15px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Share Content */
.share-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.share-description {
	margin: 0 0 5px 0;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.share-label {
	font-weight: 600;
	margin-bottom: 8px;
	display: block;
	color: #333;
	font-size: 14px;
}

/* Share URL Container */
.share-url-container {
	display: flex;
	width: 100%;
	margin-bottom: 10px;
}

.share-url-container.input-append {
	display: inline-flex;
	align-items: stretch;
}

.share-url-input {
	flex: 1;
	font-family: monospace;
	font-size: 12px;
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	padding: 8px 12px;
	border-radius: 3px 0 0 3px;
	border-right: none;
	cursor: text;
	height: 34px;
	box-sizing: border-box;
	line-height: 18px;
}

.share-url-input:focus {
	outline: none;
	border-color: #0088cc;
	background-color: #fff;
}

.share-url-container .btn {
	border-radius: 0 3px 3px 0;
	white-space: nowrap;
	padding: 8px 15px;
	height: 34px;
	box-sizing: border-box;
	line-height: 18px;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Share Info Box */
.share-info-box {
	background-color: #d9edf7;
	border: 1px solid #bce8f1;
	border-radius: 4px;
	padding: 15px;
	color: #31708f;
	margin-top: 10px;
}

.share-info-box strong {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
}

.share-info-box strong i {
	margin-right: 5px;
}

.share-info-box ul {
	margin: 0;
	padding-left: 20px;
	line-height: 1.6;
}

.share-info-box li {
	margin-bottom: 5px;
	font-size: 13px;
}

/* Modal Footer */
.share-modal .modal-footer {
	padding: 15px 20px;
	border-top: 1px solid #e0e0e0;
	flex-shrink: 0;
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f8f8f8;
}

.share-modal .footer-left {
	flex: 1;
}

.share-modal .modal-footer > div:last-child {
	display: flex;
	gap: 10px;
}

.share-modal .modal-footer .btn {
	margin: 0;
}

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

@keyframes slideUp {
	from {
		transform: translate(-50%, -45%);
		opacity: 0;
	}
	to {
		transform: translate(-50%, -50%);
		opacity: 1;
	}
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.share-modal-content {
		width: 95%;
		max-width: none;
		max-height: 95vh;
	}

	.share-modal .modal-body {
		padding: 20px 15px;
	}

	.share-modal .modal-footer {
		flex-direction: column;
		gap: 10px;
		padding: 10px 15px;
	}

	.share-modal .footer-left {
		display: none;
	}

	.share-modal .modal-footer > div:last-child {
		width: 100%;
		flex-direction: column;
	}

	.share-modal .modal-footer .btn {
		width: 100%;
	}

	.share-url-container {
		flex-direction: column;
	}

	.share-url-input {
		border-radius: 3px 3px 0 0;
		border-right: 1px solid #ddd;
		border-bottom: none;
	}

	.share-url-container .btn {
		border-radius: 0 0 3px 3px;
		width: 100%;
	}
}

/* Small screens */
@media (max-width: 480px) {
	.share-modal-content {
		width: 100%;
		height: 100%;
		max-height: 100vh;
		border-radius: 0;
	}

	.share-modal .modal-title {
		font-size: 18px;
	}

	.share-description {
		font-size: 13px;
	}

	.share-info-box {
		padding: 12px;
	}

	.share-info-box strong {
		font-size: 13px;
	}

	.share-info-box li {
		font-size: 12px;
	}
}
