/**
 * GiraForms - Admin Styles
 */

/* ===========================
   Settings Page
   =========================== */
.giraforms-settings-page {
	max-width: 1200px;
}

.giraforms-settings-page h1 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 30px;
}

.giraforms-settings-header {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	padding: 20px 24px;
	margin-bottom: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.giraforms-settings-header p {
	margin: 0;
	color: #50575e;
	font-size: 14px;
}

/* Settings sections styling */
.giraforms-settings-page .form-table th {
	width: 250px;
	padding: 20px 10px 20px 0;
	font-weight: 600;
	color: #1d2327;
}

.giraforms-settings-page .form-table td {
	padding: 15px 10px;
}

.giraforms-settings-page h2.title {
	margin-top: 0;
	padding: 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	border-bottom: 1px solid #dcdcde;
	margin-bottom: 20px;
}

.giraforms-settings-page textarea.large-text {
	min-height: 100px;
	padding: 8px 10px;
	font-family: "Courier New", Courier, monospace;
	font-size: 13px;
	line-height: 1.6;
}

.giraforms-settings-page .description {
	margin-top: 8px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.giraforms-settings-page .description code {
	background: #f6f7f7;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
	color: #d63638;
}

/* Premium notice */
.giraforms-premium-notice {
	margin-top: 30px;
	border-radius: 12px;
	border: 1px solid #d9e1ff;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(56, 88, 233, 0.08);
}

.giraforms-premium-notice__header {
	background: #fff;
	padding: 20px 24px;
	color: #1d2327;
	border-bottom: 1px solid #e8ecfb;
	box-shadow: 0 8px 20px rgba(25, 40, 95, 0.12);
	position: relative;
	z-index: 1;
}

.giraforms-premium-notice__title {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 8px;
	font-size: 21px;
	line-height: 1.3;
	font-weight: 400;
	color: inherit;
}

.giraforms-premium-notice__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
}

.giraforms-premium-notice__logo svg {
	display: block;
	width: 40px;
	height: 40px;
}

.giraforms-premium-notice__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.giraforms-premium-notice__brand-text {
	font-weight: 700;
	letter-spacing: 0.2px;
	color: #3858e9;
}

.giraforms-premium-notice__pro-badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: #eef2ff;
	color: #2e4ad2;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.7px;
}

.giraforms-premium-notice__subtitle {
	margin: 0;
	font-size: 14px;
	color: #4f5a67;
}

.giraforms-premium-notice__content {
	padding: 22px 24px 24px;
}

.giraforms-premium-notice input.giraforms-premium-notice__mobile-toggle-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	appearance: none !important;
}

.giraforms-premium-notice__features {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.giraforms-premium-notice__feature {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 11px 12px;
	border: 1px solid #e8ecfb;
	border-radius: 8px;
	background: #f8f9fe;
}

.giraforms-premium-notice__feature.is-featured {
	border-color: #c7d4ff;
	background: #eff3ff;
}

.giraforms-premium-notice__feature .dashicons {
	margin-top: 1px;
	color: #3858e9;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.giraforms-premium-notice__feature-title {
	display: block;
	margin-bottom: 2px;
	font-size: 13px;
	line-height: 1.35;
	color: #1d2327;
}

.giraforms-premium-notice__feature-description {
	display: block;
	font-size: 12px;
	line-height: 1.35;
	color: #5f646b;
}

.giraforms-premium-notice__mobile-toggle-label {
	display: none;
	margin: -8px 0 16px;
	font-size: 12px;
	font-weight: 600;
	color: #3858e9;
	cursor: pointer;
}

.giraforms-premium-notice__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.giraforms-premium-notice__button-primary {
	background: #3858e9 !important;
	border-color: #3858e9 !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

.giraforms-premium-notice__button-primary:hover,
.giraforms-premium-notice__button-primary:focus {
	background: #2e49c5 !important;
	border-color: #2e49c5 !important;
}

.giraforms-premium-notice__button-secondary {
	box-shadow: none !important;
}

.giraforms-premium-notice__guarantee {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #2f6a17;
}

.giraforms-premium-notice__cta-note {
	flex-basis: 100%;
	font-size: 12px;
	color: #5f646b;
}

.giraforms-premium-notice__guarantee .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

@media (max-width: 782px) {
	.giraforms-premium-notice__header,
	.giraforms-premium-notice__content {
		padding: 16px;
	}

	.giraforms-premium-notice__title {
		font-size: 18px;
	}

	.giraforms-premium-notice__features {
		grid-template-columns: 1fr;
	}

	.giraforms-premium-notice__feature.is-mobile-optional {
		display: none;
	}

	.giraforms-premium-notice__mobile-toggle-label {
		display: inline-block;
	}

	.giraforms-premium-notice__mobile-toggle-input:checked ~ .giraforms-premium-notice__features .giraforms-premium-notice__feature.is-mobile-optional {
		display: flex;
	}

	.giraforms-premium-notice__guarantee {
		margin-left: 0;
		width: 100%;
	}
}

@media (max-width: 1024px) and (min-width: 783px) {
	.giraforms-premium-notice__features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ===========================
   Submissions List Table
   =========================== */
.wp-list-table .column-id {
	width: 100px;
}

.wp-list-table .column-form_id {
	width: 150px;
}

.wp-list-table .column-status {
	width: 100px;
}

.wp-list-table .column-created_at {
	width: 150px;
}

.wp-list-table .status-unread {
	font-weight: 600;
	color: #385aea;
}

/* ===========================
   Submission Detail Page
   =========================== */

.giraforms-submission-detail {
	max-width: 1200px;
}

.giraforms-submission-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.wrap .wp-header-end {
	clear: both;
}

/* Info cards */
.giraforms-info-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-top: 10px;
	margin-bottom: 30px;
}

.giraforms-info-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	padding: 20px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	transition: all 0.2s;
}

.giraforms-info-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border-color: #2271b1;
}

.giraforms-info-card-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #646970;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
	display: block;
}

.giraforms-info-card-value {
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	word-break: break-word;
}

.giraforms-info-card-icon {
	display: inline-flex;
	align-items: center;
	margin-right: 6px;
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #3858e9;
	vertical-align: middle;
}

/* Status badges */
.giraforms-status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
	text-transform: capitalize;
}

.giraforms-status-badge.status-read {
	background: #f0f6fc;
	color: #0a4275;
	border: 1px solid #c8e1ff;
}

.giraforms-status-badge.status-unread {
	background: #fcf9e8;
	color: #614a00;
	border: 1px solid #dfd8c2;
}

.giraforms-status-badge.status-archived {
	background: #f0f0f1;
	color: #50575e;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.giraforms-status-badge.status-spam {
	background: #fcf0f1;
	color: #8a0000;
	border: 1px solid #f1aeb5;
	font-weight: 700;
}

/* Form data section */
.giraforms-form-data {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 6px 6px;
    padding: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    overflow-x: scroll;
}

.giraforms-form-data-header {
    padding: 20px 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f9f9f9;
    border-radius: 6px 6px 0 0;
    border-bottom: 0;
}

.giraforms-form-data-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 10px;
}

.giraforms-form-data-header h2::before {
	content: "📝";
	font-size: 20px;
}

.giraforms-form-data table {
	width: 100%;
	border-collapse: collapse;
}

.giraforms-form-data table th {
	position: sticky;
    left: 0;
	text-align: left;
	padding: 16px 24px;
	font-weight: 600;
	color: #1d2327;
	background: #f9f9f9;
	border-bottom: 1px solid #f0f0f1;
	width: 30%;
	font-size: 14px;
}

.giraforms-form-data table td {
	padding: 16px 24px;
	color: #2c3338;
	border-bottom: 1px solid #f0f0f1;
	font-size: 14px;
	line-height: 1.6;
}

.giraforms-form-data table tr:last-child td,
.giraforms-form-data table tr:last-child th {
	border-bottom: none;
}

.giraforms-form-data table tr:hover {
	background: #f9f9f9;
}

/* Action buttons */
.giraforms-danger-zone {
	margin-top: 30px;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-left: 4px solid #d63638;
}

.giraforms-danger-zone h3 {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #d63638;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.giraforms-danger-zone p {
	margin: 0 0 16px;
	color: #646970;
	font-size: 13px;
}

/* ===========================
   Forms List Grid
   =========================== */

.giraforms-forms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
	gap: 24px;
	margin-top: 20px;
}

.giraforms-form-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	padding: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.giraforms-form-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	border-color: #2271b1;
}

.giraforms-form-card-header {
	padding: 20px 24px;
	background: linear-gradient(135deg, #f6f7f9 0%, #ffffff 100%);
	border-bottom: 1px solid #f0f0f1;
}

.giraforms-form-card-header h2 {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 600;
}

.giraforms-form-card-header h2 a {
	color: #1d2327;
	flex: 1;
	text-decoration: none;
	transition: color 0.2s;
}

.giraforms-form-card-header h2 a:hover {
	color: #2271b1;
}

.giraforms-form-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.giraforms-form-id {
	margin: 0;
	font-size: 12px;
	color: #646970;
}

.giraforms-form-id code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	color: #50575e;
	font-family: "Courier New", Courier, monospace;
}

.giraforms-form-location {
	margin: 0;
	font-size: 13px;
	color: #50575e;
	display: flex;
	align-items: center;
	gap: 6px;
	padding-left: 12px;
	border-left: 1px solid #dcdcde;
}

.giraforms-form-location a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.giraforms-form-location a:hover {
	color: #135e96;
}

.giraforms-form-card-stats {
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.giraforms-stat {
	display: flex;
	align-items: center;
	gap: 12px;
}

.giraforms-stat-icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #eef1fd;
	border-radius: 8px;
}

.giraforms-stat-icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #3858e9;
}

.giraforms-stat-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.giraforms-stat-value {
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1;
}

.giraforms-stat-value.giraforms-stat-unread {
	color: #d63638;
}

.giraforms-stat-label {
	font-size: 12px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	font-weight: 500;
}

.giraforms-form-card-actions {
	padding: 16px 24px;
	background: #f9f9f9;
	border-top: 1px solid #f0f0f1;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.giraforms-form-card-actions .button-primary {
	flex: 1;
	justify-content: center;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.giraforms-form-card-actions .button:not(.button-primary) {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* ===========================
   Submissions Page Filters
   =========================== */

.giraforms-page-header {
	margin-bottom: 20px;
}

.giraforms-page-header-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.giraforms-status-update-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.giraforms-bookings-filters form {
	display: flex;
	gap: 15px;
	align-items: center;
	flex-wrap: wrap;
}

.giraforms-filter-label {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 782px) {
	.giraforms-submission-header {
		flex-direction: column;
		align-items: flex-start;
	}

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

	.giraforms-form-data table th,
	.giraforms-form-data table td {
		display: block;
		width: 100%;
		padding: 12px 16px;
	}

	.giraforms-form-data table th {
		background: transparent;
		border-bottom: none;
		padding-bottom: 4px;
		font-size: 12px;
		color: #646970;
	}

	.giraforms-form-data table td {
		padding-top: 4px;
	}

	.giraforms-forms-grid {
		grid-template-columns: 1fr;
	}

	.giraforms-form-card-actions {
		flex-direction: column;
	}

	.giraforms-form-card-actions .button {
		width: 100%;
		justify-content: center;
	}
}
