@use 'mixin' as *;

.rcf7-quick-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 5px;

	@media (min-width: 560px) {
		gap: 1.5rem;
		grid-template-columns: 1fr 1fr;
	}
}

.rcf7-quick-action-card {
	padding: 1rem;

	&__header {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	&__title {
		letter-spacing: -0.025em;
		font-size: 1.125rem;
		line-height: 1;
		margin: 0;
	}

	&__content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		flex-grow: 1;
	}

	&__description {
		color: var(--rcf7-gray-700);
	}
}

.rcf7-form-entries {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;

	&__section {
		@media (min-width: 560px) {
			padding: 1.5rem;
		}

		&.no-padding {
			padding: 0;
		}
	}

	h3 {
		margin-bottom: 0;
	}
}

.rcf7-chart {
	display: flex;
	flex-direction: column;

	&__controls {
		display: flex;
		flex-direction: row;
		justify-content: flex-end;
		align-items: center;
		gap: 5px;
	}

	&__render {
		flex-grow: 1;
	}
}

.rcf7-table {
	width: 100%;
	border-collapse: collapse;
	border-radius: 8px;
	overflow: hidden;
	background: var(--rcf7-background);
	border: 1px solid var(--rcf7-border);
	box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);

	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;

	table {
		width: 100%;
		border-spacing: 0;

		a {
			text-decoration: none;
		}

		thead {
			background-color: var(--rcf7-table-header-bg);

			th {
				text-align: left;
				padding: 1rem;
				font-weight: 600;
				border-bottom: 2px solid var(--rcf7-border);
				font-size: 0.85rem;
				text-transform: uppercase;
				letter-spacing: 0.03em;
				color: var(--rcf7-table-header-text);

				&:last-child {
					text-align: center;
				}
			}
		}

		tbody {
			tr {
				border-bottom: 1px solid var(--rcf7-border);
				transition: background 0.2s ease-in-out;

				&:hover {
					background-color: var(--rcf7-table-row-hover);
				}

				td {
					padding: 0.85rem 1rem;
					vertical-align: middle;
					font-size: 0.875rem;
					color: var(--rcf7-text-main);

					&:last-child {
						text-align: center;
					}
				}
			}
		}
	}

	&__actions {
		display: flex;
		gap: 0.5rem;
		justify-content: center;
	}

	&__no-entries {
		padding: 2rem;
		text-align: center;
		background-color: var(--rcf7-table-row-hover);
		border: 1px solid var(--rcf7-border);
		border-radius: 6px;
		color: var(--rcf7-text-main);
		font-style: italic;
	}
}

.rcf7-stats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;

	@media (min-width: 560px) {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.rcf7-stat {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 0.5rem;
	align-items: center;

	&__icon {
		display: flex;
		padding: 1rem;
		border-radius: 100%;
	}

	&__number {
		font-size: 2rem;
	}

	&__description {
		margin: 0;
		color: var(--rcf7-gray-600);
	}
}

.rcf7-adv-settings {
	&__container {
		padding: 1rem;
		background: var(--rcf7-background);
	}

	&__updates {
		margin-top: 5px;
		display: flex;
		align-items: flex-end;
		gap: 0.5rem;
	}

	&__error {
		color: var(--rcf7-red-600);
		background-color: var(--rcf7-gray-100);
		width: fit-content;
		padding: 0.5rem;
		border-radius: 8px;
	}
}

.rcf7-resources {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;

	@media (min-width: 560px) {
		grid-template-columns: 1fr 1fr 1fr 1fr;
		gap: 2rem;
	}
}

.rcf7-resource {
	padding: 1rem;

	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;

	cursor: pointer;

	transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	border: 1px solid var(--rcf7-border);
	border-radius: 8px;

	&:hover {
		transform: translateY(-5px);
		box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
		border-color: var(--rcf7-border-hover);
	}

	&:active {
		transform: translateY(-2px);
		box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
	}

	&__title {
		font-size: 1.2rem;
		color: var(--rcf7-gray-700);
	}

	&__description {
		margin: 0;
		color: var(--rcf7-gray-600);
	}
}

.rcf7-unlock-banner {
	padding: 1rem; // p-4 equivalent
	border: 1px solid var(--rcf7-gray-300);
	border-radius: 0.5rem; // rounded-lg equivalent
	background-color: var(--rcf7-blue-50); // bg-blue-50 equivalent
	display: flex;
	justify-content: space-between;
	align-items: center;

	&__content {
		flex: 1;
	}

	&__title {
		font-weight: 500; // font-medium equivalent
		color: var(--rcf7-blue-800); // text-blue-800 equivalent
		margin: 0 0 0.5rem 0;
	}

	&__description {
		font-size: 0.875rem; // text-sm equivalent
		color: var(--rcf7-blue-700); // text-blue-700 equivalent
		margin: 0;
	}

	@media (max-width: 640px) {
		flex-direction: column;
		align-items: flex-start;
	}
}

.rcf7-docs-section {
	display: flex;
	flex-direction: column;
	gap: 15px;

	.rcf7-docs-list {
		margin: 0;
		padding: 0;
		list-style: none;
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-gap: 15px;

		li {
			margin-bottom: 0;

			a {
				color: var(--rcf7-link);
				text-decoration: none;
				font-size: 14px;
				display: inline-block;
				padding: 2px 0;

				&:hover {
					color: var(--rcf7-link-hover);
					text-decoration: underline;
				}

				&::before {
					content: "→";
					margin-right: 5px;
					display: inline-block;
				}
			}
		}
	}
}

.rcf7-select {
	appearance: none;
	background-color: var(--rcf7-background);
	border-radius: var(--rcf7-btn-radius);
	border: 1px solid var(--rcf7-border);
	color: var(--rcf7-text-main);
	font-size: 0.875rem;
	line-height: 1.5;
	padding: 0.5rem 2.5rem 0.5rem 0.75rem;
	width: 100%;
	height: 2.5rem;
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1rem;
	transition: var(--rcf7-transition-fast);
	cursor: pointer;

	&:focus {
		outline: none;
		box-shadow:
			0 0 0 2px var(--rcf7-background),
			0 0 0 4px var(--rcf7-primary-light);
		border-color: var(--rcf7-primary);
	}

	&:hover {
		border-color: var(--rcf7-gray-400);
	}

	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}

	option {
		color: var(--rcf7-text-main);
		background-color: var(--rcf7-background);
	}
}