/**
 * Smart Warranty Club — frontend styles.
 *
 * Scoped entirely under `.swc-` prefixed classes so the plugin never leaks styling
 * into the surrounding theme.
 *
 * @package SmartWarrantyClub
 * @since   1.3.0
 */

.swc-form,
.swc-panel {
	direction: rtl;
	max-width: 720px;
	margin: 0 auto;
	font-family: Tahoma, "Iranian Sans", sans-serif;
	color: #1f2430;
	line-height: 1.8;
}

.swc-hidden {
	display: none !important;
}

/* Steps ------------------------------------------------------------------ */
.swc-steps {
	display: flex;
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	gap: 8px;
}

.swc-steps li {
	flex: 1;
	text-align: center;
	padding: 9px 6px;
	font-size: 13px;
	border-radius: 8px;
	background: #eef1f5;
	color: #7b8494;
}

.swc-steps li.is-active {
	background: #2b4c7e;
	color: #fff;
}

/* Fields ----------------------------------------------------------------- */
.swc-field {
	margin-bottom: 16px;
}

.swc-field label,
.swc-form-grid label {
	display: block;
	font-size: 13px;
	color: #4a5262;
	margin-bottom: 5px;
}

.swc-field input,
.swc-field select,
.swc-form-grid input,
.swc-form-grid select,
.swc-form-grid textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d4dae3;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
}

.swc-field input:focus,
.swc-form-grid input:focus,
.swc-form-grid select:focus,
.swc-form-grid textarea:focus {
	outline: 2px solid #2b4c7e;
	outline-offset: 1px;
	border-color: #2b4c7e;
}

.swc-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.swc-form-grid__full {
	grid-column: 1 / -1;
}

.swc-req {
	color: #c0392b;
}

@media (max-width: 600px) {
	.swc-form-grid {
		grid-template-columns: 1fr;
	}
}

/* Buttons ---------------------------------------------------------------- */
.swc-btn {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 22px;
	background: #2b4c7e;
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s ease;
}

.swc-btn:hover {
	background: #22406c;
}

.swc-btn--primary {
	width: 100%;
	padding: 13px;
	font-size: 15px;
	font-weight: bold;
}

.swc-btn--link {
	background: none;
	color: #2b4c7e;
	text-decoration: underline;
	padding: 6px 8px;
}

.swc-btn--link:hover {
	background: none;
	color: #17325a;
}

.swc-btn--small {
	padding: 6px 14px;
	font-size: 13px;
}

/* Messages --------------------------------------------------------------- */
.swc-message {
	margin-top: 14px;
	padding: 0;
	font-size: 14px;
	border-radius: 8px;
}

.swc-message.is-error {
	padding: 11px 14px;
	background: #fdeaea;
	color: #a12622;
}

.swc-message.is-success {
	padding: 11px 14px;
	background: #e6f6ec;
	color: #1c7a43;
}

.swc-message:empty {
	display: none;
}

/* Product preview -------------------------------------------------------- */
.swc-product-preview {
	margin-top: 14px;
	padding: 14px 16px;
	background: #f4f7fb;
	border: 1px solid #d9e2ef;
	border-radius: 8px;
	font-size: 14px;
}

/* Panel ------------------------------------------------------------------ */
.swc-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.swc-panel__title {
	margin: 0;
	font-size: 19px;
}

.swc-panel__hint {
	color: #6b7383;
	font-size: 14px;
	margin-top: 4px;
}

.swc-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.swc-stat {
	background: #f4f7fb;
	border: 1px solid #e1e8f2;
	border-radius: 10px;
	padding: 14px 8px;
	text-align: center;
}

.swc-stat__value {
	display: block;
	font-size: 22px;
	font-weight: bold;
	color: #2b4c7e;
}

.swc-stat__label {
	display: block;
	font-size: 12px;
	color: #6b7383;
	margin-top: 3px;
}

@media (max-width: 600px) {
	.swc-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Tabs ------------------------------------------------------------------- */
.swc-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 2px solid #e1e8f2;
	margin-bottom: 18px;
}

.swc-tab {
	background: none;
	border: 0;
	padding: 11px 18px;
	font-size: 14px;
	font-family: inherit;
	color: #6b7383;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.swc-tab.is-active {
	color: #2b4c7e;
	font-weight: bold;
	border-bottom-color: #2b4c7e;
}

/* List items ------------------------------------------------------------- */
.swc-item {
	border: 1px solid #e1e8f2;
	border-radius: 10px;
	padding: 15px 17px;
	margin-bottom: 12px;
	background: #fff;
}

.swc-item.is-unread {
	border-right: 4px solid #2b4c7e;
	background: #f7faff;
}

.swc-item h4 {
	margin: 0 0 7px;
	font-size: 15px;
}

.swc-item__meta {
	font-size: 13px;
	color: #6b7383;
}

.swc-item__reason {
	margin-top: 8px;
	padding: 9px 12px;
	background: #fdeaea;
	color: #a12622;
	border-radius: 6px;
	font-size: 13px;
}

.swc-empty {
	color: #8b93a1;
	font-size: 14px;
	text-align: center;
	padding: 26px 0;
}

.swc-success {
	text-align: center;
	padding: 34px 20px;
	background: #e6f6ec;
	border-radius: 12px;
	color: #1c7a43;
}

.swc-success h3 {
	margin: 0 0 8px;
}

/* ---------------------------------------------------------------------------
 * 2.1.0 — public warranty lookup page (serial or national ID)
 * ------------------------------------------------------------------------ */

.swc-lookup {
	max-width: 620px;
	margin: 0 auto;
	padding: 22px;
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	background: #fff;
	text-align: right;
}

.swc-lookup__title {
	margin: 0 0 8px;
	font-size: 20px;
}

.swc-lookup__hint {
	margin: 0 0 18px;
	color: #5b6472;
	line-height: 1.9;
}

.swc-lookup__form .swc-field {
	margin-bottom: 14px;
}

.swc-lookup__form input[type="text"] {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #c9ced6;
	border-radius: 6px;
	font-size: 17px;
	letter-spacing: 2px;
	text-align: center;
}

.swc-field--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.swc-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #4a5260;
	font-size: 14px;
	cursor: pointer;
}

.swc-lookup__heading {
	margin: 22px 0 10px;
	font-size: 16px;
}

.swc-lookup__card {
	margin-bottom: 14px;
	padding: 14px 16px;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	background: #fafbfc;
}

.swc-lookup__card .swc-kv {
	width: 100%;
	border-collapse: collapse;
}

.swc-lookup__card .swc-kv th,
.swc-lookup__card .swc-kv td {
	padding: 8px 4px;
	border-bottom: 1px solid #eceff2;
	text-align: right;
	vertical-align: top;
}

.swc-lookup__card .swc-kv th {
	width: 38%;
	color: #6b7383;
	font-weight: 500;
}

.swc-lookup__card .swc-kv tr:last-child th,
.swc-lookup__card .swc-kv tr:last-child td {
	border-bottom: 0;
}

.swc-lookup__card code {
	padding: 2px 7px;
	border-radius: 4px;
	background: #eef1f5;
	letter-spacing: 1px;
}

.swc-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.8;
}

.swc-badge--ok { background: #e6f6ec; color: #1c7a43; }
.swc-badge--warn { background: #fdf3e0; color: #8a6100; }
.swc-badge--bad { background: #fdeaea; color: #a12622; }

/* Username/password login form of the customer panel. */
.swc-login {
	max-width: 360px;
}

.swc-login .swc-field {
	margin-bottom: 14px;
}

.swc-login input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #c9ced6;
	border-radius: 6px;
	font-size: 15px;
}
