/**
 * RSVP modal styles.
 *
 * @package Tobalt_Renginiai
 * @author  Tobalt — https://tobalt.lt
 */

.tr-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.tr-modal__dialog {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 440px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	animation: trModalIn 0.2s ease-out;
}

@keyframes trModalIn {
	from { opacity: 0; transform: translateY(12px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tr-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
}

.tr-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #0A3235;
}

.tr-modal__close {
	background: none;
	border: none;
	font-size: 24px;
	color: #636363;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.tr-modal__close:hover,
.tr-modal__close:focus {
	background: #f0f0f0;
	color: #333;
	outline: 2px solid #0A3235;
	outline-offset: -2px;
}

.tr-modal__body {
	padding: 20px 24px 24px;
}

.tr-modal__event-name {
	margin: 0 0 20px;
	font-size: 15px;
	color: #555;
	font-weight: 500;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}

.tr-modal__field {
	margin-bottom: 16px;
}

.tr-modal__field label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.tr-modal__required {
	color: #C62828;
}

.tr-modal__field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 6px;
	font-size: 15px;
	color: #333;
	background: #fafafa;
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}

.tr-modal__field input:focus {
	outline: none;
	border-color: #0A3235;
	box-shadow: 0 0 0 3px rgba(10, 50, 53, 0.1);
	background: #fff;
}

.tr-modal__field input.tr-modal__input--error {
	border-color: #C62828;
}

.tr-modal__turnstile {
	display: flex;
	justify-content: center;
}

.tr-modal__message {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.4;
}

.tr-modal__message--error {
	background: #fdecea;
	color: #922020;
	border: 1px solid #f5c6cb;
}

.tr-modal__submit {
	display: block;
	width: 100%;
	padding: 14px;
	min-height: 44px;
	background: #0A3235;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.tr-modal__submit:hover {
	background: #0d4145;
}

.tr-modal__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Success state */
.tr-modal__success {
	text-align: center;
	padding: 20px 0;
}

.tr-modal__success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: #e8f5e9;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: #2e7d32;
}

.tr-modal__success-text {
	margin: 0 0 20px;
	font-size: 15px;
	color: #333;
	line-height: 1.5;
}
