/* Frontend CSS - Zadania */

.believe-tasks-container {
	background: #fff;
	border: 1px solid #e6eaf0;
	border-radius: 10px;
	padding: 24px;
	margin: 24px 0;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.believe-tasks-container h2 {
	margin-top: 0;
	color: #333;
	font-size: 24px;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

/* Formularz tworzenia zadania */
.believe-tasks-create-form {
	background: #f0f8ff;
	border-left: 4px solid #4CAF50;
	padding: 20px;
	margin-bottom: 30px;
	border-radius: 3px;
}

.believe-tasks-create-form h3 {
	margin-top: 0;
	color: #2c3e50;
	font-size: 18px;
	margin-bottom: 15px;
}

.believe-tasks-form .form-group {
	margin-bottom: 15px;
}

.believe-tasks-form label {
	display: block;
	font-weight: bold;
	margin-bottom: 5px;
	color: #333;
	font-size: 14px;
}

.believe-tasks-form .form-control {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
	font-family: inherit;
}

.believe-tasks-form .form-control:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.believe-tasks-form .form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.believe-tasks-form .form-col {
	margin-bottom: 0;
}

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

.users-checkboxes {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	padding: 10px;
	background: #f5f5f5;
	border-radius: 3px;
}

.user-checkbox {
	display: flex;
	align-items: center;
	padding: 8px;
	cursor: pointer;
	border-radius: 3px;
	transition: background 0.2s;
}

.user-checkbox:hover {
	background: #e8e8e8;
}

.user-checkbox input[type="checkbox"] {
	margin-right: 8px;
	cursor: pointer;
	width: 18px;
	height: 18px;
}

.believe-tasks-form button {
	background: #4CAF50;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 3px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: background 0.3s;
}

.believe-tasks-form button:hover {
	background: #45a049;
}

.btn {
	display: inline-block;
	padding: 10px 16px;
	text-align: center;
	text-decoration: none;
	border-radius: 3px;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.3s;
}

.btn-primary {
	background: #0073aa;
	color: white;
	border: 1px solid #0073aa;
}

.btn-primary:hover {
	background: #005a87;
	border-color: #005a87;
}

/* Filtry */
.believe-tasks-filters {
	margin: 20px 0;
	padding: 15px;
	background: #f9f9f9;
	border-left: 4px solid #0073aa;
	border-radius: 3px;
}

.believe-tasks-filters label {
	display: inline-block;
	margin-right: 10px;
	font-weight: bold;
	color: #333;
}

.believe-tasks-filters select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: white;
	cursor: pointer;
}

/* Tabela zadań */
.believe-tasks-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
}

.believe-tasks-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

/* Mobile/Desktop views */
.believe-tasks-mobile-view {
	display: none;
}

.believe-tasks-desktop-view {
	display: block;
}

.believe-tasks-table thead {
	background: #f1f1f1;
}

.believe-tasks-table th {
	padding: 12px;
	text-align: left;
	font-weight: bold;
	border-bottom: 2px solid #ddd;
	color: #333;
}

.believe-tasks-table td {
	padding: 12px;
	border-bottom: 1px solid #eee;
}

.believe-tasks-table tbody tr:hover {
	background: #f9f9f9;
}

/* Status badges */
.status-badge {
	display: inline-block;
	padding: 5px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: bold;
	white-space: nowrap;
}

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

.status-in-progress {
	background: #cfe2ff;
	color: #084298;
}

.status-done {
	background: #d1e7dd;
	color: #0f5132;
}

.status-blocked {
	background: #f8d7da;
	color: #842029;
}

/* Pusta lista */
.believe-tasks-empty {
	text-align: center;
	color: #999;
	padding: 30px;
	font-style: italic;
}

/* Success message */
.believe-tasks-success {
	background: #d1e7dd;
	color: #0f5132;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid #badbcc;
	margin-bottom: 20px;
	font-weight: bold;
}

/* Error */
.believe-tasks-error {
	background: #f8d7da;
	color: #842029;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid #f5c2c7;
	margin-bottom: 20px;
}

/* Widok pojedynczego zadania */
.believe-tasks-single {
	max-width: 960px;
}

.believe-tasks-single h3 {
	margin-top: 0;
	border-bottom: 1px solid #e6e6e6;
	padding-bottom: 8px;
	color: #2c3e50;
}

/* Wszystkie szczegóły w jednej sekcji */
.task-all-details h3 {
	font-size: 20px;
	margin-bottom: 16px;
	color: #2c3e50;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

.task-details-compact {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.task-details-compact .task-detail-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 12px;
	background: #f8f9fa;
	border-radius: 6px;
	border-left: 3px solid #0073aa;
}

.task-details-compact .task-detail-row .label {
	font-weight: 600;
	color: #555;
	font-size: 14px;
}

.task-details-compact .task-detail-row .value {
	color: #333;
	font-size: 14px;
	text-align: right;
}

.task-description-inline {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e6e6e6;
}

.task-description-inline h4 {
	font-size: 16px;
	margin-bottom: 10px;
	color: #555;
	font-weight: 600;
}

.task-description-inline p {
	margin: 10px 0;
	line-height: 1.6;
	color: #555;
}

.task-attachments-inline {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e6e6e6;
}

.task-attachments-inline h4 {
	font-size: 16px;
	margin-bottom: 10px;
	color: #555;
	font-weight: 600;
}

.task-section {
	background: #ffffff;
	border: 1px solid #e3e8ef;
	border-radius: 12px;
	padding: 20px;
	margin-top: 18px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.believe-tasks-attachments {
	margin: 0;
	padding-left: 18px;
}

.believe-tasks-attachments li {
	margin-bottom: 6px;
}

.task-comment {
	border: 1px solid #e6eaf0;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 14px;
	background: #fff;
}

.task-comment-meta {
	font-size: 12px;
	color: #6b7280;
	margin-bottom: 8px;
}

.task-comment-attachments a {
	display: inline-block;
	margin-right: 8px;
	margin-top: 6px;
}

.task-edit-form .hint {
	font-size: 12px;
	color: #6b7280;
	margin-top: 6px;
}

.believe-tasks-single h2 {
	color: #2c3e50;
	margin-top: 20px;
}

.task-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
	padding: 18px;
	border-radius: 12px;
	border: 1px solid #e7edf5;
	margin: 18px 0;
}

.task-detail-row {
	display: flex;
	flex-direction: column;
}

.task-detail-row .label {
	font-weight: bold;
	color: #333;
	margin-bottom: 5px;
	font-size: 14px;
}

.task-detail-row .value {
	color: #475569;
	padding: 10px 12px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e6eaf0;
}

.task-description p {
	margin: 10px 0;
	line-height: 1.6;
	color: #555;
}

.task-edit-form .form-group {
	margin-bottom: 15px;
}

.task-edit-form label {
	display: block;
	font-weight: bold;
	margin-bottom: 5px;
	color: #333;
}

.task-edit-form .form-control {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
}

.btn {
	display: inline-block;
	padding: 10px 15px;
	margin: 5px 5px 5px 0;
	background-color: #0073aa;
	color: white;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.2s;
}

.btn:hover {
	background-color: #005a87;
	color: white;
	text-decoration: none;
}

.btn-primary {
	background-color: #4CAF50;
}

.btn-primary:hover {
	background-color: #45a049;
}

.btn-secondary {
	background-color: #757575;
}

.btn-secondary:hover {
	background-color: #616161;
}

.btn-info {
	background-color: #2196F3;
}

.btn-info:hover {
	background-color: #0b7dda;
}

.task-header-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.task-edit-form.is-collapsed {
	display: none;
}

.btn-sm {
	padding: 5px 10px;
	font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
	.believe-tasks-table {
		font-size: 12px;
	}

	.believe-tasks-table th,
	.believe-tasks-table td {
		padding: 8px;
	}

	.believe-tasks-filters {
		flex-direction: column;
	}

	.believe-tasks-filters label {
		display: block;
		margin-bottom: 5px;
		margin-right: 0;
	}

	.believe-tasks-filters select {
		width: 100%;
		margin-bottom: 10px;
	}

	.believe-tasks-form .form-row {
		grid-template-columns: 1fr;
	}

	.task-details-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.believe-tasks-desktop-view {
		display: none !important;
	}

	.believe-tasks-mobile-view {
		display: block !important;
	}

	.task-card {
		background: #fff;
		border: 1px solid #e6eaf0;
		border-radius: 12px;
		padding: 14px;
		margin-bottom: 12px;
		box-shadow: 0 2px 6px rgba(0,0,0,0.04);
	}

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

	.task-card-header h4 {
		margin: 0;
		font-size: 15px;
		font-weight: 600;
		color: #2c3e50;
		flex: 1;
	}

	.task-card-body {
		margin: 10px 0;
	}

	.task-card-row {
		display: flex;
		justify-content: space-between;
		margin-bottom: 8px;
		font-size: 13px;
	}

	.task-card-row .label {
		font-weight: 600;
		color: #555;
	}

	.task-card-row .value {
		color: #666;
		text-align: right;
	}

	.task-card-footer {
		margin-top: 12px;
		padding-top: 12px;
		border-top: 1px solid #f0f0f0;
	}

	.task-card-footer .btn {
		width: 100%;
		text-align: center;
	}

	.believe-tasks-container {
		border-radius: 12px;
		padding: 16px;
		margin: 14px 0;
		box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	}

	.believe-tasks-table {
		display: block;
		width: 100%;
		overflow-x: auto;
		table-layout: fixed;
	}

	.believe-tasks-table th,
	.believe-tasks-table td {
		white-space: normal;
		word-break: break-word;
	}

	.believe-tasks-container h2 {
		font-size: 20px;
		padding-bottom: 8px;
	}

	.believe-tasks-single {
		max-width: 100%;
	}

	.task-header-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.btn,
	.believe-tasks-form button {
		width: 100%;
		padding: 10px 12px;
		font-size: 14px;
	}

	.task-section {
		padding: 14px;
		border-radius: 10px;
	}

	.task-details-grid {
		gap: 10px;
		padding: 12px;
	}

	.task-detail-row .value {
		padding: 8px 10px;
		font-size: 13px;
	}

	.task-comment {
		padding: 10px;
		border-radius: 8px;
	}

	.task-comment-meta {
		font-size: 11px;
	}

	.believe-tasks-form .form-control,
	.task-edit-form .form-control,
	.believe-tasks-comment-form .form-control {
		font-size: 14px;
		padding: 10px;
	}

	.users-checkboxes {
		grid-template-columns: 1fr;
		gap: 6px;
	}
}
