/* TikTok Downloader Plugin Styles */

.tiktok-downloader-container {
	max-width: 800px;
	margin: 20px auto;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tiktok-downloader-wrapper {
	background: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tiktok-downloader-wrapper h2 {
	margin-top: 0;
	color: #000;
	font-size: 28px;
	font-weight: 600;
	margin-bottom: 10px;
}

.tiktok-downloader-description {
	color: #666;
	font-size: 14px;
	margin-bottom: 20px;
}

/* Tabs */
.tiktok-downloader-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 2px solid #eee;
}

.tiktok-tab-button {
	padding: 12px 20px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	transition: all 0.3s ease;
}

.tiktok-tab-button:hover {
	color: #000;
}

.tiktok-tab-button.active {
	color: #000;
	border-bottom-color: #000;
}

/* Tab Content */
.tiktok-tab-content {
	display: none;
}

.tiktok-tab-content.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

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

/* Form Styles */
.tiktok-downloader-form {
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 20px;
}

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

.form-group input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.3s ease;
}

.form-group input:focus {
	outline: none;
	border-color: #000;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group small {
	display: block;
	margin-top: 5px;
	color: #999;
	font-size: 12px;
}

/* Button Styles */
.tiktok-download-button {
	display: inline-block;
	padding: 12px 24px;
	background: #000;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	text-align: center;
}

.tiktok-download-button:hover {
	background: #333;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tiktok-download-button:active {
	transform: translateY(0);
}

/* Result Container */
.tiktok-result-container {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 4px;
	margin-bottom: 20px;
	border: 1px solid #eee;
}

/* Video Info */
.tiktok-video-info {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
	align-items: flex-start;
}

.video-cover-image {
	width: 150px;
	height: 200px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.video-details {
	flex: 1;
}

.video-details h3 {
	margin: 0 0 10px 0;
	font-size: 18px;
	color: #000;
	line-height: 1.4;
}

.video-author {
	margin: 5px 0;
	color: #666;
	font-size: 14px;
}

.video-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-top: 15px;
}

.stat {
	display: block;
	padding: 8px;
	background: white;
	border-radius: 4px;
	font-size: 13px;
	color: #333;
}

.stat strong {
	color: #000;
	font-weight: 600;
}

/* Profile Header */
.profile-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.profile-header h3 {
	margin: 0;
	font-size: 18px;
	color: #000;
}

.profile-controls {
	display: flex;
	gap: 15px;
}

.select-all-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
}

.select-all-checkbox input[type='checkbox'] {
	cursor: pointer;
	width: 18px;
	height: 18px;
}

/* Profile Videos Grid */
.profile-videos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.profile-video-item {
	position: relative;
	border-radius: 4px;
	overflow: hidden;
	background: #eee;
	cursor: pointer;
	transition: transform 0.3s ease;
	border: 2px solid transparent;
}

.profile-video-item:hover {
	transform: scale(1.05);
}

.profile-video-item.selected {
	border-color: #000;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.profile-video-checkbox {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 20px;
	height: 20px;
	cursor: pointer;
	z-index: 10;
	background: white;
	border: 2px solid #333;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.profile-video-checkbox input[type='checkbox'] {
	display: none;
}

.profile-video-checkbox input[type='checkbox']:checked + .checkmark {
	display: block;
}

.checkmark {
	display: none;
	color: #000;
	font-weight: bold;
	font-size: 14px;
}

.profile-video-thumbnail {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.profile-video-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.profile-video-item:hover .profile-video-overlay {
	opacity: 1;
}

.profile-video-overlay a {
	padding: 8px 12px;
	background: white;
	color: #000;
	border-radius: 4px;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.profile-video-overlay a:hover {
	background: #000;
	color: white;
}

/* Loading Spinner */
.tiktok-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 20px;
	color: #666;
	font-size: 14px;
}

.spinner {
	width: 20px;
	height: 20px;
	border: 3px solid #eee;
	border-top-color: #000;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Error Message */
.tiktok-error-message {
	background: #fee;
	color: #c33;
	padding: 15px;
	border-radius: 4px;
	border-left: 4px solid #c33;
	margin-bottom: 20px;
	font-size: 14px;
}

/* Profile Actions */
.profile-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.tiktok-download-button-secondary {
	background: #666;
}

.tiktok-download-button-secondary:hover {
	background: #444;
}

.tiktok-download-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Progress Bar */
.download-progress-container {
	display: none;
	margin-top: 20px;
	padding: 15px;
	background: #f5f5f5;
	border-radius: 4px;
}

.download-progress-container.active {
	display: block;
}

.progress-label {
	font-size: 14px;
	color: #333;
	margin-bottom: 10px;
	font-weight: 500;
}

.progress-bar-wrapper {
	width: 100%;
	height: 24px;
	background: #ddd;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 10px;
}

.progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #000, #333);
	width: 0%;
	transition: width 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 12px;
	font-weight: bold;
}

.progress-text {
	font-size: 13px;
	color: #666;
	text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
	.tiktok-downloader-container {
		padding: 10px;
	}

	.tiktok-downloader-wrapper {
		padding: 15px;
	}

	.tiktok-downloader-wrapper h2 {
		font-size: 22px;
	}

	.tiktok-video-info {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.video-cover-image {
		width: 200px;
		height: 267px;
	}

	.video-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.profile-videos-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}

	.tiktok-downloader-tabs {
		flex-wrap: wrap;
	}

	.tiktok-tab-button {
		flex: 1;
		min-width: 150px;
	}
}
