/**
 * Frontend styles for RSVP button block
 */

.fair-rsvp-button {
	margin: 2rem 0;
}

/* Login message */
.fair-rsvp-login-message {
	text-align: center;
	padding: 2rem;
	background-color: #f0f0f1;
	border-radius: 4px;
}

.fair-rsvp-login-message p {
	margin: 0 0 1rem 0;
	font-size: 1rem;
}

.fair-rsvp-login-button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #2271b1;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 500;
	transition: background-color 0.2s;
}

.fair-rsvp-login-button:hover {
	background-color: #135e96;
	color: white;
}

/* RSVP Form */
.fair-rsvp-form-container {
	padding: 1.5rem;
	background-color: #ffffff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.fair-rsvp-form {
	margin: 0;
}

/* Anonymous user info fields */
.fair-rsvp-user-info {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fair-rsvp-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fair-rsvp-field label {
	font-weight: 500;
	font-size: 0.95rem;
	color: #1e1e1e;
}

.fair-rsvp-field label .required {
	color: #d63638;
	font-weight: 700;
}

.fair-rsvp-input {
	padding: 0.75rem;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s;
}

.fair-rsvp-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.fair-rsvp-input::placeholder {
	color: #757575;
}

.fair-rsvp-options {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.fair-rsvp-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background-color: #f0f0f1;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	user-select: none;
}

.fair-rsvp-option:hover {
	background-color: #e0e0e1;
}

.fair-rsvp-option input[type="radio"] {
	margin: 0;
	cursor: pointer;
}

.fair-rsvp-option input[type="radio"]:checked + span {
	font-weight: 600;
}

.fair-rsvp-option:has(input:checked) {
	background-color: #2271b1;
	color: white;
	border-color: #135e96;
}

.fair-rsvp-submit-button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #2271b1;
	color: white;
	border: none;
	border-radius: 4px;
	font-weight: 500;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.fair-rsvp-submit-button:hover:not(:disabled) {
	background-color: #135e96;
}

.fair-rsvp-submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fair-rsvp-message {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-weight: 500;
}

.fair-rsvp-message-success {
	background-color: #d7f8e0;
	color: #00632d;
	border: 1px solid #00a32a;
}

.fair-rsvp-message-error {
	background-color: #fcf0f1;
	color: #8b1a1d;
	border: 1px solid #d63638;
}

.fair-rsvp-current-status {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	background-color: #f0f6fc;
	border-left: 3px solid #2271b1;
	font-size: 0.9rem;
}

.fair-rsvp-current-status strong {
	color: #2271b1;
}

/* Invited banner */
.fair-rsvp-invited-banner {
	padding: 1rem 1.25rem;
	margin-bottom: 1rem;
	background-color: #e7f5ff;
	border: 1px solid #4dabf7;
	border-radius: 4px;
	color: #1971c2;
	font-weight: 500;
}

.fair-rsvp-invited-banner p {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.fair-rsvp-invited-banner p::before {
	content: '✨';
	font-size: 1.2rem;
}

/* Not allowed message */
.fair-rsvp-not-allowed-message {
	padding: 2rem;
	text-align: center;
	background-color: #fff4e6;
	border: 1px solid #fd7e14;
	border-radius: 4px;
	color: #d9480f;
}

.fair-rsvp-not-allowed-message p {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

/* Closed message */
.fair-rsvp-closed-message {
	padding: 2rem;
	text-align: center;
	background-color: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	color: #50575e;
}

.fair-rsvp-closed-message p {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

/* Attendance check link */
.fair-rsvp-attendance-link-wrapper {
	margin-top: 1rem;
	text-align: center;
}

.fair-rsvp-attendance-link-wrapper.deadline-passed {
	margin-top: 1.5rem;
}

.fair-rsvp-attendance-link {
	text-decoration: none;
	transition: all 0.2s;
	display: inline-block;
}

/* Small link style (before deadline) */
.attendance-link-small {
	font-size: 0.85rem;
	opacity: 0.7;
	color: #50575e;
	padding: 0.25rem 0.5rem;
	border-radius: 3px;
}

.attendance-link-small:hover {
	opacity: 1;
	background-color: #f0f0f1;
	color: #2271b1;
}

/* Prominent link style (after deadline) */
.attendance-link-prominent {
	font-size: 1rem;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	background-color: #2271b1;
	color: white;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.attendance-link-prominent:hover {
	background-color: #135e96;
	color: white;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-1px);
}

/* Invite a Friend Section */
.fair-rsvp-invite-section {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e0e0e1;
	text-align: center;
}

.fair-rsvp-invite-button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #00a32a;
	color: white;
	border: none;
	border-radius: 4px;
	font-weight: 500;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.fair-rsvp-invite-button:hover {
	background-color: #008a20;
}

.fair-rsvp-invite-button:active {
	transform: translateY(1px);
}

/* Invitation Modal */
.fair-rsvp-invite-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 1rem;
}

.fair-rsvp-invite-modal {
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fair-rsvp-invite-modal-header {
	padding: 1.5rem;
	border-bottom: 1px solid #e0e0e1;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.fair-rsvp-invite-modal-header h2 {
	margin: 0;
	font-size: 1.5rem;
	color: #1e1e1e;
}

.fair-rsvp-invite-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #757575;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	line-height: 1;
	transition: color 0.2s;
}

.fair-rsvp-invite-modal-close:hover {
	color: #1e1e1e;
}

.fair-rsvp-invite-modal-body {
	padding: 1.5rem;
}

.fair-rsvp-invite-tabs {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid #e0e0e1;
}

.fair-rsvp-invite-tab {
	background: none;
	border: none;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-weight: 500;
	color: #757575;
	cursor: pointer;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	transition: all 0.2s;
}

.fair-rsvp-invite-tab:hover {
	color: #2271b1;
}

.fair-rsvp-invite-tab.active {
	color: #2271b1;
	border-bottom-color: #2271b1;
}

.fair-rsvp-invite-tab-content {
	display: none;
}

.fair-rsvp-invite-tab-content.active {
	display: block;
}

.fair-rsvp-invite-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.fair-rsvp-invite-form label {
	font-weight: 500;
	font-size: 0.95rem;
	color: #1e1e1e;
	margin-bottom: 0.5rem;
	display: block;
}

.fair-rsvp-invite-form input,
.fair-rsvp-invite-form textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	transition: border-color 0.2s;
}

.fair-rsvp-invite-form input:focus,
.fair-rsvp-invite-form textarea:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.fair-rsvp-invite-form textarea {
	min-height: 80px;
	resize: vertical;
}

.fair-rsvp-invite-form-actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
	margin-top: 1rem;
}

.fair-rsvp-invite-form-actions button {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font-weight: 500;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.fair-rsvp-invite-form-actions button[type='submit'] {
	background-color: #2271b1;
	color: white;
}

.fair-rsvp-invite-form-actions button[type='submit']:hover:not(:disabled) {
	background-color: #135e96;
}

.fair-rsvp-invite-form-actions button[type='submit']:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fair-rsvp-invite-form-actions button[type='button'] {
	background-color: #f0f0f1;
	color: #1e1e1e;
}

.fair-rsvp-invite-form-actions button[type='button']:hover {
	background-color: #e0e0e1;
}

.fair-rsvp-invite-link-display {
	background-color: #f6f7f7;
	padding: 1rem;
	border-radius: 4px;
	border: 1px solid #c3c4c7;
	margin-bottom: 1rem;
}

.fair-rsvp-invite-link-input {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.fair-rsvp-invite-link-input input {
	flex: 1;
	font-family: monospace;
	font-size: 0.9rem;
}

.fair-rsvp-invite-copy-button {
	padding: 0.75rem 1rem;
	background-color: #2271b1;
	color: white;
	border: none;
	border-radius: 4px;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s;
}

.fair-rsvp-invite-copy-button:hover {
	background-color: #135e96;
}

.fair-rsvp-invite-copy-button.copied {
	background-color: #00a32a;
}

.fair-rsvp-invite-message {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-weight: 500;
}

.fair-rsvp-invite-message.success {
	background-color: #d7f8e0;
	color: #00632d;
	border: 1px solid #00a32a;
}

.fair-rsvp-invite-message.error {
	background-color: #fcf0f1;
	color: #8b1a1d;
	border: 1px solid #d63638;
}
