﻿html, body
{
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: #f8f9fa;
	font-family: Arial, sans-serif;
	display: flex;
	flex-direction: column;
}

	body > header,
	body > nav
	{
		flex-shrink: 0;
	}

.main-content
{
	flex: 1;
	display: flex;
	justify-content: center;
	padding: 20px;
}

.content
{
	width: 100%;
	max-width: 800px;
	background: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	text-align: left;
	min-height: 0; /* Zorgt dat content mag krimpen bij veel items */
	overflow-y: auto; /* Scrollbar binnen de witte box */
	max-height: 100%;
	display: flex;
	flex-direction: column;
}

.header
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 20px;
	background-color: #343a40;
	color: white;
}

.header-left
{
	font-size: 1.4rem;
	font-weight: bold;
}

.header-actions
{
	display: flex;
	align-items: center;
}

.user-info
{
	font-size: 14px;
	padding-right: 8px;
}

.logout-form
{
	display: inline;
	margin: 0;
}

.logout-btn
{
	background-color: #dc3545;
	color: white;
	border: none;
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
	text-decoration: none;
}

	.logout-btn:hover
	{
		background-color: #c82333;
	}

.navigation
{
	background-color: #f8f9fa;
	padding: 12px;
	text-align: center;
	border-bottom: 1px solid #dee2e6;
}

	.navigation a
	{
		margin: 0 15px;
		font-weight: bold;
		color: #007bff;
	}

		.navigation a:hover
		{
			text-decoration: underline;
		}

h1
{
	margin-top: 0;
	color: #333;
}

form
{
	display: flex;
	flex-direction: column;
	gap: 12px;
}

input[type="email"],
input[type="password"],
input[type="text"]
{
	padding: 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px;
}

.add-domain-form
{
	margin-top: 20px;
}

.input-group
{
	display: flex;
	gap: 12px;
	align-items: stretch;
	max-width: 600px;
}

.domain-input
{
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px;
	min-width: 300px;
}

	.domain-input:focus
	{
		outline: none;
		border-color: #007bff;
		box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
	}

.add-button
{
	padding: 12px 24px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
	white-space: nowrap;
}

	.add-button:hover
	{
		background-color: #0056b3;
	}

button
{
	padding: 12px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	cursor: pointer;
}

	button:hover
	{
		background-color: #0056b3;
	}

a
{
	color: #007bff;
	text-decoration: none;
}

	a:hover
	{
		text-decoration: underline;
	}

.text-success
{
	display: block;
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	margin-bottom: 1rem;
}

.text-danger
{
	display: block;
	background-color: #f8d7da;
	border: 1px solid #f5c2c7;
	color: #842029;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	width: 100%;
	box-sizing: border-box;
	text-align: left;
	margin-bottom: 1rem;
}

	.text-danger ul
	{
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.text-danger li
	{
		margin-bottom: 0.5rem;
		font-size: 0.95rem;
		line-height: 1.4;
	}

		.text-danger li:last-child
		{
			margin-bottom: 0;
		}

.checkbox-container
{
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0;
	font-size: 14px;
	cursor: pointer;
}

	.checkbox-container input[type="checkbox"]
	{
		appearance: none;
		width: 18px;
		height: 18px;
		border: 2px solid #ccc;
		border-radius: 4px;
		background-color: white;
		position: relative;
		flex-shrink: 0;
	}

		.checkbox-container input[type="checkbox"]:checked
		{
			background-color: #007bff;
			border-color: #007bff;
		}

			.checkbox-container input[type="checkbox"]:checked::after
			{
				content: "✓";
				color: white;
				font-weight: bold;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				font-size: 14px;
			}

	.checkbox-container label
	{
		color: #333;
		user-select: none;
	}

	.checkbox-container input[type="checkbox"]:focus-visible
	{
		outline: 2px solid #007bff;
		outline-offset: 2px;
	}

table
{
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

th, td
{
	border: 1px solid #ddd;
	padding: 8px;
	text-align: left;
}

th
{
	background-color: #f2f2f2;
}

code
{
	background-color: #f1f1f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 90%;
}

.dashboard-summary
{
	background-color: #e9ecef;
	padding: 15px;
	border-radius: 6px;
	margin: 20px 0;
}

/* Table columns voor compacte weergave */
.status-col
{
	width: 1%;
	white-space: nowrap;
	text-align: center;
}

.actions-col
{
	width: 100px;
	min-width: 100px;
	text-align: center;
	white-space: nowrap;
}

.status-cell,
.actions-cell
{
	vertical-align: middle;
	padding: 8px 4px !important;
}

.toggle-form,
.action-form
{
	display: inline-block;
	margin: 0;
	padding: 0;
}

.actions-cell > *
{
	display: inline-flex;
	margin: 0 6px;
}

/* Toggle button - clean zonder border */
.btn-toggle
{
	padding: 7px 12px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	min-width: 76px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
}

.btn-enabled
{
	background-color: #28a745;
	color: white;
}

.btn-disabled
{
	background-color: #6c757d;
	color: white;
}

.btn-toggle:hover
{
	opacity: 0.92;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

.btn-toggle:active
{
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-toggle:focus
{
	outline: none;
	box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* Delete & Edit buttons */
.btn-delete
{
	background: none;
	border: none;
	color: #dc3545;
	font-size: 22px;
	font-weight: bold;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

	.btn-delete:hover
	{
		background-color: #f8d7da;
		color: #c82333;
	}

.btn-edit
{
	color: #007bff;
	font-size: 19px;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	border-radius: 4px;
}

	.btn-edit:hover
	{
		background-color: #e7f3ff;
		color: #0056b3;
	}

/* API Key cel styling - responsive */
.key-cell
{
	position: relative;
	font-family: monospace;
	font-size: 15px;
	white-space: nowrap;
	padding: 8px 0;
}

.key-container
{
	display: inline-block;
	padding: 8px 48px 8px 12px;
	background-color: #f1f1f1;
	border-radius: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
	min-width: 180px;
	max-width: 220px;
}

.key-hidden,
.key-visible
{
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.btn-reveal,
.btn-copy
{
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

.btn-reveal
{
	right: 44px;
}

.btn-copy
{
	right: 8px;
}

	.btn-reveal:hover,
	.btn-copy:hover
	{
		background-color: #e0e0e0;
	}

.copy-feedback
{
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 20px;
	color: #28a745;
}

/* Media queries */
@media (max-width: 768px)
{
	.header
	{
		padding: 10px 15px;
	}

	.user-info
	{
		font-size: 13px;
	}

	.logout-btn
	{
		padding: 6px 10px;
		font-size: 13px;
	}

	.main-content
	{
		padding: 10px;
	}

	.content
	{
		padding: 20px;
	}

	table
	{
		font-size: 14px;
	}

	.input-group
	{
		flex-direction: column;
	}

	.domain-input
	{
		min-width: auto;
	}

	.add-button
	{
		align-self: flex-start;
	}

	/* Mobiel: toggle button kleiner */
	.btn-toggle
	{
		padding: 6px 10px;
		min-width: 68px;
		font-size: 13px;
	}

	/* Mobiel: key container smaller */
	.key-container
	{
		min-width: 160px;
		max-width: 200px;
	}

	.btn-reveal,
	.btn-copy
	{
		width: 32px;
		height: 32px;
		font-size: 17px;
	}

	.btn-reveal
	{
		right: 40px;
	}

	/* Desktop overrides */
	@media (min-width: 768px)
	{
		.key-container
		{
			min-width: 280px;
			max-width: 300px;
		}
	}
}
