/**
* Gravity Forms Display Styles - Simple Design
*/

/* Table Styles */
.gravity-entries-table-wrapper {
	margin: 20px 0;
	font-family: Arial, sans-serif;
}

/* Search Styles */
.gravity-entries-search-wrapper {
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.search-controls {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.gravity-entries-search {
	flex: 1;
	min-width: 200px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
}

.gravity-entries-search:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.search-btn,
.clear-search-btn {
	background: #0073aa;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
}

.search-btn:hover,
.clear-search-btn:hover {
	background: #005a87;
}

.clear-search-btn {
	background: #666;
}

.clear-search-btn:hover {
	background: #555;
}

.search-status {
	margin-top: 10px;
	font-size: 14px;
	color: #666;
	font-style: italic;
}

.search-status span {
	padding: 4px 8px;
	background: #e8f4fd;
	border-radius: 3px;
	border-left: 3px solid #377A00;
}

.search-status .searching {
	background: #fff3cd;
	border-left-color: #ffc107;
	color: #856404;
}

.search-status .no-results {
	background: #f8d7da;
	border-left-color: #dc3545;
	color: #721c24;
}

.gravity-entries-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ddd;
	margin-bottom: 20px;
}

.gravity-entries-table thead {
	background: #f5f5f5;
}

.gravity-entries-table th {
	padding: 12px 8px;
	text-align: left;
	font-weight: bold;
	border-bottom: 2px solid #ddd;
	font-size: 14px;
}

.gravity-entries-table td {
	padding: 10px 8px;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	vertical-align: top;
}

.gravity-entries-table tbody tr:hover {
	background-color: #f9f9f9;
}

.gravity-entries-table tbody tr:last-child td {
	border-bottom: none;
}

/* Button Styles */
.view-more-btn {
	background: #0073aa;
	color: white;
	border: none;
	padding: 6px 12px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
	text-decoration: none;
	display: inline-block;
}

.view-more-btn:hover {
	background: #005a87;
}

.view-more-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Popup Styles */
.gravity-entry-popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

.popup-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border: 1px solid #ddd;
	max-width: 90%;
	max-height: 90%;
	width: 600px;
	overflow: hidden;
}

.popup-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	color: #666;
	cursor: pointer;
	z-index: 10;
}

.popup-close:hover {
	color: #333;
}

.popup-header {
	background: #f5f5f5;
	padding: 15px 20px;
	border-bottom: 1px solid #ddd;
}

.popup-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: bold;
}

.popup-body {
	padding: 20px;
	max-height: 60vh;
	overflow-y: auto;
}

/* Entry Details Styles */
.entry-details-content {
	margin-bottom: 20px;
}

.detail-row {
	margin-bottom: 10px;
	padding: 8px;
	background: #f9f9f9;
	border-left: 3px solid #377A00;
}

.detail-row strong {
	font-weight: bold;
	color: #333;
	margin-right: 10px;
}

.detail-row a {
	color: #377A00;
	text-decoration: none;
}

.detail-row a:hover {
	text-decoration: underline;
}

.textarea-content {
	white-space: pre-wrap;
	line-height: 1.4;
	color: #555;
}

/* Video Container Styles */
/* .video-container {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
} */

.video-container h3 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 16px;
	font-weight: bold;
}

.video-frame-wrapper {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	background: #000;
}

.video-frame {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.video-error {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #666;
	text-align: center;
	font-size: 14px;
}

/* Pagination Styles - Simple */
.gravity-entries-pagination {
	text-align: center;
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
}

.gravity-entries-pagination .prev-page,
.gravity-entries-pagination .next-page {
	background: #0073aa;
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 14px;
	text-decoration: none;
	display: inline-block;
	margin: 0 5px;
}

.gravity-entries-pagination .prev-page:hover,
.gravity-entries-pagination .next-page:hover {
	background: #005a87;
}

.gravity-entries-pagination .prev-page.disabled,
.gravity-entries-pagination .next-page.disabled {
	background: #ccc;
	cursor: not-allowed;
}

.page-numbers {
	display: inline-block;
	margin: 0 10px;
}

.page-number {
	display: inline-block;
	padding: 6px 10px;
	margin: 0 2px;
	text-decoration: none !important;
	color: #377A00;
	border: 1px solid #ddd;
	background: white;
}

.page-number:hover {
	background: #f0f0f0;
}

.page-number.current {
	background: #377A00;
	color: white;
	border-color: #0073aa;
}

.page-dots {
	color: #666;
	padding: 0 5px;
}

.page-info {
	margin-top: 10px;
	font-size: 14px;
	color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
	.search-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.gravity-entries-search {
		min-width: auto;
		margin-bottom: 10px;
	}

	.search-btn,
	.clear-search-btn {
		width: 100%;
		margin-bottom: 5px;
	}

	.gravity-entries-table {
		font-size: 12px;
	}

	.gravity-entries-table th,
	.gravity-entries-table td {
		padding: 6px 4px;
	}

	.popup-content {
		width: 95%;
	}

	.popup-header {
		padding: 10px 15px;
	}

	.popup-header h2 {
		font-size: 16px;
	}

	.popup-body {
		padding: 15px;
	}

	.detail-row {
		padding: 6px;
	}

	.view-more-btn {
		padding: 4px 8px;
		font-size: 11px;
	}

	.gravity-entries-pagination {
		padding: 10px;
	}

	.page-numbers {
		display: block;
		margin: 10px 0;
	}

	.page-number {
		padding: 4px 8px;
		font-size: 12px;
	}
}

/* Table Scrollable */
.table-scrollable {
	overflow-x: auto;
	border: 1px solid #ddd;
}

.table-scrollable .gravity-entries-table {
	min-width: 600px;
	margin-bottom: 0;
}

/* Loading States */
.gravity-entries-table-wrapper.loading {
	position: relative;
	min-height: 200px;
}

.loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

/* Ensure pagination stays visible during loading */
.gravity-entries-table-wrapper.loading .gravity-entries-pagination {
	position: relative;
	z-index: 11;
}

.spinner {
	width: 30px;
	height: 30px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Focus States */
.view-more-btn:focus,
.popup-close:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* Print Styles */
@media print {
	.gravity-entry-popup {
		position: static;
		background: white;
	}

	.popup-content {
		position: static;
		transform: none;
		max-width: none;
		max-height: none;
		border: 1px solid #ccc;
	}

	.popup-close,
	.view-more-btn,
	.gravity-entries-pagination {
		display: none;
	}
}
