/*
 * AMIK 94 — tables, buttons, forms, alerts, login.
 */

/* -------------------------------------------------- tables */
.amik-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.amik-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9375rem;
}

.amik-table th {
	padding: 8px 12px;
	color: var(--steel);
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
	font-size: .6875rem;
	font-weight: 500;
	letter-spacing: .1em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.amik-table td {
	padding: 12px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.amik-table tr:last-child td {
	border-bottom: 0;
}

.amik-table tbody tr:hover td {
	background: rgba(28, 31, 36, .03);
}

.amik-table a {
	color: var(--copper-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.amik-table a:hover {
	color: var(--ink);
}

.amik-contact a {
	display: inline-block;
	margin-bottom: 2px;
}

.amik-table details summary {
	cursor: pointer;
	color: var(--copper-ink);
	font-size: .875rem;
}

.amik-table details p {
	margin: 8px 0 0;
	color: var(--ink);
	font-size: .875rem;
}

.amik-lead-reply__form {
	margin-top: 12px;
	grid-template-columns: minmax(0, 1fr);
}

.amik-lead-reply__existing {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--line);
}

.amik-lead-reply__existing p {
	margin: 0 0 4px;
	font-size: .875rem;
}

.amik-lead-reply__existing span {
	color: var(--steel);
	font-size: .75rem;
}

/* -------------------------------------------------- pills + buttons */
.amik-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: var(--mono);
	font-size: .6875rem;
	font-weight: 400;
	letter-spacing: .06em;
	line-height: 1.6;
	text-transform: uppercase;
	white-space: nowrap;
}

.amik-pill--success {
	color: var(--success);
	background: rgba(47, 106, 73, .08);
}

.amik-pill--warn {
	color: var(--warn);
	background: rgba(122, 83, 16, .08);
}

.amik-pill--accent {
	color: var(--copper-ink);
	background: rgba(194, 112, 61, .08);
}

.amik-pill--neutral {
	color: var(--steel);
	background: rgba(90, 95, 102, .06);
}

.amik-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 14px;
	background: var(--copper, #c2703d);
	color: var(--deep, #14171b);
	border: 1px solid var(--copper, #c2703d);
	border-radius: 2px;
	font-family: var(--sans);
	font-size: .875rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.amik-btn:hover {
	background: var(--copper-light, #d18a5c);
	border-color: var(--copper-light, #d18a5c);
	color: var(--paper-2);
}

.amik-btn--ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}

.amik-btn--ghost:hover {
	background: rgba(28, 31, 36, .05);
	border-color: var(--ink);
	color: var(--ink);
}

.amik-btn--small {
	min-height: 32px;
	padding: 5px 10px;
	font-size: .8125rem;
}

.amik-link {
	padding: 0;
	background: none;
	border: 0;
	color: var(--copper-ink);
	font-family: var(--sans);
	font-size: .875rem;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.amik-link:hover {
	color: var(--ink);
}

.amik-link--danger {
	color: var(--danger);
}

.amik-danger {
	color: var(--danger) !important;
	border-color: rgba(150, 52, 44, .4) !important;
}

/* -------------------------------------------------- forms */
.amik-form {
	margin: 0;
}

.amik-form__form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.amik-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.amik-field--full {
	grid-column: 1 / -1;
}

.amik-field label,
.amik-label {
	color: var(--steel);
	font-family: var(--mono);
	font-size: .6875rem;
	font-weight: 500;
	letter-spacing: .1em;
	line-height: 1.5;
	text-transform: uppercase;
}

.amik-field input[type="text"],
.amik-field input[type="email"],
.amik-field input[type="tel"],
.amik-field input[type="url"],
.amik-field input[type="password"],
.amik-field input[type="number"],
.amik-field input[type="date"],
.amik-field select,
.amik-field textarea,
.amik-message-form textarea,
.amik-login input[type="text"],
.amik-login input[type="email"],
.amik-login input[type="password"] {
	width: 100%;
	min-height: 44px;
	padding: 9px 12px;
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: 2px;
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color 120ms ease;
}

.amik-field textarea,
.amik-message-form textarea {
	min-height: 104px;
	resize: vertical;
}

.amik-field input:focus,
.amik-field select:focus,
.amik-field textarea:focus,
.amik-message-form textarea:focus,
.amik-login input:focus {
	border-color: var(--copper);
	outline: 2px solid var(--copper-ink, #96502a);
	outline-offset: 1px;
}

.amik-check label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--ink);
	font-family: var(--sans);
	font-size: .9375rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
	text-transform: none;
	cursor: pointer;
}

.amik-check input[type="checkbox"] {
	width: auto;
	min-height: 0;
	margin-top: 3px;
	flex: 0 0 auto;
	accent-color: var(--copper-ink);
}

.amik-alert {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-left: 3px solid var(--steel);
	background: rgba(90, 95, 102, .06);
	font-size: .9375rem;
	line-height: 1.55;
}

.amik-alert--success {
	border-left-color: var(--success);
	background: rgba(47, 106, 73, .08);
}

.amik-alert--error {
	border-left-color: var(--danger);
	background: rgba(150, 52, 44, .07);
}

.amik-alert--warn {
	border-left-color: var(--warn);
	background: rgba(122, 83, 16, .07);
}

/* -------------------------------------------------- toast + empty */
.amik-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: var(--ink);
	color: var(--paper-2);
	border-left: 3px solid var(--copper);
}

.amik-toast p {
	margin: 0;
	font-size: .9375rem;
	line-height: 1.5;
}

.amik-toast--error {
	border-left-color: #e08a80;
	background: var(--deep);
}

.amik-toast__close {
	margin-left: auto;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.amik-empty {
	padding: 32px 16px;
	border: 1px dashed var(--line);
	color: var(--steel);
	text-align: center;
}

.amik-empty p {
	margin: 0;
}

/* -------------------------------------------------- login */
.amik-portal--login {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 0;
	padding: 32px 16px;
	background: transparent;
	border: 0;
}

.amik-login {
	width: 100%;
	max-width: 420px;
	padding: 28px;
	background: var(--paper-2);
	border: 1px solid var(--line);
}

.amik-login h2 {
	margin: 0 0 8px;
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.25;
}

.amik-login form {
	margin: 16px 0 0;
}

.amik-login form p {
	margin: 0 0 14px;
}

.amik-login label {
	display: block;
	margin-bottom: 6px;
	color: var(--steel);
	font-family: var(--mono);
	font-size: .6875rem;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.amik-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--ink);
	font-family: var(--sans);
	font-size: .875rem;
	letter-spacing: 0;
	text-transform: none;
}

.amik-login .login-submit input {
	width: 100%;
	min-height: 44px;
	padding: 8px 14px;
	background: var(--copper, #c2703d);
	color: var(--deep, #14171b);
	border: 1px solid var(--copper, #c2703d);
	border-radius: 2px;
	font-family: var(--sans);
	font-size: .9375rem;
	font-weight: 500;
	cursor: pointer;
}

.amik-login .login-submit input:hover {
	background: var(--deep);
}

.amik-login a {
	color: var(--copper-ink);
}
