/**
 * Share Feature Styles
 * Styles for sharing modal and public viewing pages
 *
 * @package ZephyrProjectManager
 */

/* ====================================
   Share Button
   ==================================== */

.zpm-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: all 0.2s ease;
}

.zpm-share-btn:hover {
	background: #f5f5f5;
	border-color: #999;
}

.zpm-share-btn i {
	font-size: 16px;
}

/* ====================================
   Share Modal
   ==================================== */

.zpm-share-modal-content {
	max-width: 600px;
	width: 90%;
}

.zpm-share-description {
	color: #666;
	font-size: 13px;
	margin: 5px 0 15px;
}

/* Permission Section */
.zpm-share-permission-section {
	margin-bottom: 30px;
}

.zpm-permission-options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	margin-top: 15px;
}

.zpm-permission-option {
	cursor: pointer;
	margin: 0;
}

.zpm-permission-option input[type="radio"] {
	display: none;
}

.zpm-permission-card {
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px 15px;
	text-align: center;
	transition: all 0.2s ease;
	background: #fff;
	min-height: 140px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.zpm-permission-option input[type="radio"]:checked + .zpm-permission-card {
	border-color: #2271b1;
	background-color: #f0f6fc;
	box-shadow: 0 0 0 1px #2271b1;
}

.zpm-permission-card:hover {
	border-color: #2271b1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.zpm-permission-icon {
	font-size: 32px;
	color: #2271b1;
	margin-bottom: 10px;
	display: block;
}

.zpm-permission-card strong {
	display: block;
	margin-bottom: 8px;
	font-size: 16px;
	color: #1e1e1e;
}

.zpm-permission-card p {
	font-size: 13px;
	color: #666;
	margin: 0;
	line-height: 1.4;
}

/* Generate Section */
.zpm-share-generate-section {
	text-align: center;
	margin: 30px 0;
	padding: 20px 0;
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
}

#zpm-generate-share-link {
	padding: 12px 30px;
	font-size: 15px;
	min-width: 200px;
}

#zpm-generate-share-link i {
	margin-right: 8px;
}

/* Link Display */
.zpm-share-link-display {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 30px;
	border: 1px solid #e0e0e0;
}

.zpm-share-link-container {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.zpm-share-link-input {
	flex: 1;
	font-family: 'Courier New', monospace;
	font-size: 12px;
	background: #fff;
	border: 1px solid #ddd;
	padding: 10px 12px;
	border-radius: 4px;
}

.zpm-share-link-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

#zpm-copy-share-link {
	flex-shrink: 0;
	padding: 10px 20px;
	white-space: nowrap;
}

#zpm-copy-share-link i {
	margin-right: 6px;
}

.zpm-share-link-note {
	font-size: 12px;
	color: #666;
	margin-top: 12px;
	margin-bottom: 0;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	line-height: 1.5;
}

.zpm-share-link-note i {
	color: #f0b849;
	margin-top: 2px;
	flex-shrink: 0;
}

/* Existing Shares */
.zpm-existing-shares {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.zpm-shares-list {
	margin-top: 15px;
}

.zpm-shares-loading,
.zpm-no-shares,
.zpm-error-message {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-style: italic;
}

.zpm-shares-loading i,
.zpm-error-message i {
	display: block;
	font-size: 24px;
	margin-bottom: 10px;
}

.zpm-loader-icon {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.zpm-share-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	margin-bottom: 10px;
	transition: all 0.2s ease;
}

.zpm-share-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-color: #ddd;
}

.zpm-share-item-info {
	display: flex;
	align-items: center;
	gap: 15px;
	flex: 1;
}

.zpm-share-permission-badge {
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.zpm-share-permission-badge.view {
	background: #e3f2fd;
	color: #1976d2;
}

.zpm-share-permission-badge.comment {
	background: #fff3e0;
	color: #f57c00;
}

.zpm-share-permission-badge.edit {
	background: #e8f5e9;
	color: #388e3c;
}

.zpm-share-permission-badge i {
	font-size: 14px;
}

.zpm-share-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.zpm-share-details span {
	font-size: 12px;
	color: #666;
}

.zpm-share-created {
	font-weight: 500;
	color: #333 !important;
}

.zpm-share-item-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.zpm-share-permission-select {
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
}

.zpm-share-permission-select:hover {
	border-color: #999;
}

.zpm-share-permission-select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.zpm-revoke-share {
	padding: 8px 12px !important;
	color: #d32f2f !important;
	border: 1px solid transparent;
}

.zpm-revoke-share:hover {
	background: #ffebee !important;
	border-color: #d32f2f !important;
}

.zpm-revoke-share i {
	font-size: 16px;
}

/* ====================================
   Public Shared View
   ==================================== */

.zpm-shared-view {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 20px;
}

.zpm-shared-banner {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 15px 25px;
	border-radius: 8px;
	margin-bottom: 30px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.zpm-shared-banner i {
	font-size: 20px;
}

.zpm-shared-banner .zpm-permission-badge {
	margin-left: auto;
	background: rgba(255, 255, 255, 0.2);
	padding: 6px 12px;
	border-radius: 4px;
	font-weight: 600;
	backdrop-filter: blur(10px);
}

.zpm-shared-content {
	background: white;
	padding: 40px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.zpm-task-view h1,
.zpm-project-view h1 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 32px;
	color: #1e1e1e;
}

.zpm-task-meta {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.zpm-task-meta span {
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
}

.zpm-status {
	background: #e3f2fd;
	color: #1976d2;
}

.zpm-priority {
	background: #fff3e0;
	color: #f57c00;
}

.zpm-due-date {
	background: #f3e5f5;
	color: #7b1fa2;
}

.zpm-task-description,
.zpm-project-description {
	line-height: 1.6;
	color: #333;
	margin-bottom: 30px;
}

/* Comments Section */
.zpm-comments-section {
	margin-top: 40px;
	border-top: 2px solid #f0f0f0;
	padding-top: 30px;
}

.zpm-comments-section h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 20px;
}

.zpm-comments-list {
	margin: 20px 0;
}

.zpm-comment {
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
	border-left: 3px solid #e0e0e0;
}

.zpm-guest-comment {
	background: #fff9e6;
	border-left-color: #ffa000;
}

.zpm-comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.zpm-comment-author img {
	border-radius: 50%;
	width: 32px;
	height: 32px;
}

.zpm-comment-author i.zpm-icon-user-guest {
	font-size: 32px;
	color: #999;
}

.zpm-comment-author strong {
	color: #1e1e1e;
	font-size: 14px;
}

.zpm-comment-date {
	font-size: 12px;
	color: #999;
	margin-left: auto;
}

.zpm-comment-content {
	color: #333;
	line-height: 1.5;
	font-size: 14px;
}

.zpm-comment-content p:last-child {
	margin-bottom: 0;
}

/* Comment Form */
.zpm-comment-form {
	margin-top: 30px;
	padding: 20px;
	background: #f5f5f5;
	border-radius: 8px;
}

.zpm-comment-form h4 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 16px;
}

.zpm-comment-form textarea {
	width: 100%;
	min-height: 100px;
	margin: 10px 0;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	transition: all 0.2s ease;
}

.zpm-comment-form textarea:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.zpm-comment-form button {
	margin-top: 10px;
}

/* Tasks List (for project view) */
.zpm-tasks-section {
	margin-top: 30px;
}

.zpm-tasks-section h3 {
	margin-bottom: 20px;
	font-size: 20px;
}

.zpm-tasks-list {
	display: grid;
	gap: 15px;
}

.zpm-task-item {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	border-left: 3px solid #2271b1;
	transition: all 0.2s ease;
}

.zpm-task-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	background: #fff;
}

.zpm-task-item h4 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 16px;
	color: #1e1e1e;
}

.zpm-task-item p {
	color: #666;
	font-size: 14px;
	margin-bottom: 10px;
	line-height: 1.5;
}

.zpm-task-item .zpm-task-meta {
	margin-bottom: 0;
	margin-top: 10px;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
	.zpm-permission-options {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.zpm-permission-card {
		min-height: auto;
		padding: 15px;
	}

	.zpm-share-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.zpm-share-item-info {
		width: 100%;
	}

	.zpm-share-item-actions {
		width: 100%;
		justify-content: space-between;
	}

	.zpm-share-link-container {
		flex-direction: column;
	}

	#zpm-copy-share-link {
		width: 100%;
	}

	.zpm-shared-content {
		padding: 20px;
	}

	.zpm-task-view h1,
	.zpm-project-view h1 {
		font-size: 24px;
	}

	.zpm-shared-banner {
		flex-wrap: wrap;
		text-align: center;
		justify-content: center;
	}

	.zpm-shared-banner .zpm-permission-badge {
		margin-left: 0;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.zpm-share-modal-content {
		width: 95%;
		padding: 15px;
	}

	.zpm-shared-view {
		padding: 0 10px;
	}

	.zpm-task-meta {
		flex-direction: column;
		align-items: flex-start;
	}

	.zpm-comment-author {
		flex-wrap: wrap;
	}

	.zpm-comment-date {
		margin-left: 0;
		width: 100%;
	}
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
	.zpm-share-btn,
	.zpm-share-item-actions,
	.zpm-comment-form,
	.zpm-modal {
		display: none !important;
	}

	.zpm-shared-content {
		box-shadow: none;
		padding: 0;
	}
}
