/* Polisfigurant Plugin Frontend Styles */

#top .fullsize .template-blog .post .entry-content-wrapper > * {
	max-width: 50em;
}

.ovningstid-ansvarig-larare,
.ovning-ansvarig-larare {
	margin-bottom: 5px;
}

/* Additional styling for shortcode */
.polisfigurant-shortcode {
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	margin: 20px 0;
}

/* Contact Form Styles */
.polisfigurant-contact-form {
	max-width: 800px;
	margin: 20px auto;
	padding: 20px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.polisfigurant-contact-form h3 {
	color: #333;
	margin-bottom: 20px;
	text-align: center;
}

.polisfigurant-form .form-section {
	margin-bottom: 30px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 6px;
}

.polisfigurant-form .form-section h4 {
	color: #495057;
	margin: 0 0 15px 0;
	border-bottom: 2px solid #2a4765;
	padding-bottom: 5px;
}

.polisfigurant-form .form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.polisfigurant-form .form-field {
	flex: 1;
	margin-bottom: 15px;
}

.polisfigurant-form .form-field label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #495057;
}

.polisfigurant-form .form-field input,
.polisfigurant-form .form-field select,
.polisfigurant-form .form-field textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.polisfigurant-form .form-field input:focus,
.polisfigurant-form .form-field select:focus,
.polisfigurant-form .form-field textarea:focus {
	outline: none;
	border-color: #2a4765;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.polisfigurant-form .form-field textarea {
	resize: vertical;
	min-height: 80px;
}

.polisfigurant-form .form-submit {
	text-align: center;
	margin-top: 30px;
}

.polisfigurant-form .submit-btn {
	background: #2a4765;
	color: white;
	padding: 12px 30px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

.polisfigurant-form .submit-btn:hover {
	background: #005177;
}

.polisfigurant-form-success {
	max-width: 600px;
	margin: 20px auto;
	padding: 20px;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 6px;
	text-align: center;
}

.polisfigurant-form-success h3 {
	color: #155724;
	margin-bottom: 10px;
}

.polisfigurant-form-success p {
	color: #155724;
	margin: 0;
}

#rollkort-loading {
	color: #6c757d;
	font-style: italic;
	margin-top: 5px;
}

#rollkort-checkboxes input {
	width: 1.5rem;
	padding: 0;
}

.polisfigurant-form .form-field select:disabled {
	background-color: #f8f9fa;
	color: #6c757d;
}

/* Checkbox group styles */
.checkbox-group {
	border: 1px solid #ced4da;
	border-radius: 4px;
	padding: 10px;
	background: white;
	max-height: 200px;
	overflow-y: auto;
}

.checkbox-group.disabled {
	background-color: #f8f9fa;
	color: #6c757d;
}

.checkbox-item {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	padding: 5px;
	border-radius: 3px;
	transition: background-color 0.2s;
}

.checkbox-item:hover {
	background-color: #f8f9fa;
}

.checkbox-item:last-child {
	margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
	margin: 0 10px 0 0;
	width: auto;
	flex-shrink: 0;
}

.checkbox-item label {
	margin: 0;
	cursor: pointer;
	flex: 1;
	font-weight: normal;
}

.checkbox-group .no-selection,
.checkbox-group .loading,
.checkbox-group .error {
	text-align: center;
	padding: 20px;
	margin: 0;
	font-style: italic;
}

.checkbox-group .error {
	color: #dc3545;
}

.checkbox-group .loading {
	color: #6c757d;
}

/* Rollkort option specific styling */
.rollkort-option {
	display: flex !important;
	align-items: center;
	margin-bottom: 8px !important;
	padding: 8px !important;
	border-radius: 4px;
	transition: background-color 0.2s;
	cursor: pointer;
	border: 1px solid transparent;
}

.rollkort-option:hover {
	background-color: #f8f9fa;
	border-color: #0073aa;
}

.rollkort-option input[type="checkbox"] {
	margin: 0 12px 0 0 !important;
	width: auto !important;
	height: auto !important;
	padding: 0 !important;
	flex-shrink: 0;
}

.rollkort-option span {
	font-weight: normal !important;
	color: #333;
	line-height: 1.4;
	word-wrap: break-word;
}

.no-rollkort {
	text-align: center;
	padding: 20px;
	color: #6c757d;
	font-style: italic;
	margin: 0 !important;
}

/* Form field headers */
.polisfigurant-form .form-field h5 {
	margin: 0 0 10px 0;
	font-size: 14px;
	font-weight: 600;
	color: #495057;
}

/* User Profile Styles */
.polisfigurant-user-profile {
	max-width: 800px;
	margin: 20px auto;
	padding: 20px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.polisfigurant-user-profile .profile-actions {
	text-align: right;
	margin-bottom: 20px;
}

.polisfigurant-user-profile .profile-actions .button {
	background: #2a4765;
	color: white;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
}

.polisfigurant-user-profile .profile-actions .button:hover {
	background: #005177;
	color: white;
}

.polisfigurant-user-profile h3 {
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
	margin-bottom: 20px;
}

.user-info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.info-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 6px;
	border-left: 4px solid #0073aa;
}

.info-section h4 {
	color: #495057;
	margin: 0 0 15px 0;
	font-size: 16px;
}

.info-section p {
	margin: 8px 0;
	color: #495057;
}

.info-section p strong {
	color: #333;
}

/* Responsive design for form */
@media (max-width: 768px) {
	.polisfigurant-contact-form {
		margin: 10px;
		padding: 15px;
	}

	.polisfigurant-form .form-row {
		flex-direction: column;
		gap: 0;
	}

	.polisfigurant-form .form-section {
		padding: 15px;
	}

	/* Responsive design for user profile */
	.polisfigurant-user-profile {
		margin: 10px;
		padding: 15px;
	}

	.user-info-grid {
		grid-template-columns: 1fr;
	}

	.info-section {
		padding: 15px;
	}
}

.ovning-ansvarig-larare {
	font-size: 1rem;
}

.ovning-rollkort-links h2 {
	font-size: 1.5rem !important;
}

/* Assignment confirmation styling */
.assignment-confirmation {
	background: #f9f9f9;
	border: 1px solid #e1e1e1;
	border-radius: 5px;
	padding: 15px;
	margin-top: 15px;
}

.confirmation-buttons {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.confirm-btn {
	background-color: #00a32a;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.3s;
}

.confirm-btn:hover {
	background-color: #008a20;
}

.decline-btn {
	background-color: #d63638;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.3s;
}

.decline-btn:hover {
	background-color: #b32929;
}

.polisfigurant-decline-success {
	background-color: #fff2cc;
	border: 1px solid #d4a60a;
	border-radius: 4px;
	padding: 15px;
	margin-bottom: 20px;
}

.polisfigurant-decline-success h3 {
	color: #b7670a;
	margin-top: 0;
}

@media (max-width: 768px) {
	.confirmation-buttons {
		flex-direction: column;
	}

	.confirm-btn,
	.decline-btn {
		width: 100%;
		margin-bottom: 5px;
	}
}

/* Assignment confirmation styles */
.polisfigurant-user-assignments {
	margin: 20px 0;
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.polisfigurant-user-assignments h3 {
	color: #333;
	font-size: 1.5rem;
	margin-bottom: 20px;
}

.assignments-list {
	margin: 20px 0;
}

.assignment-item {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.assignment-item h4 {
	color: #0073aa;
	font-size: 1.25rem;
	margin: 0 0 15px 0;
}

.assignment-item p {
	margin: 8px 0;
	font-size: 1rem;
}

.assignment-confirmation {
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 6px;
	padding: 15px;
	margin-top: 15px;
}

.assignment-confirmation p {
	margin: 0 0 15px 0;
	color: #856404;
	font-weight: 500;
}

.confirm-assignment-btn {
	background: #28a745;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.3s;
}

.confirm-assignment-btn:hover {
	background: #218838;
}

.polisfigurant-confirmation-success {
	background: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
	padding: 15px;
	border-radius: 6px;
	margin: 20px 0;
}

.polisfigurant-confirmation-success h3 {
	color: #155724;
	margin: 0 0 10px 0;
}

.polisfigurant-assignments-notice {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	padding: 20px;
	border-radius: 8px;
	text-align: center;
	margin: 20px 0;
}

.polisfigurant-assignments-notice h3 {
	color: #495057;
	margin: 0 0 15px 0;
}

.polisfigurant-assignments-notice a {
	color: #0073aa;
	text-decoration: none;
	font-weight: 500;
}

.polisfigurant-assignments-notice a:hover {
	text-decoration: underline;
}

/* Övningstid history styling */
.ovningstid-history {
	margin-top: 2em;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #e1e1e1;
}

.ovningstid-history h3 {
	color: #333;
	margin-bottom: 15px;
	font-size: 1.4em;
}

.ovningstid-history h4 {
	color: #555;
	margin-bottom: 10px;
	margin-top: 20px;
}

.ovningstid-info {
	background: #fff;
	padding: 15px;
	border-radius: 3px;
	margin-bottom: 20px;
}

.ovningstid-info p {
	margin-bottom: 8px;
}

.ovningstid-registrations {
	display: grid;
	gap: 10px;
	margin-top: 15px;
}

.registration-item {
	background: #fff;
	padding: 12px;
	border-radius: 3px;
	border-left: 4px solid #ccc;
}

.registration-item.status-confirmed {
	border-left-color: #00a32a;
}

.registration-item.status-declined {
	border-left-color: #d63638;
	opacity: 0.7;
}

.registration-item.status-pending {
	border-left-color: #d4a60a;
}

.registration-item .status {
	font-weight: bold;
	font-size: 0.9em;
}

.registration-item.status-confirmed .status {
	color: #00a32a;
}

.registration-item.status-declined .status {
	color: #d63638;
}

.registration-item.status-pending .status {
	color: #d4a60a;
}

.registration-date {
	font-size: 0.85em;
	color: #666;
	margin-top: 5px;
}

/* Responsive styles for assignments */
@media (max-width: 768px) {
	.polisfigurant-user-assignments {
		margin: 15px;
	}

	.assignment-item {
		padding: 15px;
	}

	.assignment-item h4 {
		font-size: 1.1rem;
	}
}

/* ============================================
   CALENDAR STYLES
   ============================================ */

/* Main calendar container styling */
div.polisfigurant-calendar {
	width: auto;
	margin: 20px auto !important;
	display: block !important;
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

div.polisfigurant-calendar .calendar-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin-bottom: 20px !important;
	padding: 10px 0;
}

.calendar-header h3 {
	margin: 0;
	font-size: 24px;
	color: #333;
	text-transform: capitalize;
}

.calendar-nav {
	background: #0073aa;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	transition: background-color 0.3s;
}

.calendar-nav:hover {
	background: #005177;
}

div.polisfigurant-calendar table.calendar-table {
	width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 1px !important;
	table-layout: fixed !important;
	display: table !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	background: white;
	border-radius: 8px;
	overflow: hidden;
}

div.polisfigurant-calendar table.calendar-table tr {
	display: table-row !important;
}

div.polisfigurant-calendar table.calendar-table th,
div.polisfigurant-calendar table.calendar-table td {
	display: table-cell !important;
	width: 14.28% !important;
	border: 1px solid #ddd !important;
	padding: 8px !important;
	text-align: center !important;
	vertical-align: middle !important;
	box-sizing: border-box !important;
	min-width: 80px !important;
}

div.polisfigurant-calendar table.calendar-table th {
	background: #f0f0f0 !important;
	font-weight: bold !important;
	height: 40px !important;
	color: #495057;
	font-size: 14px;
}

div.polisfigurant-calendar table.calendar-table td {
	height: 60px !important;
	background: white !important;
	position: relative;
}

div.polisfigurant-calendar table.calendar-table td.has-ovning {
	background: #73a790 !important;
	color: #000;
	font-weight: bold;
	cursor: pointer;
	padding: 0 !important;
}

div.polisfigurant-calendar table.calendar-table td.today,
div.polisfigurant-calendar table.calendar-table td.today:hover {
	background: #e3f2fd !important;
	color: #1976d2;
	font-weight: bold;
}

div.polisfigurant-calendar table.calendar-table td.has-ovning.today,
div.polisfigurant-calendar
	table.calendar-table
	td.has-ovning.today
	.calendar-day-link:hover {
	background: #d1ecf1 !important;
	color: #000;
}

.calendar-day.has-ovning p {
	margin: 0;
}

.calendar-day.has-ovning span {
	position: relative;
}

/* Calendar day links */
#top #main .entry-content .calendar-day-link {
	display: block;
	width: 100%;
	height: 100%;
	padding: 8px;
	text-align: center;
	line-height: 44px;
	color: #000;
	text-decoration: none;
	font-weight: bold;
	transition: all 0.2s;
	position: relative;
}

#top #main .entry-content .calendar-day-link:hover {
	background: #73a790;
	color: #000;
}

.calendar-day-multi {
	display: block;
	width: 100%;
	height: 100%;
	padding: 8px;
	text-align: center;
	line-height: 44px;
	color: #2e7d32;
	font-weight: bold;
	cursor: pointer;
	position: relative;
}

.calendar-day-empty {
	display: block;
	width: 100%;
	height: 100%;
	padding: 8px;
	text-align: center;
	line-height: 44px;
	color: #495057;
}

/* Calendar responsive design */
@media (max-width: 768px) {
	.polisfigurant-calendar {
		margin: 10px;
		font-size: 14px;
	}

	.calendar-header h3 {
		font-size: 20px;
	}

	.calendar-nav {
		padding: 6px 12px;
		font-size: 14px;
	}

	.calendar-table th,
	.calendar-table td {
		padding: 4px;
		font-size: 12px;
	}

	.calendar-table td {
		height: 40px;
	}

	.calendar-day {
		line-height: 32px;
		padding: 4px;
	}
}

/* Tooltip styling */
.calendar-day[title] {
	position: relative;
}

.polisfigurant-calendar {
	margin: 20px auto;
	font-family: Arial, sans-serif;
}

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

.calendar-header h3 {
	margin: 0;
	font-size: 1.5em;
	color: #333;
}

.calendar-nav {
	background: #2a4765;
	color: white;
	border: none;
	padding: 10px 15px;
	cursor: pointer;
	border-radius: 3px;
	font-size: 16px;
}

.calendar-nav:hover {
	background: #005a87;
}

.calendar-table {
	width: 100%;
	border-collapse: collapse;
	border: 2px solid #ddd;
}

.calendar-table th {
	background: #f5f5f5;
	padding: 10px;
	text-align: center;
	font-weight: bold;
	border: 1px solid #ddd;
}

.calendar-day {
	width: 14.28%;
	height: 60px;
	vertical-align: top;
	padding: 8px;
	border: 1px solid #ddd;
	text-align: center;
	position: relative;
	display: block;
	line-height: 44px;
	color: #000;
	transition: all 0.2s;
}

.calendar-day:hover {
	background: #f8f9fa;
}

.calendar-day.has-ovning {
	background: #73a790;
	font-weight: bold;
	vertical-align: top;
	padding: 4px 2px;
}

.calendar-day.has-ovning:hover {
	background: #73a790;
}

.calendar-day.has-ovning small {
	font-size: 16px;
	font-weight: 400;
	color: #000;
	display: block;
	line-height: 1.1;
}

.calendar-day-link {
	color: #2a4765;
	text-decoration: none;
	font-weight: bold;
	display: block;
	width: 100%;
	height: 100%;
	padding: inherit;
	text-align: inherit;
	line-height: inherit;
}

.calendar-day-link:hover {
	text-decoration: underline;
	background: #73a790;
}

.calendar-day-multi {
	color: #000000;
	cursor: pointer;
	font-weight: bold;
	display: block;
	width: 100%;
	height: 100%;
}

.calendar-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.calendar-popup {
	background: white;
	border-radius: 5px;
	padding: 0;
	min-width: 400px;
	width: auto;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calendar-popup-header {
	background: #2a4765;
	color: white;
	padding: 15px 20px;
	border-radius: 5px 5px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.calendar-popup-header h3 {
	margin: 0;
	font-size: 1.2em;
}

.calendar-popup-close {
	cursor: pointer;
	font-size: 1.5em;
	font-weight: bold;
}

.calendar-popup-close:hover {
	opacity: 0.8;
}

.calendar-popup-content {
	padding: 20px;
	line-height: 1.6;
}

.calendar-popup-content p {
	margin: 0 0 10px 0;
	font-size: 1rem;
}

.calendar-popup-content p:last-child {
	margin-bottom: 0;
}

.calendar-popup-content a {
	color: #2a4765;
	text-decoration: none;
	font-weight: normal;
	padding: 5px 0;
}

#top .calendar-popup-content a:hover {
	text-decoration: underline;
}
