/**
 * Estilos para o frontend do plugin Checklist Casa de Praia
 */

/* Reset e base */
.checklist-casa-praia-container * {
	box-sizing: border-box;
}

.checklist-casa-praia-container {
	font-family: inherit;
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
}

/* Header de progresso */
.checklist-progress-header {
	background: linear-gradient(135deg, #20B2AA, #45ABA5);
	color: white;
	padding: 25px;
	border-radius: 15px;
	margin-bottom: 30px;
	text-align: center;
}

/* Ações de progresso */
.progresso-actions {
	margin-bottom: 20px;
	text-align: center;
}

.btn-voltar-itens {
	display: inline-block;
	background: rgba(255,255,255,0.2);
	color: white;
	padding: 12px 24px;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
	border: 2px solid rgba(255,255,255,0.3);
}

.btn-voltar-itens:hover {
	background: rgba(255,255,255,0.3);
	border-color: rgba(255,255,255,0.5);
	color: white;
	text-decoration: none;
	transform: translateY(-2px);
}

.checklist-progress-header h3 {
	margin: 0 0 15px 0;
	font-size: 1.8em;
	font-weight: 300;
}

.progress-bar-container {
	position: relative;
	background: rgba(255,255,255,0.2);
	height: 30px;
	border-radius: 15px;
	overflow: hidden;
}

.progress-bar {
	height: 100%;
	background: rgba(255,255,255,0.9);
	transition: width 0.5s ease;
	border-radius: 15px;
}

.progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 600;
	color: #333;
	font-size: 0.9em;
}

/* Itens do checklist */
.checklist-items {
	margin-bottom: 30px;
}

.checklist-category {
	margin-bottom: 30px;
}

.category-title {
	background: #f8f9fa;
	padding: 15px 20px;
	margin: 0 0 15px 0;
	border-radius: 10px;
	font-size: 1.3em;
	color: #333;
	border-left: 4px solid #20B2AA;
}

.category-items {
	display: grid;
	gap: 15px;
}

.checklist-item {
	background: white;
	border: 2px solid #e1e1e1;
	border-radius: 10px;
	padding: 20px;
	transition: all 0.3s ease;
}

.checklist-item:hover {
	border-color: #20B2AA;
	box-shadow: 0 4px 12px rgba(32, 178, 170, 0.1);
}

.checklist-item.completed {
	border-color: #28a745;
	background: #f8fff8;
}

.item-header {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	margin-bottom: 10px;
}

.item-checkbox {
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
}

.item-checkbox input[type="checkbox"] {
	opacity: 0;
	position: absolute;
}

.checkmark {
	display: block;
	width: 24px;
	height: 24px;
	border: 2px solid #ddd;
	border-radius: 4px;
	background: white;
	transition: all 0.3s ease;
	position: relative;
}

.item-checkbox input[type="checkbox"]:checked + .checkmark {
	background: #28a745;
	border-color: #28a745;
}

.item-checkbox input[type="checkbox"]:checked + .checkmark::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-weight: bold;
	font-size: 14px;
}

.item-title {
	margin: 0;
	font-size: 1.2em;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
}

.item-description {
	color: #666;
	margin: 10px 0;
	line-height: 1.5;
}

.item-status {
	margin-top: 10px;
}

.status-indicator {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
}

.status-pendente {
	background: #fff3cd;
	color: #856404;
}

.status-concluido {
	background: #d4edda;
	color: #155724;
}

.status-em-andamento {
	background: #d1ecf1;
	color: #0c5460;
}

/* Ações */
.checklist-actions {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin: 30px 0;
}

.checklist-btn {
	background: #20B2AA;
	color: white;
	border: none;
	padding: 12px 25px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.checklist-btn:hover {
	background: #45ABA5;
	color: white;
}

.checklist-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.checklist-btn-secondary {
	background: #6c757d;
}

.checklist-btn-secondary:hover {
	background: #5a6268;
}

/* Mensagens */
.checklist-messages {
	margin: 20px 0;
}

.checklist-message {
	padding: 15px;
	border-radius: 8px;
	margin: 10px 0;
	font-weight: 500;
	text-align: center;
}

.checklist-message.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.checklist-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Formulário */
.checklist-formulario-container {
	max-width: 600px;
	margin: 0 auto;
	padding: 30px;
	background: white;
	border-radius: 15px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.formulario-header {
	text-align: center;
	margin-bottom: 30px;
}

.formulario-header h3 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 1.8em;
}

.formulario-header p {
	margin: 0;
	color: #666;
}

.checklist-formulario {
	display: grid;
	gap: 20px;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.form-group input {
	padding: 12px;
	border: 2px solid #e1e1e1;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s;
}

.form-group input:focus {
	outline: none;
	border-color: #20B2AA;
}

.btn-submit {
	background: #20B2AA;
	color: white;
	border: none;
	padding: 15px 30px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.btn-submit:hover {
	background: #45ABA5;
}

.btn-submit:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.form-messages {
	margin-top: 20px;
}

/* Progresso */
.progresso-checklist-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

.progresso-header {
	text-align: center;
	margin-bottom: 30px;
}

.progresso-header h3 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 1.8em;
}

.progresso-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.stat-item {
	background: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	text-align: center;
}

.stat-number {
	display: block;
	font-size: 2em;
	font-weight: bold;
	color: #20B2AA;
	margin-bottom: 5px;
}

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

.progresso-chart {
	background: white;
	padding: 25px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	margin-bottom: 30px;
}

.chart-bar {
	background: #f8f9fa;
	height: 20px;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 10px;
}

.chart-fill {
	height: 100%;
	background: linear-gradient(90deg, #20B2AA, #45ABA5);
	transition: width 0.5s ease;
	border-radius: 10px;
}

.chart-text {
	text-align: center;
	font-weight: 600;
	color: #333;
}

.progresso-details {
	display: grid;
	gap: 25px;
}

.progresso-category {
	background: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progresso-category h4 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 1.2em;
	border-bottom: 2px solid #e1e1e1;
	padding-bottom: 10px;
}

.category-progress {
	display: grid;
	gap: 10px;
}

.progress-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 6px;
}

.item-title {
	font-weight: 500;
	color: #333;
}

.item-status {
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
}

.item-date {
	font-size: 0.8em;
	color: #666;
}

/* Loading */
.checklist-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
}

.checklist-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #20B2AA;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

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

/* Responsivo */
@media (max-width: 768px) {
	.checklist-casa-praia-container {
		padding: 15px;
	}
	
	.progresso-stats {
		grid-template-columns: 1fr;
	}
	
	.checklist-actions {
		flex-direction: column;
		align-items: stretch;
	}
	
	.progress-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}
	
	.checklist-formulario-container {
		padding: 20px;
		margin: 10px;
	}
}

/* Animações */
.checklist-item {
	animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.checklist-item.completed {
	animation: pulse 0.5s ease;
}

@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.02); }
	100% { transform: scale(1); }
}
