﻿/* ===================== Overlay & Container ===================== */
.popup-overlay {
	position: fixed;
	inset: 0;
	/*	background: transparent;*/
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	z-index: 2000;
	isolation: isolate;
}
.popup-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.3);
/*	background: transparent;*/
	backdrop-filter: blur(2px);
}

/* FORM POPUP FIX — the real popup container */
.form-popup {
	width: 560px !important;
	max-width: 95%;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	padding: 2rem;
	max-height: 85vh;
	overflow-y: auto;
	animation: popupFadeUp 0.25s ease;
}
.popup-content,
.form-popup,
.confirm-dialog {
	position: relative;
	z-index: 1;
	max-height: 85vh;
	overflow-y: auto;
}

body.no-scroll,
html.no-scroll {
	position: fixed;
	width: 100%;
	overflow: hidden;
	overscroll-behavior: none;
	touch-action: none;
}

/* Popup fade animation */
@keyframes popupFadeUp {
	from {
		opacity: 0;
		transform: translateY(15px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===================== Confirm Dialog ===================== */
.confirm-dialog {
	text-align: center;
	padding: 2rem 2.2rem;
	width: min(90%, 420px);
}

	.confirm-dialog h4 {
		font-size: 1.3rem;
		font-weight: 700;
		color: #222;
		margin-bottom: 1rem;
	}

	.confirm-dialog .popup-message {
		font-size: 0.95rem;
		color: #444;
		margin-bottom: 1.6rem;
		line-height: 1.5;
		white-space: pre-line;
	}

	.confirm-dialog .popup-btn-bar {
		display: flex;
		justify-content: center;
		gap: 1rem;
	}

	.confirm-dialog .popup-btn {
		min-width: 120px;
	}

/* ===================== Dropdown ===================== */
.dropdown-list {
	position: absolute;
	top: 105%;
	left: 0;
	width: 100%;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	max-height: 200px;
	overflow-y: auto;
	padding: 0.3rem 0;
	z-index: 5000;
	animation: fadeInDown 0.18s ease-out forwards;
}

.dropdown-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.8rem;
	cursor: pointer;
	transition: background 0.15s ease;
}

	.dropdown-item:hover {
		background-color: #f8f8f8;
	}

	.dropdown-item input[type="checkbox"] {
		accent-color: var(--ek-red);
	}

/* === Permitted Roles Pill Group === */
.roles-pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.3rem;
}

.role-pill {
	background-color: #f4f4f4;
	border: 1px solid #ddd;
	border-radius: 16px;
	padding: 0.25rem 0.7rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #444;
}

	.role-pill:hover {
		background-color: #ececec;
	}

/* === Links === */
.text-link {
	color: var(--ek-red);
	text-decoration: none;
	font-weight: 500;
}

	.text-link:hover {
		text-decoration: underline;
	}

/* Muted Text */
.text-muted {
	color: #999;
}

/*file upload*/
.file-upload-inline {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.5rem;
}

.hidden-file-input {
	display: none;
}

.file-name {
	font-size: 0.9rem;
	color: #333;
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.small-upload-btn {
	padding: 0.35rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
}

.remove-file-btn {
	background: none;
	border: none;
	color: var(--ek-red);
	font-weight: bold;
	font-size: 1rem;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
}

.role-select-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.role-item {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	background: #f8f8f8;
	border-radius: 8px;
	padding: 0.3rem 0.6rem;
	border: 1px solid #ddd;
	cursor: pointer;
}

	.role-item input {
		cursor: pointer;
	}

/* Dropdown animation */
@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Hide scrollbar for clean look */
.dropdown-list::-webkit-scrollbar {
	width: 6px;
}

.dropdown-list::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 3px;
}

	.dropdown-list::-webkit-scrollbar-thumb:hover {
		background: #bbb;
	}

/* ===================== Role Pill Input ===================== */
.dropdown-input-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	min-height: 42px;
	padding: 0.35rem 0.6rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s ease;
	background-color: #fff;
}

	.dropdown-input-wrapper:hover,
	.dropdown-input-wrapper:focus-within {
		border-color: var(--ek-red);
	}

.role-pill {
	background-color: var(--ek-red-ghost);
	color: var(--ek-red);
	border-radius: 12px;
	padding: 0.25rem 0.6rem;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.pill-remove {
	background: transparent;
	border: none;
	color: var(--ek-red);
	cursor: pointer;
	font-weight: bold;
	font-size: 0.8rem;
	line-height: 1;
}

.role-input {
	border: none !important;
	outline: none;
	box-shadow: none;
	flex-grow: 1;
	min-width: 80px;
	padding: 0;
	font-size: 0.9rem;
}

/* ===================== Headings ===================== */
.popup-content {
	width: 560px !important;
	max-width: 95%;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	padding: 2rem;
	max-height: 85vh;
	overflow-y: auto;
	animation: popupFadeUp 0.25s ease;
}

	.popup-content h4 {
		font-size: 1.3rem;
		font-weight: 700;
		color: #222;
		margin-bottom: 1.2rem;
		text-align: left;
	}

/* ===================== Form Layout ===================== */
.popup-form-grid {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-bottom: 0.3rem;
}

	.popup-form-grid label {
		display: block;
		text-align: left;
		font-weight: 600;
		font-size: 0.9rem;
		color: #222;
		margin-bottom: 0.25rem;
	}

.popup-form-control {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 0.9rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

	.popup-form-control:focus {
		outline: none;
		border-color: var(--ek-red);
		box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2);
	}

/* ===================== Readonly Field ===================== */
.popup-readonly-field {
	background-color: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
	color: #333;
	white-space : nowrap;
	overflow-x : auto;
}

/* ===================== Buttons ===================== */
.popup-btn-bar {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.2rem;
}

.popup-btn {
	padding: 0.45rem 1.2rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.popup-btn-primary {
	background-color: var(--ek-red);
	border: 2px solid var(--ek-red);
	color: #fff;
}

.popup-btn-outline {
	background: transparent;
	color: var(--ek-red);
	border: 1.5px solid var(--ek-red);
}

.popup-btn-primary:hover {
	background-color: var(--ek-red-dark);
}

.popup-btn-outline:hover {
	background-color: var(--ek-red);
	color: #fff;
}

/* ===================== Status Badges ===================== */
.popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.popup-body-scroll {
	padding: 0 2rem;
	overflow-y: auto;
	flex-grow: 1;
}

.licence-status,
.insurance-status {
	padding: 0.35rem 0.9rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #fff;
	letter-spacing: 0.5px;
}

	.licence-status.valid,
	.insurance-status.valid {
		background-color: #2e7d32; /* Consider theming if needed */
	}

	.licence-status.expired,
	.insurance-status.expired {
		background-color: var(--ek-red);
	}

/* ===================== Business Hours ===================== */
.working-hours {
	border-top: 1px solid #eee;
	margin-top: 0.5rem;
	padding-top: 0.8rem;
}

.day-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
}

	.day-row label {
		width: 60px;
		font-weight: 600;
	}

.time-input {
	width: 110px;
	padding: 0.3rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.9rem;
}

.closed-text {
	color: #999;
}

/* ===================== Utility ===================== */
.checkbox-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.25rem;
	font-size: 0.9rem;
	color: #444;
}

.licence-days,
.insurance-days {
	font-size: 0.85rem;
	font-weight: 500;
	color: #555;
}

/* Secrets list */
.secrets-page {
	padding: 2rem;
	background: #fff;
	border-radius: 16px;
}

.secrets-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.secret-list {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.secret-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6rem 1rem;
	border-radius: 8px;
	background: #f8f8f8;
	cursor: pointer;
	transition: all 0.15s ease;
}

	.secret-item:hover {
		background: #f0f0f0;
	}

.btn-logs {
	background: var(--ek-red);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.3rem 0.8rem;
	cursor: pointer;
}

/* ===================== Password Inputs ===================== */
.input-with-icon {
	position: relative;
	display: flex;
	align-items: center;
}

	.input-with-icon .popup-form-control {
		flex: 1;
		padding-right: 2.4rem;
	}

.eye-btn {
	position: absolute;
	right: 0.6rem;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.1rem;
	color: #666;
}

	.eye-btn:hover {
		color: var(--ek-red);
	}

/* Password warning */
.warning-text {
	color: var(--ek-red);
	font-size: 0.85rem;
	margin-top: 0.3rem;
}

/* ===================== Announcement Detail Popup ===================== */
.news-popup {
	width: 560px !important;
	max-width: 95%;
	background: #fff;
	border-radius: 14px;
	padding: 2rem;
	box-shadow: 0 8px 30px rgba(0,0,0,0.25);
	max-height: 85vh;
	overflow-y: auto;
}

.popup-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #222;
	margin-bottom: 0.8rem;
}

.popup-meta {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.popup-divider {
	border: 0;
	border-top: 0.5px solid #e5e5e5;
	margin-bottom:2px;	
}

.popup-description {
	font-size: 1rem;
	color: #444;
	line-height: 1.6;
	margin-bottom: 1.4rem;
}

.popup-assigned-section h5 {
	margin-bottom: 0.4rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: #333;
}

.popup-staff-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.assigned-pill {
	background: #f3f3f3;
	border-radius: 14px;
	padding: 0.35rem 0.8rem;
	font-size: 0.85rem;
	color: #333;
}

.popup-no-staff {
	font-size: 0.9rem;
	color: #777;
}

/* =========================================================
   P O L L   U I   (ECKOO STYLE)
   ========================================================= */

/* TAB BUTTONS */
.poll-tab-container {
	display: flex;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.poll-tab-btn {
	flex: 1;
	background: #f5f5f5;
	border: 1.5px solid #ddd;
	padding: 0.55rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	color: #444;
	text-align: center;
	transition: all 0.2s ease;
}

	.poll-tab-btn.active {
		background: var(--ek-red-ghost);
		border-color: var(--ek-red);
		color: var(--ek-red);
	}

	.poll-tab-btn:hover {
		background: #ececec;
	}

/* ==========================
   POLL SECTION (Add / Edit)
   ========================== */
.poll-section {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 1rem;
}

.poll-option-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
}

.poll-option-input {
	flex: 1;
	padding: 0.45rem 0.6rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 0.9rem;
	transition: border 0.2s ease;
}

	.poll-option-input:focus {
		outline: none;
		border-color: var(--ek-red);
		box-shadow: 0 0 0 2px rgba(198,40,40,0.2);
	}

.poll-remove-btn {
	background: transparent;
	border: none;
	color: var(--ek-red);
	font-weight: 700;
	font-size: 1.1rem;
	cursor: pointer;
	padding: 0 0.3rem;
	line-height: 1;
}

	.poll-remove-btn:hover {
		color: var(--ek-red-dark);
	}

.poll-add-btn {
	background: transparent;
	color: var(--ek-red);
	border: 1.5px solid var(--ek-red);
	border-radius: 8px;
	padding: 0.4rem 0.8rem;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	width: fit-content;
	transition: all 0.2s ease;
}

	.poll-add-btn:hover {
		background: var(--ek-red);
		color: white;
	}

.poll-deadline {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ek-red);
	margin-bottom: 5px;
}

/* Toggle settings */
.poll-toggle-group {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 0.4rem;
	font-size: 0.88rem;
}

	.poll-toggle-group label {
		display: flex;
		align-items: center;
		gap: 0.35rem;
		cursor: pointer;
	}

	.poll-toggle-group input {
		accent-color: var(--ek-red);
	}

/* ==========================
   POLL DISPLAY (Detail Popup)
   ========================== */
.poll-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #222;
	margin-bottom: 0.5rem;
}

.poll-box {
	background: #fff7f7;
	border: 1px solid rgba(198,40,40,0.25);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.poll-question {
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 0.6rem;
	color: #222;
}

.poll-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.7rem;
}

.poll-pill {
	background: var(--ek-red-ghost);
	border: 1px solid var(--ek-red);
	border-radius: 20px;
	padding: 0.3rem 0.8rem;
	font-size: 0.85rem;
	color: var(--ek-red);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
}

/* Poll setting tags */
.poll-settings {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.poll-setting-pill {
	background: #eee;
	border-radius: 8px;
	padding: 0.25rem 0.6rem;
	font-size: 0.75rem;
	color: #555;
	border: 1px solid #ddd;
}

/* ==========================
   DATE POLL INPUTS
   ========================== */
.poll-date-input {
	padding: 0.45rem 0.6rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 0.9rem;
	min-width: 160px;
}

	.poll-date-input:focus {
		outline: none;
		border-color: var(--ek-red);
		box-shadow: 0 0 0 2px rgba(198,40,40,0.2);
	}

.poll-vote-btn {
	background: var(--ek-red-ghost);
	border: 1.5px solid var(--ek-red);
	color: var(--ek-red);
	font-weight: 600;
	padding: 0.35rem 1rem;
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
}

	.poll-vote-btn:hover {
		background: var(--ek-red);
		color: #fff;
	}

.poll-voted-text {
	font-size: 0.85rem;
	color: #666;
	margin-top: 3px;
}

/* =========================================================
   DETAIL POPUP — POLL SECTION (ECKOO STYLE)
   ========================================================= */
.poll-section {
	margin-top: 1.4rem;
	margin-bottom: 1.2rem;
	padding: 1rem 1.2rem;
	background: #fff7f7;
	border-radius: 12px;
	border: 1px solid rgba(198,40,40,0.18);
}

	.poll-section h5 {
		font-size: 1.1rem;
		font-weight: 700;
		color: #222;
		margin-bottom: 0.8rem;
	}

/* ============================
   Individual poll block
============================ */
.poll-item {
	background: #ffffff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
}

/* Question text */
.poll-question {
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.7rem;
}

/* info text for Text Poll */
.poll-info-text {
	font-size: 0.9rem;
	color: #777;
	font-style: italic;
	margin-bottom: 0.8rem;
}

/* ============================
   Option styles
============================ */
.poll-option {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.45rem 0.6rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: background 0.2s ease;
	color: #333;
}

	.poll-option:hover {
		background: var(--ek-red-ghost);
	}

	.poll-option input[type="radio"],
	.poll-option input[type="checkbox"] {
		accent-color: var(--ek-red);
	}

/* For Date Poll – list wrapper */
.poll-date-list {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin-bottom: 0.8rem;
}

.poll-date-item {
	padding: 0.5rem 0.6rem;
	border-radius: 6px;
	background: #fafafa;
	border: 1px solid #eee;
	font-size: 0.9rem;
}

.category-manager-popup {
	background: white;
	padding: 1.2rem 1.5rem;
	border-radius: 12px;
	position: absolute;
	top: 20%;
	left: 50%;
	transform: translateX(-50%);
	width: 320px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.cat-title {
	margin-bottom: 1rem;
	font-weight: 600;
	font-size: 1.1rem;
}

.category-list {
	max-height: 250px;
	overflow-y: auto;
	margin-bottom: 1rem;
}

.category-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.cat-name {
	font-size: 0.8rem;
}

.delete-icon {
	background: transparent;
	border: none;
	color: red;
	font-size: 0.7rem;
	cursor: pointer;
}

	.delete-icon.disabled {
		opacity: 0.35;
		cursor: not-allowed;
	}

.close-btn {
	width: 100%;
	margin-top: 0.6rem;
	font-weight: 600;
}

.category-manage-row label {
	text-decoration: underline;
	cursor: pointer;
	color: #333;
}

	.category-manage-row label:hover {
		text-decoration-thickness: 2px;
		opacity: 0.8;
	}

/* ============================
   Submit button
============================ */
.poll-submit {
	padding: 0.45rem 1.2rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	background: var(--ek-red);
	border: 2px solid var(--ek-red);
	color: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 0.6rem;
}

	.poll-submit:hover {
		background: var(--ek-red-dark);
	}

/* vote submitted message */
.poll-submitted-msg {
	margin-top: 0.4rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: #2e7d32;
}

/* ============================
   Responsive
============================ */
@media (max-width: 600px) {
	.poll-option {
		padding: 0.35rem 0.5rem;
		font-size: 0.88rem;
	}

	.poll-item {
		padding: 0.8rem;
	}

	.poll-submit {
		width: 100%;
		text-align: center;
	}
}

/* ==========================
   MOBILE RESPONSIVE
   ========================== */
@media (max-width: 600px) {
	.poll-option-row {
		flex-direction: row;
	}

	.poll-add-btn, .poll-remove-btn {
		font-size: 0.9rem;
	}

	.poll-pill {
		font-size: 0.8rem;
	}

	.poll-date-input {
		width: 100%;
	}
}

/* ===================== Responsive ===================== */
@media (max-width: 600px) {
	.popup-content {
		width: 92%;
		padding: 1.4rem;
	}

	.popup-form-grid {
		grid-template-columns: 1fr;
	}

	.popup-btn-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.popup-btn-primary, .popup-btn-outline {
		width: 100%;
	}
}
