/**
 * OniGrow Tools - Styles
 *
 * @package OniGrow\Tools
 */

/* Main Wrapper */
.onigrow-tools-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 0;
}

/* Header */
.og-header {
	margin-bottom: 30px;
	text-align: center;
}

.og-header h2 {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 600;
}

.og-intro {
	margin: 0;
	color: #666;
	font-size: 16px;
}

/* Credits Meter */
.og-credits-meter {
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 30px;
}

.og-credits-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.og-credits-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.og-month {
	font-size: 14px;
	color: #666;
}

.og-credits-stats {
	display: flex;
	gap: 20px;
	margin-bottom: 15px;
}

.og-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
}

.og-stat-value {
	font-size: 24px;
	font-weight: 700;
	color: #333;
}

.og-stat-label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.og-progress-bar {
	height: 10px;
	background: #e0e0e0;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 10px;
}

.og-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
	transition: width 0.3s ease;
}

.og-plan-info {
	margin: 10px 0 0;
	font-size: 14px;
	text-align: center;
}

/* Tools Grid */
.og-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 25px;
	margin-top: 30px;
}

@media (max-width: 768px) {
	.og-tools-grid {
		grid-template-columns: 1fr;
	}
}

/* Tool Card */
.og-tool-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	transition: box-shadow 0.3s ease;
}

.og-tool-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.og-tool-card.og-locked {
	opacity: 0.7;
}

.og-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 15px;
}

.og-tool-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

/* Badges */
.og-badge {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	font-weight: 500;
	white-space: nowrap;
}

.og-badge-available {
	background: #d4edda;
	color: #155724;
}

.og-badge-locked {
	background: #f8d7da;
	color: #721c24;
}

.og-badge-no-credits {
	background: #fff3cd;
	color: #856404;
}

.og-card-body {
	margin-top: 15px;
}

.og-tool-description {
	margin: 0 0 20px;
	color: #666;
	font-size: 14px;
	line-height: 1.5;
}

/* Form Fields */
.og-tool-form {
	margin-bottom: 15px;
}

.og-field {
	margin-bottom: 15px;
}

.og-field label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	font-size: 14px;
}

.og-field .required {
	color: #d32f2f;
}

.og-input,
.og-textarea,
.og-select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s;
}

.og-input:focus,
.og-textarea:focus,
.og-select:focus {
	outline: none;
	border-color: #4CAF50;
}

.og-textarea {
	resize: vertical;
	min-height: 80px;
}

/* Actions */
.og-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.og-button {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.og-button-primary {
	background: #4CAF50;
	color: #fff;
}

.og-button-primary:hover {
	background: #45a049;
}

.og-button-primary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.og-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #4CAF50;
	border-radius: 50%;
	animation: og-spin 1s linear infinite;
}

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

/* Output */
.og-output {
	margin-top: 20px;
	padding: 15px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.og-output h4 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.og-output-content {
	color: #333;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* Error */
.og-error {
	margin-top: 15px;
	padding: 12px;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	font-size: 14px;
}

/* Locked Message */
.og-locked-message {
	padding: 15px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	text-align: center;
}

.og-locked-message p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

.og-locked-message a {
	color: #4CAF50;
	text-decoration: underline;
}

.og-locked-message a:hover {
	color: #45a049;
}

/* Modal */
.og-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.og-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	animation: og-fade-in 0.3s ease;
}

.og-modal-container {
	position: relative;
	background: #fff;
	border-radius: 8px;
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: og-slide-up 0.3s ease;
}

.og-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	border-bottom: 1px solid #e0e0e0;
}

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

.og-modal-close {
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.og-modal-close:hover {
	color: #333;
}

.og-modal-warning {
	padding: 15px 25px;
	background: #fff3cd;
	border-bottom: 1px solid #ffeaa7;
	color: #856404;
	font-size: 14px;
	line-height: 1.5;
}

.og-modal-warning strong {
	font-weight: 600;
}

.og-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 25px;
}

#og-modal-content {
	color: #333;
	font-size: 15px;
	line-height: 1.7;
}

#og-modal-content h3,
#og-modal-content h4 {
	color: #333;
	margin-top: 20px;
	margin-bottom: 10px;
}

#og-modal-content h3 {
	font-size: 20px;
	font-weight: 600;
}

#og-modal-content h4 {
	font-size: 17px;
	font-weight: 600;
}

#og-modal-content p {
	margin: 10px 0;
}

#og-modal-content ul,
#og-modal-content ol {
	margin: 10px 0;
	padding-left: 25px;
}

#og-modal-content li {
	margin: 8px 0;
}

#og-modal-content strong {
	font-weight: 600;
	color: #222;
}

.og-modal-footer {
	display: flex;
	gap: 10px;
	padding: 20px 25px;
	border-top: 1px solid #e0e0e0;
	background: #f8f9fa;
	border-radius: 0 0 8px 8px;
}

.og-modal-footer .og-button {
	display: flex;
	align-items: center;
	gap: 6px;
}

.og-button-secondary {
	background: #6c757d;
	color: #fff;
}

.og-button-secondary:hover {
	background: #5a6268;
}

.og-button-secondary:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.og-modal-footer .og-button-primary {
	margin-left: auto;
}

/* Modal animations */
@keyframes og-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes og-slide-up {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Prevent body scroll when modal is open */
body.og-modal-open {
	overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.og-modal {
		padding: 10px;
	}

	.og-modal-container {
		max-height: 95vh;
	}

	.og-modal-header,
	.og-modal-body,
	.og-modal-footer {
		padding: 15px;
	}

	.og-modal-warning {
		padding: 12px 15px;
	}

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

	.og-modal-footer {
		flex-wrap: wrap;
	}

	.og-modal-footer .og-button {
		flex: 1;
		min-width: calc(50% - 5px);
	}

	.og-modal-footer .og-button-primary {
		margin-left: 0;
		flex-basis: 100%;
	}
}
