
/* ======================= */
/*  GENERAL MODAL STYLES   */
/* ======================= */


.modal {
	display: none;
	position: fixed;
	z-index: 1050;
	/* Ensure it's above the nav and other content */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(5px);
}

.modal h4,
h6 {
	font-weight: bold;
}

/* Ensure the modal content is vertically and horizontally centered */
.modal-content {
	position: relative;
	background-color: #ebf1ff;
	margin: 10% auto;
	/* Center the modal vertically */
	padding: 20px;
	border-radius: 8px;
	max-width: 400px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	animation: fadeIn 0.3s ease-in-out;
	z-index: 1100;
	/* Ensure it stays above the background blur */
}


/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: scale(0.9);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Input Fields */
.input-field {
	margin-bottom: 20px;
	position: relative;
}

.input-field input {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px;
}

/* Ensure labels are positioned correctly */
.input-field label {
	position: absolute;
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
	font-size: 14px;
	color: #999;
	transition: all 0.2s ease;
	pointer-events: none;
}

/* Move label up when input is focused or has content */
.input-field input:focus+label,
.input-field input:valid+label {
	top: 0;
	font-size: 12px;
	color: #007bff;
}

.input-field input:focus {
	border-color: #007bff;
	outline: none;
	box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}


/* Modal Close Button */
.modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 20px;
	color: #333;
	cursor: pointer;
	transition: color 0.2s ease;
}

.modal-close:hover {
	color: #007bff;
}

.modal-close:focus {
	outline: none;
}

.modal-btn {
	height: 38px !important;
	font-size: 16px;
	font-weight: bold;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.3s ease;
	color: black;
	background: white;
	border: 1px solid #ccc;
}

.modal-btn:hover {
	transform: scale(1.03);
}

.input-field.image-field {
	margin-bottom: 20px;
}

/* Remove default border/padding for file input */
.input-field.image-field input[type="file"] {
	border: none;
	padding: 5px;
	font-size: 16px;
}

/* Optional: Improve styling for the URL input if needed */
.input-field.image-field input[type="text"] {
	padding: 10px;
	font-size: 16px;
}

.input-field select {
	width: 100%;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	margin-bottom: 20px;
}

/* Optional: Add a simple arrow indicator if desired */
.input-field select::-ms-expand {
	display: none;
}

#modal-create .modal-content,
#modal-edit .modal-content {
	min-width: 800px;
}

/* Fix for text area */
#content,
#edit-content {
	width: 100%;
	height: 150px;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px;
	resize: none;
	/* Prevents resizing */
	overflow-y: auto;
	/* Enables scrollbar if needed */
	line-height: 1.5;
	/* Improves readability */
	background: #fff;
}

/* Ensure label moves up when textarea has text */
.input-field textarea+label {
	position: absolute;
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
	font-size: 14px;
	color: #999;
	transition: all 0.2s ease;
	pointer-events: none;
}

/* Label moves up when textarea is focused or has text */
.input-field textarea:focus+label,
.input-field textarea[data-filled="true"]+label {
	top: 0;
	font-size: 12px;
	color: #007bff;
}

#category,
#preCategory,
#edit-category,
#edit-preCategory {
	color: #999;
	margin: 0;
}

/* Change color when a real option is selected */
#category:valid,
#preCategory:valid,
#edit-category:valid,
#edit-preCategory:valid {
	color: black;
}

/* ======================= */
/* NAV AND MODALS - MEDIA */
/* ======================= */

@media only screen and (max-width: 768px) {

	.modal-content {
		min-width: 50px !important;
		width: 90%;
		max-width: 350px;
	}

}