/* Global Styling */
body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	color: #0F3248;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
	color: #0F3248;
}

/* Text elements */
p, li, span, label {
	color: #0F3248;
}

/* Table text */
table td, table th {
	color: #0F3248;
}

/* Override for white header text */
table.minimalistBlack thead th,
table.minimalistBlack thead th *,
table.minimalistBlack > thead > tr > th,
table.minimalistBlack > thead > tr > th * {
	color: #FFFFFF !important;
}

nav {
	background: #0F3248 !important;
	color: #fff;
	padding: 5px 15px !important;
	display: flex;
	gap: 20px;
	align-items: center;
	min-height: 60px;
	text-align: left !important;
}

.nav-logo {
	height: 60px !important;
	width: auto !important;
	margin-right: 20px;
	display: block;
}

nav a {
	color: white;
	text-decoration: none;
	font-size: 16px;
	vertical-align: middle;
}

/* Client Branding in Navbar */
.nav-client-branding {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.client-logo {
	height: 40px;
	max-width: 120px;
	object-fit: contain;
}

.client-name {
	color: white;
	font-weight: 500;
	font-size: 14px;
}

/* Dropdown Menu Styling */
.dropdown {
	position: relative;
	display: inline-block;
}

.dropdown .dropbtn {
	color: white;
	text-decoration: none;
	font-size: 16px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px 5px;
	display: inline-block;
}

.dropdown-content {
	display: none;
	position: absolute;
	background-color: #0F3248;
	min-width: 200px;
	box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
	z-index: 1000;
	top: 100%;
	left: 0;
	margin-top: 0;
	padding-top: 0;
}

.dropdown-content a {
	color: white;
	padding: 10px 16px;
	text-decoration: none;
	display: block;
	font-size: 14px;
}

.dropdown-content a:hover {
	background-color: #1A5D6E;
}

.dropdown:hover .dropdown-content {
	display: block;
}

.dropdown:hover .dropbtn {
	color: #1A5D6E;
	background-color: #0F3248;
}

.container {
	padding: 10px;
}

/* Header Actions */
.header-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

/* Table Styling */
.table-responsive {
	overflow-x: auto;
	/* Makes the table scrollable horizontally on small screens */
}

table.minimalistBlack {
	border: 3px solid #000000;
	width: 100%;
	text-align: left;
	border-collapse: collapse;
}

table.minimalistBlack td,
table.minimalistBlack th {
	border: 1px solid #000000;
	padding: 5px;
	font-size: 13px;
}

table.minimalistBlack tbody td {
	font-size: 12px;
}

table.minimalistBlack thead {
	background: #0F3248;
	border-bottom: 3px solid #000000;
}

table.minimalistBlack thead th {
	font-size: 13px;
	font-weight: bold;
	color: #FFFFFF;
	text-align: left;
}

/* Buttons */
.test-button {
	display: inline-block;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: bold;
	color: #0F3248;
	text-align: center;
	text-decoration: none;
	background-color: #cfcfcf;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.test-button:hover {
	background-color: #0056b3;
	color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.header-actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}

	.test-button {
		font-size: 12px;
		padding: 4px 6px;
	}

	table.minimalistBlack td,
	table.minimalistBlack th {
		padding: 4px;
		font-size: 6px;
	}

	table.minimalistBlack thead th {
		font-size: 12px;
	}
}

/* Delete Confirmation Page Styling */
.confirm-delete-box {
	max-width: 600px;
	margin: 20px auto;
	padding: 30px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.confirm-delete-box p {
	font-size: 18px;
	margin-bottom: 20px;
	color: #0F3248;
}

.confirm-delete-box .button-group {
	display: flex;
	gap: 15px;
	margin-top: 20px;
}

.confirm-delete-box .delete-button {
	background-color: #dc3545;
	color: white;
	border: none;
}

.confirm-delete-box .delete-button:hover {
	background-color: #c82333;
}

/* Bulk Action Bar Styling */
.bulk-action-bar {
	background: #1A5D6E;
	color: white;
	padding: 12px 20px;
	margin-bottom: 15px;
	border-radius: 5px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-action-info {
	font-weight: 500;
	font-size: 14px;
}

.bulk-action-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.bulk-action-buttons .test-button {
	padding: 6px 12px;
	font-size: 13px;
}

/* Modal Overlay Styling */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.modal-content {
	background: white;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
	background: #1A5D6E;
	color: white;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h3 {
	margin: 0;
	font-size: 18px;
}

.modal-close {
	background: none;
	border: none;
	color: white;
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

.modal-close:hover {
	opacity: 0.8;
}

.modal-body {
	padding: 20px;
	max-height: 400px;
	overflow-y: auto;
}

.modal-footer {
	padding: 15px 20px;
	background: #f5f5f5;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	border-top: 1px solid #ddd;
}

.selected-documents-summary {
	margin-bottom: 20px;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #eee;
}

.selected-documents-summary ul {
	margin: 10px 0 0 0;
	font-size: 13px;
	color: #0F3248;
}

.selected-documents-summary li {
	margin-bottom: 4px;
}

/* Checkbox column styling */
.select-checkbox {
	text-align: center !important;
	vertical-align: middle !important;
}

.document-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

#selectAll {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

/* ===============================================
   READ-ONLY MODE STYLES (Phase 9: License Enforcement)
   =============================================== */

/* Read-only banner styling */
.read-only-banner {
	background-color: #f8d7da;
	color: #721c24;
	padding: 10px 15px;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	margin-bottom: 15px;
	text-align: center;
}

/* License warning in navbar */
.nav-license-warning {
	background-color: #dc3545;
	color: white;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: bold;
	margin-left: 10px;
	animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* Disabled button state for read-only mode */
body.read-only-mode .write-action,
body.read-only-mode .btn-create,
body.read-only-mode .btn-edit,
body.read-only-mode .btn-delete,
body.read-only-mode .btn-duplicate,
body.read-only-mode button[type="submit"]:not(.read-allowed) {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* Visual indicator for disabled actions */
body.read-only-mode .write-action::after,
body.read-only-mode .btn-create::after,
body.read-only-mode .btn-edit::after,
body.read-only-mode .btn-delete::after {
	content: " (disabled)";
	font-size: 0.8em;
	opacity: 0.7;
}

/* Hide entire action buttons/links in read-only mode */
body.read-only-mode .write-action-hide {
	display: none !important;
}

/* Style for read-only tooltip */
.read-only-tooltip {
	position: relative;
}

.read-only-tooltip::before {
	content: "License expired - action disabled";
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: white;
	padding: 5px 10px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s;
}

body.read-only-mode .read-only-tooltip:hover::before {
	opacity: 1;
	visibility: visible;
}