/* ── My Account - Plans page ──────────────────────────────────────────────── */

/* ── Family plan group wrapper ───────────────────────────────────────────── */

.sm-family-plan-group {
	grid-column: 1 / -1; /* span all grid columns */
	border-radius: 10px;
	padding: 20px;
	background: #fff9ee;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── Individual line wrapper (non-family) ────────────────────────────────── */

.sm-plan-line-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-radius: 10px;
	padding: 20px;
	background: #fff9ee;
}

.sm-plan-line-wrap__title {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	color: #333;
}

.sm-family-plan-group__title {
	margin: 0;
	font-size: 1em;
	font-weight: 600;
	color: #333;
}

.switch-mobile-current-plan__toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 16px;
}

.switch-mobile-current-plan__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.switch-mobile-current-plan__card {
	flex: 1 1 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
}

.switch-mobile-current-plan__card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 8px;
}

.switch-mobile-current-plan__card-title {
	margin: 0;
	font-size: 1rem;
}

.switch-mobile-current-plan__child-note {
	font-size: .85em;
	color: #888;
}

.switch-mobile-current-plan__fields {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: .875rem;
}

.switch-mobile-current-plan__field {
	display: flex;
	gap: 8px;
}

.switch-mobile-current-plan__field-label {
	flex: 0 0 auto;
	min-width: 110px;
	font-weight: 600;
	color: #555;
}

.switch-mobile-current-plan__field-value {
	flex: 1;
}

/* ── Plan card sub-header ────────────────────────────────────────────────── */

.sm-plan-name {
	margin: 2px 0 0;
	font-size: .85rem;
	color: #666;
}

.sm-card-badges {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	flex-shrink: 0;
}

/* ── Line-type badge (eSIM / Physical SIM) ───────────────────────────────── */

.sm-line-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.sm-line-badge--esim {
	background: #ede9fe;
	color: #5b21b6;
}

.sm-line-badge--physical_sim {
	background: #e0f2fe;
	color: #075985;
}

/* ── Replacement SIM on the way ──────────────────────────────────────────── */

.sm-replacement-notice {
	margin: 0 0 14px;
	padding: 10px 12px;
	background: #fff8e5;
	border-left: 3px solid #dba617;
}

.sm-replacement-notice__text {
	margin: 0;
	font-size: .875rem;
	line-height: 1.5;
}

.sm-replacement-notice__tracking {
	margin: 8px 0 0;
	font-size: .875rem;
}

.sm-replacement-notice__tracking a {
	font-weight: 600;
}

/* ── BYOP eSIM activate form ─────────────────────────────────────────────── */

.sm-byop-form {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #e0e0e0;
}

.sm-byop-form__intro {
	margin: 0 0 8px;
	font-size: .875rem;
	font-weight: 600;
}

.sm-byop-form__row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.sm-byop-form__row input[type="text"] {
	flex: 1;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: .875rem;
}

.sm-byop-form__hint {
	margin: 6px 0 0;
	font-size: .78rem;
	color: #888;
}

.sm-byop-feedback {
	margin-top: 6px;
	font-size: .85rem;
}

.sm-byop-feedback--error {
	color: #991b1b;
}

.sm-byop-success {
	margin: 0;
	font-size: .875rem;
	color: #166534;
}

/* eSIM layout + activation-code styling (.sm-esim-layout / .sm-esim-code*)
   moved to esim-code.css so it can be shared with the thank-you page. */

/* ── Port-in pending (unenrolled line) ───────────────────────────────────── */

.sm-portin-pending {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 12px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	font-size: .85rem;
	color: #1e40af;
}

.sm-portin-pending__icon {
	flex-shrink: 0;
	font-style: normal;
}

/* ── Port-in notification bar (enrolled line, port-in in progress) ───────── */

.sm-portin-notification {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding: 10px 14px;
	border-radius: 6px;
	background: #EB5633;
	color: #fff;
}

.sm-portin-notification__text {
	font-size: .9em;
	line-height: 1.4;
	color: #fff;
}

.sm-portin-notification__text strong {
	color: #fff!important;
	display: inline;
}

.sm-portin-notification .button.sm-view-portin-status-btn {
	background: #000;
	color: #fff!important;
	padding: 10px;
	border-radius: 10px;
	border: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.sm-portin-notification .button.sm-view-portin-status-btn:hover {
	background-color: #F9B700!important;
	color: #000;
}

/* ── Change IMEI (pending_portin) ────────────────────────────────────────── */

.sm-change-imei-wrap {
	margin-top: 8px;
}

.sm-change-imei-toggle {
	background: none;
	border: none;
	padding: 0;
	font-size: .82em;
	color: #0073aa;
	cursor: pointer;
	text-decoration: underline;
	font-family: inherit;
}

.sm-change-imei-toggle:hover {
	color: #005177;
	text-decoration: none;
}

.sm-change-imei-form {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.sm-change-imei-input {
	flex: 1;
	min-width: 160px;
	max-width: 220px;
}

.sm-change-imei-feedback {
	font-size: .85em;
	width: 100%;
}

.sm-change-imei-feedback--error   { color: #c00; }
.sm-change-imei-feedback--success { color: #1e675e; }

/* ── Pending shipment note ───────────────────────────────────────────────── */

.sm-pending-shipment-note {
	margin: 10px 0 0;
	font-size: .85rem;
	color: #92400e;
}

/* ── Inline usage section ────────────────────────────────────────────────── */

.sm-usage-section {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e0e0e0;
}

.sm-usage-inline {
	margin-top: 10px;
}

/* ── Change Plan button wrap ─────────────────────────────────────────────── */

.sm-change-plan-wrap {
	margin-top: 10px;
}

/* ── Auto-Renewal Section ────────────────────────────────────────────────── */

.switch-mobile-current-plan__card,
.sm-renewal-section {
	scroll-margin-top: 120px;
}

.sm-renewal-section {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sm-renewal-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sm-renewal-section__title {
	font-weight: 600;
	font-size: .875rem;
	color: #333;
}

.sm-renewal-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.sm-renewal-badge--active {
	background: #dcfce7;
	color: #166534;
}

.sm-renewal-badge--warning {
	background: #fef9c3;
	color: #92400e;
}

.sm-renewal-badge--error {
	background: #fee2e2;
	color: #991b1b;
}

.sm-renewal-badge--muted {
	background: #f1f5f9;
	color: #64748b;
}

.sm-renewal-section__meta {
	font-size: .85rem;
	color: #555;
}

.sm-autopay-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .875rem;
	cursor: pointer;
	user-select: none;
}

.sm-autopay-toggle--disabled {
	opacity: .5;
	cursor: not-allowed;
}

.sm-autopay-toggle input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #7b2cbf;
}

.sm-autopay-toggle--disabled input[type="checkbox"] {
	cursor: not-allowed;
}

.sm-autopay-feedback {
	font-size: .8rem;
	font-style: italic;
}

.sm-autopay-feedback--ok {
	color: #166534;
}

.sm-autopay-feedback--error {
	color: #991b1b;
}

.sm-cancel-renewal-btn {
	align-self: flex-start;
	font-size: .8rem !important;
	padding: 4px 12px !important;
	color: #b91c1c !important;
	border-color: #b91c1c !important;
	background: transparent !important;
}

.sm-cancel-renewal-btn:hover {
	background: #fee2e2 !important;
}

/* ── Change Plan Modal ────────────────────────────────────────────────────── */

#sm-change-plan-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sm-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.sm-modal-box {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 32px;
	max-width: 520px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	z-index: 1;
}

.sm-modal-loading {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, .85);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	z-index: 2;
}

.sm-modal-loading p {
	margin: 0;
	font-size: .9rem;
	color: #555;
}

.sm-modal-loading__spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e0e0e0;
	border-top-color: #7b2cbf;
	border-radius: 50%;
	animation: sm-spin .7s linear infinite;
}

@keyframes sm-spin {
	to { transform: rotate(360deg); }
}

.sm-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 1.3rem;
	cursor: pointer;
}

/* ── In-modal plan selector ───────────────────────────────────────────────── */

.sm-plan-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0;
}

.sm-plan-option {
	display: flex;
	align-items: center;
	gap: 14px;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	padding: 16px 18px;
	cursor: pointer;
	transition: border-color .15s, background .15s, box-shadow .15s;
}

.sm-plan-option:hover {
	border-color: #7b2cbf;
	background: #faf5ff;
}

.sm-plan-option--selected {
	border-color: #7b2cbf;
	background: #f3e8ff;
	box-shadow: 0 0 0 1px #7b2cbf;
}

.sm-plan-option__radio {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .15s;
}

.sm-plan-option__radio::after {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #7b2cbf;
	opacity: 0;
	transition: opacity .15s;
}

.sm-plan-option--selected .sm-plan-option__radio {
	border-color: #7b2cbf;
}

.sm-plan-option--selected .sm-plan-option__radio::after {
	opacity: 1;
}

.sm-plan-option__info {
	flex: 1;
}

.sm-plan-option__name {
	display: block;
	font-weight: 600;
	font-size: .95rem;
}

.sm-plan-option__price {
	display: block;
	font-size: .85rem;
	color: #555;
	margin-top: 2px;
}

.sm-change-type-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 16px;
}

.sm-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 14px;
	cursor: pointer;
}

.sm-option input {
	margin-top: 3px;
	flex-shrink: 0;
}

.sm-option strong {
	display: block;
	margin-bottom: 2px;
}

.sm-option small {
	color: #666;
}

.sm-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	justify-content: flex-end;
}

/* ── Purchased add-ons (per line, Plans page) ─────────────────────────────── */
.sm-line-addons {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e5e7eb;
}

.sm-line-addons__title {
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #64748b;
	margin: 0 0 8px;
}

.sm-line-addons__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sm-line-addons__item {
	padding: 8px 0;
	border-bottom: 1px solid #f1f5f9;
}

.sm-line-addons__item:last-child {
	border-bottom: none;
}

.sm-line-addons__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.sm-line-addons__name {
	font-weight: 600;
	color: #0f172a;
}

.sm-line-addons__amount {
	font-weight: 600;
	color: #0f172a;
	white-space: nowrap;
}

.sm-line-addons__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin-top: 2px;
	font-size: .8rem;
	color: #64748b;
}

.sm-line-addons__valid--expired {
	color: #991b1b;
}
