/* ============================================================
   store-subscribe.css — Step-by-step subscription wizard
   ============================================================ */

/* --- Layout --- */
#subscribeApp { min-height: 80vh; }

.sub-container {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 24px;
}
.sub-body {
	display: flex;
	gap: 32px;
	align-items: flex-start;
	padding-top: 24px;
	padding-bottom: 48px;
}
.sub-main { flex: 1; min-width: 0; }
.sub-sidebar { width: 340px; flex-shrink: 0; position: sticky; top: 20px; }

/* --- Top bar / progress --- */
.sub-topbar {
	padding: 20px 0 0;
}
.sub-back-btn {
	width: 44px; height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.15);
	background: transparent;
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	cursor: pointer;
	transition: background .2s;
}
.sub-back-btn:hover { background: rgba(255,255,255,.08); }
.sub-step-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.5px;
	color: rgba(255,255,255,.6);
}
.sub-progress {
	display: flex; gap: 6px;
}
.sub-progress-seg {
	flex: 1; height: 4px;
	border-radius: 2px;
	background: rgba(255,255,255,.12);
	transition: background .3s;
}
#subscribeApp[data-step="1"] .sub-progress-seg[data-seg="1"],
#subscribeApp[data-step="2"] .sub-progress-seg[data-seg="1"],
#subscribeApp[data-step="2"] .sub-progress-seg[data-seg="2"],
#subscribeApp[data-step="3"] .sub-progress-seg[data-seg="1"],
#subscribeApp[data-step="3"] .sub-progress-seg[data-seg="2"],
#subscribeApp[data-step="3"] .sub-progress-seg[data-seg="3"] {
	background: #0a0;
}

/* --- Step visibility --- */
.sub-step { display: none; }
#subscribeApp[data-step="1"] [data-sub-step="1"],
#subscribeApp[data-step="2"] [data-sub-step="2"],
#subscribeApp[data-step="3"] [data-sub-step="3"] { display: block; }

/* --- Typography --- */
.sub-title {
	font-size: 24px;
	font-weight: 700;
	margin: 24px 0 20px;
	line-height: 1.3;
}
.sub-subtitle {
	font-size: 14px;
	color: rgba(255,255,255,.5);
	margin: -12px 0 20px;
}
.sub-subtitle a { color: #0a0; }
.sub-label {
	display: block;
	font-size: 13px;
	color: rgba(255,255,255,.5);
	margin-bottom: 6px;
}
.sub-hint {
	font-size: 13px;
	color: rgba(255,255,255,.35);
}

/* --- Inputs --- */
.sub-input {
	display: block; width: 100%;
	padding: 14px 16px;
	font-size: 15px;
	color: #fff;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 10px;
	outline: none;
	transition: border-color .2s;
}
.sub-input::placeholder { color: rgba(255,255,255,.25); }
.sub-input:focus { border-color: #0a0; }
.sub-input.is-invalid { border-color: #f44; }
.sub-input.is-valid { border-color: #0a0; }
.sub-input-feedback {
	font-size: 12px;
	color: #f44;
	margin-top: 4px;
}
select.sub-input { appearance: auto; }

.sub-input-icon {
	position: relative;
}
.sub-input-icon > i:first-child {
	position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
	color: rgba(255,255,255,.3); font-size: 16px; pointer-events: none;
}
.sub-input-icon > .sub-input { padding-left: 42px; }

.sub-input-icon.sub-input-icon-right > i:last-child {
	position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
	color: rgba(255,255,255,.3); font-size: 16px; cursor: pointer;
}

.sub-input[readonly] {
	opacity: .6;
	cursor: not-allowed;
}

/* --- Rows --- */
.sub-row {
	display: flex; gap: 12px;
	margin-bottom: 12px;
}
.sub-col { flex: 1; min-width: 0; }
.sub-col-sm { flex: 0 0 140px; }

/* --- Buttons --- */
.sub-btn-primary {
	display: block; width: 100%;
	padding: 16px;
	font-size: 17px; font-weight: 600;
	color: #fff;
	background: #007a00;
	border: none; border-radius: 12px;
	cursor: pointer;
	transition: background .2s;
	margin-top: 24px;
}
.sub-btn-primary:hover { background: #009a00; }
.sub-btn-primary:disabled {
	opacity: .5; cursor: not-allowed;
}

.sub-secure {
	text-align: center;
	margin-top: 16px;
	font-size: 13px;
	color: rgba(255,255,255,.35);
}
.sub-secure i { color: rgba(255,255,255,.3); }

.sub-logged-notice {
	margin-bottom: 12px;
}
.sub-logged-notice a { color: #0a0; font-size: 14px; }

/* --- Step 3: Plan card --- */
.sub-plan-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border: 1px solid #0a0;
	border-radius: 12px;
	background: rgba(0,170,0,.06);
}
.sub-plan-tag {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	color: #0a0;
	margin-bottom: 2px;
}
.sub-plan-name { font-size: 18px; font-weight: 700; }
.sub-plan-price { font-size: 20px; font-weight: 700; }
.sub-plan-period { font-size: 13px; color: rgba(255,255,255,.5); }

/* --- Payment tabs --- */
.sub-pay-tabs {
	display: flex; gap: 12px;
	margin-bottom: 20px;
}
.sub-pay-tab {
	flex: 1;
	padding: 14px;
	font-size: 15px; font-weight: 500;
	color: rgba(255,255,255,.5);
	background: transparent;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 10px;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	transition: all .2s;
}
.sub-pay-tab:hover { border-color: rgba(255,255,255,.25); }
.sub-pay-tab.active {
	color: #0a0;
	border-color: #0a0;
	background: rgba(0,170,0,.08);
}

/* --- Installment button --- */
.sub-installment-btn {
	cursor: pointer;
	text-align: left;
}

/* --- Sidebar summary --- */
.sub-summary-card {
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 14px;
	padding: 24px;
}
.sub-summary-title {
	font-size: 16px; font-weight: 600;
	margin-bottom: 16px;
	display: flex; align-items: center; gap: 8px;
}
.sub-summary-item {
	display: flex; align-items: center; gap: 12px;
	padding: 8px 0;
}
.sub-summary-item-icon {
	width: 44px; height: 44px;
	background: rgba(0,170,0,.15);
	border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	color: #0a0; font-size: 20px; flex-shrink: 0;
}
.sub-summary-item-info { flex: 1; min-width: 0; }
.sub-summary-item-name { font-weight: 600; font-size: 15px; }
.sub-summary-item-desc { font-size: 13px; color: rgba(255,255,255,.45); }
.sub-summary-item-remove {
	background: none; border: none; color: rgba(255,255,255,.3);
	cursor: pointer; font-size: 16px; padding: 4px;
}
.sub-summary-item-remove:hover { color: #f44; }

.sub-summary-row {
	display: flex; justify-content: space-between;
	padding: 4px 0; font-size: 14px;
}
.sub-summary-row-label { color: rgba(255,255,255,.55); }
.sub-summary-row-value { font-weight: 600; }
.sub-summary-row.economy .sub-summary-row-label,
.sub-summary-row.economy .sub-summary-row-value { color: #0a0; }
.sub-summary-row .sub-summary-row-value strong { font-size: 16px; }

.sub-back-link {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .5px;
	color: rgba(255,255,255,.4);
	text-decoration: none;
}
.sub-back-link:hover { color: rgba(255,255,255,.6); }

/* --- Modals / Overlays --- */
.sub-modal-backdrop {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.6);
	z-index: 9999;
	display: flex; align-items: center; justify-content: center;
}
.sub-modal {
	background: #1e1e1e;
	border-radius: 14px;
	width: 90%; max-width: 420px;
	max-height: 80vh; overflow-y: auto;
}
.sub-modal-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(255,255,255,.1);
}
.sub-modal-header h5 { margin: 0; font-size: 16px; }
.sub-modal-close {
	background: none; border: none; color: rgba(255,255,255,.5);
	font-size: 18px; cursor: pointer;
}
.sub-modal-body { padding: 12px 20px 20px; }

.sub-installment-option {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(255,255,255,.06);
	cursor: pointer;
}
.sub-installment-option:last-child { border-bottom: none; }
.sub-installment-option input { accent-color: #0a0; }
.sub-installment-option .inst-label { flex: 1; font-size: 14px; }
.sub-installment-option .inst-value { font-weight: 600; font-size: 14px; }

/* --- Payment overlay --- */
.sub-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.5);
	z-index: 99999;
	display: flex; align-items: center; justify-content: center;
}
.sub-overlay-card {
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	min-width: 320px; max-width: 480px;
	text-align: center;
	color: #333;
}
.sub-overlay-state { display: none; }
.sub-overlay-state[data-state].visible { display: block; }
.sub-spinner {
	width: 56px; height: 56px;
	border-radius: 50%;
	border: 4px solid #ddd;
	border-top-color: #0a0;
	animation: sub-spin .8s linear infinite;
	margin: 0 auto;
}
@keyframes sub-spin {
	to { transform: rotate(360deg); }
}
.sub-overlay-icon { font-size: 56px; }
.sub-overlay-close-pix { text-decoration: none; }

.sub-pix-amount {
	font-size: 22px; font-weight: 700;
	color: #006355;
	border: 2px dashed #00bfa5;
	border-radius: 8px;
	padding: 6px 20px;
	display: inline-block;
}
.sub-pix-key {
	width: 100%;
	border: 1px dotted #888;
	border-radius: 8px;
	padding: 8px;
	font-size: 13px;
	resize: none;
	outline: none;
}
.sub-btn-pix-copy {
	padding: 10px 24px;
	background: #00bfa5;
	color: #fff;
	border: none; border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
}
.sub-btn-pix-copy:hover { background: #00cfb5; }

/* --- Mobile --- */
@media (max-width: 768px) {
	.sub-sidebar { display: none; }
	.sub-body { padding-top: 16px; }
	.sub-title { font-size: 20px; }
	.sub-row { flex-direction: column; gap: 0; }
	.sub-col, .sub-col-sm { flex: none; width: 100%; margin-bottom: 12px; }
	.sub-plan-card { flex-direction: row; gap: 12px; }
	.sub-plan-name { font-size: 16px; }
	.sub-plan-price { font-size: 18px; }
	.sub-container { padding: 0 16px; }
}

/* --- Processing state --- */
#subscribeApp.processing .sub-btn-primary {
	opacity: .5; pointer-events: none;
}
