﻿/* ==========================================================================
   CONTAINER
   ========================================================================== */

.forms-container {
	width: 100%;
	height: 100%;
	padding: 1.5rem 1.6rem;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
	font-size: 0.9rem;
	overflow: visible !important;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.forms-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.2rem;
}

	.forms-header h2 {
		margin: 0;
		font-size: 1.5rem;
	}

/* ==========================================================================
   SEARCH
   ========================================================================== */

.forms-search {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.search-box {
	position: relative;
	display: flex;
	align-items: center;
}

	.search-box input {
		width: 100%;
		padding: 0.55rem 2.2rem 0.55rem 0.9rem;
		border: 1.5px solid #ddd;
		border-radius: 6px;
		font-size: 0.9rem;
	}

	.search-box i {
		position: absolute;
		right: 0.7rem;
		font-size: 1rem;
		color: #999;
	}

/* ==========================================================================
   FORM LIST
   ========================================================================== */

.forms-list {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 1rem;
}

.form-item {
	width: 100%;
	padding: 0.9rem;
	background: var(--ek-item-bg);
	border: 1px solid #ddd;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	cursor: pointer;
	transition: all 0.2s ease;
}

	.form-item:hover {
		background: var(--ek-red-ghost);
		transform: translateY(-2px);
	}

.form-item-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.9rem;
	background: var(--ek-item-bg, #f9f9f9);
	border: 1px solid #ddd;
	border-radius: 10px;
	cursor: pointer;
}

	.form-item-row:hover {
		background: var(--ek-red-ghost, #fff1f1);
	}

.form-title {
	font-weight: 700;
}
.form-type-title {
	font-size: 1rem;
	cursor: pointer;
	color: #333;
	font-weight:600;
}
.form-status-bar {
	display: flex;
	gap: 10px;
	justify-content: flex-start;
}


.related-user {
	font-size: 0.8rem;
	font-weight: 600;
}

.updated-date {
	color: grey;
	font-size: 0.8rem;
}
/* ==========================================================================
   FORM SECTIONS
   ========================================================================== */

.form-section {
	margin-top: 1.5rem;
}

.default-type {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
	border: 1px solid #ddd;
	color: #333;
}

.regular-type {
	align-items: center;
	margin-bottom: 0.5rem;
	border: 1px solid #ddd;
	color: #333;
}

.form-badge {
	padding: 0.25rem 0.6rem;
	background: #ccc;
	border-radius: 8px;
	font-size: 0.75rem;
	color: #222;
}

/* ==========================================================================
   ASSIGN SECTION
   ========================================================================== */

.assign-section {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.popup-form-control {
	min-width: 260px;
}

/* ==========================================================================
   FORM ACTIONS
   ========================================================================== */

.form-actions {
	display: flex;
	gap: 0.6rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
form-icon-btn {
	outline:none !important;
	background:none !important;

}
.icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	padding: 6px;
	background: transparent;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	color: #444;
	cursor: pointer;
}

	.icon-btn:hover {
		background: #f2f2f2;
		color: #c62828;
	}

.forms-container .form-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 4px;
	background: transparent;
	border: none !important; 
	border-radius: 6px;
	font-size: 1.1rem;
	color: #444;
	cursor: pointer;
}

	.forms-container .form-icon-btn:hover {
		background: rgba(198, 40, 40, 0.1);
		color: #c62828;
	}

	.forms-container .form-icon-btn i {
		pointer-events: none;
	}

/* ==========================================================================
   GLOBAL INPUTS
   ========================================================================== */

label {
	margin: 0;
	font-weight: 600;
}

input[type="text"],
input[type="date"],
input[type="email"],
textarea,
select {
	width: 100%;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 0.95rem;
	color: #222;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: all 0.2s ease;
}

	input:focus,
	textarea:focus,
	select:focus {
		outline: none;
		box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
	}

::placeholder {
	color: #aaa;
}

textarea {
	min-height: 90px;
	line-height: 1.5;
	resize: vertical;
}

select {
	padding-right: 2rem;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23c62828' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 10px 6px;
}

.input-field {
	width: 100%;
	padding: 0.55rem 0.75rem;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.9rem;
}
/* ---------- Readonly (Admin sees staff answers) ---------- */
.readonly-answer {
	background: #f8f8f8;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 0.6rem 0.9rem;
	color: #555;
	font-size: 0.95rem;
}
.readonly-field {
	padding: 10px 12px;
	background-color: #fafafa;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.8rem;
	color: #333;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: all 0.2s ease-in-out;
}
.step-indicator {
	text-align: center;
	font-size: 0.85rem;
	color: #888;
	margin-top: 0.8rem;
}

/* ---------- Admin-only Highlight ---------- */
.admin-only {
	background: var(--ek-item-bg);
	border-left: 5px solid var(--ek-red);
}

.form-questions .info-label {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 1rem 0 0.4rem 0 !important;
	font-weight: 700 !important;
	font-size: 1.2rem !important;
	color: #111 !important;
}

.input-field, .select-field, .textarea-field {
	width: 100%;
	padding: 0.45rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.95rem;
}

/*multi selection, single selection checkbox*/
.select-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 2px 18px;
	max-height: calc(5 * 50px); 
	overflow-y: auto;
	padding-right: 6px;
}

.select-item {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
}

/* ---------- Container ---------- */
.form-popup {
	background: #fff;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
	max-width: 650px;
	margin: 2rem auto;
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

/* ---------- Header ---------- */
.form-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #e5e5e5;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
}

	.form-popup-header h3 {
		font-size: 1.5rem;
		font-weight: 600;
		/*	color: #c62828;*/
		margin: 0;
	}

.admin-badge {
	background: #f3f3f3;
	border-radius: 8px;
	padding: 0.3rem 0.7rem;
	font-size: 0.85rem;
	color: #555;
	font-weight: 500;
}

/* ---------- Questions ---------- */
.form-questions {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.form-question {
	background: var(--layout-bg-color);
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	padding: 1rem 1.2rem;
	transition: all 0.15s ease-in-out;
}

	.form-question:hover {
		border-color: var(--ek-border-color);
		box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.08);
	}

	.form-question label {
		display: block;
		font-weight: 600;
		color: #2e2e2e;
		margin-bottom: 0.5rem;
		font-size: 0.95rem;
	}

.option-box {
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	padding: 12px;
	background: #fafafa;
	margin-top: 10px;
}

.option-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.add-btn {
	background: var(--ek-red-ghost);
	color: black;
	border: none;
	padding: 6px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.select-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}

.option-item {
	display: flex;
	align-items: center;
	gap: 8px;
	background: white;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #ddd;
	width: 100%;
	min-width: 0;
	
}

	.option-item input[type="checkbox"] {
		width: 16px;
		height: 16px;
		margin: 0;
		cursor: pointer;
	}

	.option-item label {
		margin: 0;
		font-size: 14.5px;
		line-height: 1.2;
		cursor: pointer;
	}

.option-input {
	flex: 1;
	width: 100%;
	min-width: 0;
	border: none;
	outline: none;
	font-size: 13px;
	white-space: normal !important; 
	word-break: break-word;
	overflow-wrap: anywhere;
	min-height: 38px;
	max-height: 120px;
}


.delete-btn {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
}

	.delete-btn:hover {
		color: red;
	}

.multi-toggle {
	display: block;
	margin-top: 10px;
	font-size: 13px;
}
/* ==========================================================================
   SIGNATURE SECTION
   ========================================================================== */

.signature-card {
	margin-top: 1.2rem;
	padding: 1.2rem 1.5rem;
	background: var(--ek-item-bg);
	border: 1px solid #e5e5e5;
	border-radius: 10px;
}

	.signature-card h4 {
		margin-bottom: 0.8rem;
		font-size: 1.1rem;
	}

.signature-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

	.signature-grid label {
		display: block;
		margin-bottom: 0.3rem;
		font-size: 0.9rem;
		font-weight: 600;
		color: #2e2e2e;
	}

.col-span-2 {
	grid-column: span 2;
}
.signature-step {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--layout-bg-color);
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	padding: 1.2rem;
}

	.signature-step label {
		display: block;
		font-weight: 600;
		font-size: 0.95rem;
		color: #2e2e2e;
		margin-bottom: 0.4rem;
	}

	.signature-step input {
		width: 100%;
		padding: 0.6rem 0.8rem;
		border: 1px solid #ccc;
		border-radius: 6px;
		font-size: 0.95rem;
	}
/* ==========================================================================
   IMAGE
   ========================================================================== */

.form-image-wrapper {
	display: flex;
	justify-content: center;
	margin: 1rem 0;
}

.form-image {
	max-width: 100%;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.flex-1 {
	flex: 1;
}

.empty-text {
	margin-top: 1rem;
	text-align: center;
	font-size: 0.9rem;
	color: #777;
}
/* ---------- Footer Buttons ---------- */
.form-popup-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.8rem;
	margin-top: 1rem;
}

/* ---------- Step Indicator ---------- */
.step-indicator {
	text-align: center;
	font-size: 0.85rem;
	color: #888;
	margin-top: 0.8rem;
}

/* ---------- Scroll Area ---------- */
.form-popup-body {
	max-height: 70vh;
	overflow-y: auto;
	padding-right: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.form-popup {
		padding: 1.5rem;
		margin: 1rem;
	}

	.signature-step {
		grid-template-columns: 1fr;
	}

	.form-popup-footer {
		flex-direction: column;
		align-items: stretch;
	}

		.form-popup-footer button {
			width: 100%;
		}
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 600px) {
	.forms-container {
		margin: 1rem;
		padding: 1.5rem;
	}

	.forms-header h2 {
		font-size: 1.3rem;
	}

	.btn-add {
		padding: 0.35rem 0.7rem;
		font-size: 0.8rem;
	}

	.form-item {
		padding: 0.8rem;
		font-size: 0.95rem;
	}
}


