/* ==========================================================================
   Doc Gate — Modal Styles
   All classes prefixed with .doc-gate- to avoid theme conflicts.
   ========================================================================== */

.doc-gate-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0);
	visibility: hidden;
	opacity: 0;
	transition: background 0.25s ease, opacity 0.25s ease, visibility 0s 0.25s;
}

.doc-gate-overlay.doc-gate-active {
	background: rgba(0, 0, 0, 0.55);
	visibility: visible;
	opacity: 1;
	transition: background 0.25s ease, opacity 0.25s ease, visibility 0s 0s;
}

.doc-gate-modal {
	position: relative;
	width: 90%;
	max-width: 440px;
	background: #fff;
	border-radius: 12px;
	padding: 36px 32px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	transform: translateY(24px) scale(0.96);
	transition: transform 0.25s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

.doc-gate-active .doc-gate-modal {
	transform: translateY(0) scale(1);
}

.doc-gate-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.15s ease;
	padding: 0;
	line-height: 1;
}

.doc-gate-close:hover,
.doc-gate-close:focus-visible {
	background: #f0f0f0;
}

.doc-gate-close svg {
	width: 18px;
	height: 18px;
	stroke: #555;
	stroke-width: 2;
}

.doc-gate-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
}

.doc-gate-desc {
	margin: 0 0 20px;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.doc-gate-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.doc-gate-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	border: 1.5px solid #d0d0d0;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
	background: #fafafa;
	color: #1a1a1a;
}

.doc-gate-input:focus {
	border-color: #e20512;
	box-shadow: 0 0 0 3px rgba(226, 5, 18, 0.12);
	background: #fff;
}

.doc-gate-input::placeholder {
	color: #aaa;
}

.doc-gate-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #e20512;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.doc-gate-submit:hover:not(:disabled) {
	background: #c1000d;
}

.doc-gate-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.doc-gate-submit:focus-visible {
	outline: 2px solid #e20512;
	outline-offset: 2px;
}

.doc-gate-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: doc-gate-spin 0.6s linear infinite;
}

.doc-gate-loading .doc-gate-spinner {
	display: inline-block;
}

.doc-gate-message {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.4;
	min-height: 18px;
}

.doc-gate-message--success {
	color: #00a32a;
}

.doc-gate-message--error {
	color: #d63638;
}

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

/* Mobile adjustments */
@media (max-width: 480px) {
	.doc-gate-modal {
		width: 94%;
		padding: 28px 20px 22px;
	}

	.doc-gate-title {
		font-size: 18px;
	}
}
