/**
 * Themeatos Hosting — Frontend styles
 *
 * Table of contents
 * 1. Variables
 * 2. Pricing table
 * 3. Domain search
 * 4. Configure page
 * 5. My Account dashboard
 * 6. Media queries
 */

/* 1. Variables */
.thm-pricing,
.thm-domain-search,
.thm-configure,
.thm-account {
	--thm-accent: #5b3df5;
	--thm-accent-soft: #efecff;
	--thm-border: #e4e4ec;
	--thm-text-muted: #6b6b80;
	--thm-success: #13875b;
	--thm-danger: #c62f3b;
	--thm-radius: 14px;
}

/* 2. Pricing table */
.thm-pricing__toggle {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin: 0 auto 32px;
	padding: 4px;
	width: max-content;
	border: 1px solid var(--thm-border);
	border-radius: 999px;
}

.thm-pricing__toggle-btn {
	padding: 8px 22px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-weight: 600;
	cursor: pointer;
}

.thm-pricing__toggle-btn[aria-pressed="true"] {
	background: var(--thm-accent);
	color: #fff;
}

.thm-pricing__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.thm-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 28px 24px;
	border: 1px solid var(--thm-border);
	border-radius: var(--thm-radius);
	background: #fff;
}

.thm-plan--highlight {
	border: 2px solid var(--thm-accent);
	box-shadow: 0 12px 32px rgba(91, 61, 245, 0.14);
}

.thm-plan__badge {
	position: absolute;
	top: -12px;
	left: 24px;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--thm-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.thm-plan__name {
	margin: 0 0 12px;
}

.thm-plan__amount {
	font-size: 2rem;
	font-weight: 800;
}

.thm-plan__unit,
.thm-plan__note {
	color: var(--thm-text-muted);
}

.thm-plan__note {
	display: block;
	margin-top: 4px;
	font-size: 0.875rem;
}

.thm-plan__save {
	margin-left: 6px;
	color: var(--thm-success);
}

.thm-plan__cta,
.thm-domain-search__button,
.thm-domain-results__select,
.thm-action-form [type="submit"] {
	display: inline-block;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: var(--thm-accent);
	color: #fff;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.thm-plan__cta:hover,
.thm-plan__cta:focus,
.thm-domain-search__button:hover,
.thm-domain-results__select:hover,
.thm-action-form [type="submit"]:hover {
	color: #fff;
	opacity: 0.9;
}

.thm-domain-search__button:disabled,
.thm-domain-results__select:disabled,
.thm-action-form [type="submit"]:disabled {
	cursor: wait;
	opacity: 0.6;
}

.thm-plan__cta {
	display: block;
	margin: 20px 0 8px;
}

.thm-plan__free-domain {
	margin: 0;
	color: var(--thm-success);
	font-size: 0.875rem;
	font-weight: 600;
}

.thm-plan__features {
	margin: 20px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--thm-border);
	list-style: none;
}

.thm-plan__features li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 22px;
}

.thm-plan__features li::before {
	position: absolute;
	left: 0;
	color: var(--thm-success);
	content: "\2713";
	font-weight: 700;
}

.thm-pricing[data-active-period="year"] .thm-plan--both .thm-plan__price--month,
.thm-pricing[data-active-period="month"] .thm-plan--both .thm-plan__price--year {
	display: none;
}

/* 3. Domain search */
.thm-domain-search__bar {
	display: flex;
	gap: 8px;
}

.thm-domain-search__input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid var(--thm-border);
	border-radius: 10px;
	font-size: 1rem;
}

.thm-domain-search__order {
	display: none;
}

.thm-domain-results {
	margin: 16px 0 0;
	padding: 0;
	border: 1px solid var(--thm-border);
	border-radius: var(--thm-radius);
	list-style: none;
}

.thm-domain-results__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--thm-border);
}

.thm-domain-results__item:last-child {
	border-bottom: 0;
}

.thm-domain-results__item.is-exact {
	background: var(--thm-accent-soft);
}

.thm-domain-results__item.is-taken {
	color: var(--thm-text-muted);
}

.thm-domain-results__name {
	flex: 1;
	font-weight: 600;
	word-break: break-all;
}

.thm-domain-results__error {
	color: var(--thm-danger);
}

/* 4. Configure page */
.thm-configure__summary {
	margin-bottom: 24px;
	padding: 20px 24px;
	border: 1px solid var(--thm-border);
	border-radius: var(--thm-radius);
}

.thm-configure__offer {
	color: var(--thm-success);
	font-weight: 600;
}

.thm-configure__tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.thm-configure__tab {
	padding: 10px 18px;
	border: 1px solid var(--thm-border);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	cursor: pointer;
}

.thm-configure__tab.is-active {
	border-color: var(--thm-accent);
	background: var(--thm-accent-soft);
	font-weight: 600;
}

.thm-configure__panel {
	display: none;
}

.thm-configure__panel.is-active {
	display: block;
}

.thm-configure__hint {
	color: var(--thm-text-muted);
	font-size: 0.875rem;
}

/* 5. My Account dashboard */
.thm-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: #f1f1f5;
	font-size: 0.8125rem;
	font-weight: 600;
}

.thm-status--active {
	background: #e3f6ee;
	color: var(--thm-success);
}

.thm-status--suspended,
.thm-status--failed,
.thm-status--expired {
	background: #fde8ea;
	color: var(--thm-danger);
}

.thm-account__actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
	margin-top: 24px;
}

.thm-action-form {
	padding: 20px;
	border: 1px solid var(--thm-border);
	border-radius: var(--thm-radius);
}

.thm-action-form h3 {
	margin-top: 0;
}

.thm-action-form input[type="password"],
.thm-action-form select,
.thm-action-form textarea {
	width: 100%;
}

.thm-action-form__message.is-success {
	color: var(--thm-success);
}

.thm-action-form__message.is-error {
	color: var(--thm-danger);
}

/* 6. Media queries */
@media screen and (max-width: 600px) {
	.thm-domain-search__bar,
	.thm-configure__tabs {
		flex-direction: column;
	}

	.thm-domain-results__item {
		flex-wrap: wrap;
	}
}
