/**
 * User Authentication & Post Interactions Styles
 * 
 * @package Dharmgyan
 */

/* Form Styles */
.dharmgyan-login-form,
.dharmgyan-register-form,
.dharmgyan-profile {
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dharmgyan-login-form h2,
.dharmgyan-register-form h2,
.dharmgyan-profile h2 {
	margin-bottom: 1.5rem;
	color: #333;
	font-size: 1.8rem;
}

.dharmgyan-errors {
	background: #fee;
	border: 1px solid #fcc;
	border-radius: 4px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.dharmgyan-errors ul {
	margin: 0;
	padding-left: 1.5rem;
}

.dharmgyan-errors li {
	color: #c00;
	margin-bottom: 0.5rem;
}

.dharmgyan-success {
	background: #efe;
	border: 1px solid #cfc;
	border-radius: 4px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.dharmgyan-success p {
	color: #0a0;
	margin: 0;
}

.form-group {
	margin-bottom: 1.25rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	color: #555;
	font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

.btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
}

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

.btn-primary:hover {
	background: #5568d3;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-danger {
	background: #e53e3e;
	color: #fff;
}

.btn-danger:hover {
	background: #c53030;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
}

/* Like & Save Buttons */
.dharmgyan-like-button,
.dharmgyan-save-button {
	display: inline-block;
	margin: 0.5rem 0;
}

.like-btn,
.save-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.2rem;
	border: 2px solid #ddd;
	border-radius: 50px;
	background: #fff;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 0.95rem;
	font-weight: 500;
}

.like-btn:hover,
.save-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.like-btn.liked {
	border-color: #e53e3e;
	background: #fff5f5;
}

.like-btn.liked .like-icon {
	animation: heartBeat 0.5s;
}

.save-btn.saved {
	border-color: #3182ce;
	background: #ebf8ff;
}

.like-btn.loading,
.save-btn.loading {
	opacity: 0.6;
	cursor: not-allowed;
}

.like-btn:disabled,
.save-btn:disabled {
	cursor: not-allowed;
}

@keyframes heartBeat {
	0%, 100% {
		transform: scale(1);
	}
	25% {
		transform: scale(1.3);
	}
	50% {
		transform: scale(1);
	}
	75% {
		transform: scale(1.3);
	}
}

/* Profile Section */
.profile-info {
	background: #f7fafc;
	padding: 1.5rem;
	border-radius: 6px;
	margin-bottom: 2rem;
}

.profile-info h3 {
	margin-bottom: 1rem;
	color: #2d3748;
}

.profile-info p {
	margin-bottom: 0.5rem;
	color: #4a5568;
}

.profile-edit {
	background: #f7fafc;
	padding: 1.5rem;
	border-radius: 6px;
}

.profile-edit h3 {
	margin-bottom: 1rem;
	color: #2d3748;
}

/* Posts Grid */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

.post-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
	overflow: hidden;
}

.post-thumbnail img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
	transform: scale(1.05);
}

.post-content {
	padding: 1.25rem;
}

.post-content h3 {
	margin-bottom: 0.75rem;
	font-size: 1.2rem;
}

.post-content h3 a {
	color: #2d3748;
	text-decoration: none;
	transition: color 0.3s;
}

.post-content h3 a:hover {
	color: #667eea;
}

.post-excerpt {
	color: #718096;
	margin-bottom: 1rem;
	line-height: 1.6;
}

.read-more {
	display: inline-block;
	color: #667eea;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s;
}

.read-more:hover {
	color: #5568d3;
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
	.dharmgyan-login-form,
	.dharmgyan-register-form,
	.dharmgyan-profile {
		padding: 1.5rem;
	}
	
	.posts-grid {
		grid-template-columns: 1fr;
	}
}

/* Utility Classes */
.mt-4 {
	margin-top: 1rem;
}

.mt-6 {
	margin-top: 1.5rem;
}

.mt-8 {
	margin-top: 2rem;
}

.mb-4 {
	margin-bottom: 1rem;
}
