/**
 * SiteStaffr — Buy More Minutes Modal (shared component)
 *
 * Shared modal styles used on the Dashboard and Usage & Billing pages.
 * Page-specific upgrade/downgrade modal overrides remain in
 * sitestaffr-usage-dashboard.css.
 */

/* ====================================
   Buy More Minutes Modal
   ==================================== */

.sitestaffr-modal-overlay {
	position: fixed;
	inset: 0;
	padding: 20px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: sitestaffr-modal-fade-in 0.2s ease;
}

@keyframes sitestaffr-modal-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.sitestaffr-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
	width: 100%;
	max-width: 520px;
	margin: 0;
	animation: sitestaffr-modal-slide-up 0.25s ease;
	outline: none;
}

#sitestaffr-buy-modal > .sitestaffr-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(520px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	animation: sitestaffr-buy-modal-slide-up 0.25s ease;
}

@keyframes sitestaffr-buy-modal-slide-up {
	from {
		opacity: 0;
		transform: translate(-50%, calc(-50% + 16px));
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

@keyframes sitestaffr-modal-slide-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sitestaffr-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid #e8e2d8;
	background: #FAF8F4;
	border-radius: 12px 12px 0 0;
}

.sitestaffr-modal-header h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 8px;
	line-height: 1.2;
}

.sitestaffr-modal-header h2 .dashicons {
	color: #3f8f3f;
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 18px;
}

.sitestaffr-modal-close {
	background: transparent;
	border: 0;
	cursor: pointer;
	color: #646970;
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, background 0.15s ease;
}

.sitestaffr-modal-close:hover,
.sitestaffr-modal-close:focus {
	color: #d63638;
	background: rgba(214, 54, 56, 0.08);
}

.sitestaffr-modal-close .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
	line-height: 22px;
}

.sitestaffr-modal-body {
	padding: 20px;
}

.sitestaffr-modal-balance {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: #e9f3ff;
	border: 1px solid #a8c7ea;
	border-radius: 8px;
	font-size: 14px;
	color: #1d2327;
	margin-bottom: 20px;
}

.sitestaffr-modal-balance .dashicons {
	color: #2271b1;
	font-size: 18px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	flex-shrink: 0;
}

.sitestaffr-modal-product {
	margin-bottom: 20px;
}

.sitestaffr-modal-product-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sitestaffr-modal-product-name {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.sitestaffr-modal-product-detail {
	font-size: 13px;
	color: #646970;
}

.sitestaffr-modal-stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.sitestaffr-modal-stepper-label {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.sitestaffr-modal-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	overflow: hidden;
}

.sitestaffr-stepper-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: #f6f7f7;
	border: 0;
	cursor: pointer;
	color: #1d2327;
	transition: background 0.15s ease, color 0.15s ease;
}

.sitestaffr-stepper-btn:hover:not(:disabled),
.sitestaffr-stepper-btn:focus:not(:disabled) {
	background: #e0e0e0;
	color: #00838F;
}

.sitestaffr-stepper-btn:disabled {
	cursor: not-allowed;
	color: #c3c4c7;
	background: #f6f7f7;
}

.sitestaffr-stepper-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.sitestaffr-stepper-input {
	width: 48px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	border: 0;
	border-left: 1px solid #c3c4c7;
	border-right: 1px solid #c3c4c7;
	font-size: 16px;
	font-weight: 700;
	color: #1d2327;
	background: #fff;
	appearance: textfield;
	-moz-appearance: textfield;
	margin: 0;
	padding: 0;
	text-indent: 0;
}

.sitestaffr-stepper-input::-webkit-outer-spin-button,
.sitestaffr-stepper-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sitestaffr-modal-summary {
	background: linear-gradient(135deg, #00838F 0%, #006064 100%);
	border-radius: 8px;
	padding: 16px 18px;
}

.sitestaffr-modal-summary-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sitestaffr-modal-summary-minutes {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.sitestaffr-modal-summary-price {
	font-size: 22px;
	font-weight: 800;
	color: #fff;
}

.sitestaffr-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 20px;
	border-top: 1px solid #e8e2d8;
	background: #fafafa;
	border-radius: 0 0 12px 12px;
}

.sitestaffr-modal-footer form {
	margin: 0;
}

.sitestaffr-modal-cancel {
	min-width: 80px;
}

.sitestaffr-modal-confirm {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	background: #3f8f3f !important;
	border-color: #3f8f3f !important;
	color: #fff !important;
	min-width: 160px;
	justify-content: center;
}

.sitestaffr-modal-confirm:hover,
.sitestaffr-modal-confirm:focus {
	background: #2f7a2f !important;
	border-color: #2f7a2f !important;
	color: #fff !important;
}

.sitestaffr-modal-confirm .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

@media screen and (max-width: 600px) {
	.sitestaffr-modal {
		margin: 0;
		max-width: none;
	}

	.sitestaffr-modal-footer {
		flex-direction: column-reverse;
	}

	.sitestaffr-modal-footer .sitestaffr-modal-cancel,
	.sitestaffr-modal-footer .sitestaffr-modal-confirm {
		width: 100%;
	}

	.sitestaffr-modal-footer form {
		width: 100%;
	}
}
