/* Ricky Risolles - preview modal
 * Scoped under #ricky-modal to avoid clashing with theme/Elementor styles.
 */

#ricky-modal,
#ricky-modal *,
#ricky-modal *::before,
#ricky-modal *::after {
	box-sizing: border-box;
}

#ricky-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(10, 10, 10, 0.72);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior: contain;
}

#ricky-modal[aria-hidden="false"] {
	display: flex;
}

#ricky-modal .ricky-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 880px;
	max-height: calc(100dvh - 32px);
	background: #ffffff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	display: grid;
	grid-template-columns: 1fr 1fr;
	animation: ricky-modal-in 220ms ease-out;
}

#ricky-modal .ricky-modal__media picture {
	display: block;
	width: 100%;
	height: 100%;
}

@keyframes ricky-modal-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

#ricky-modal .ricky-modal__media {
	position: relative;
	min-height: 320px;
	background: #1a1a1a center/cover no-repeat;
}

#ricky-modal .ricky-modal__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

#ricky-modal .ricky-modal__content {
	padding: 32px 28px;
	overflow-y: auto;
	color: #1a1a1a;
}

#ricky-modal .ricky-modal__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #E11D2F;
	margin: 0 0 10px;
}

#ricky-modal .ricky-modal__title {
	margin: 0 0 10px;
	font-size: 26px;
	line-height: 1.15;
	font-weight: 800;
	color: #111;
}

#ricky-modal .ricky-modal__text {
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.5;
	color: #444;
}

/* --- Brevo form overrides (scoped to modal) --- */

#ricky-modal .sib-form {
	text-align: left;
	background: transparent !important;
}

#ricky-modal #sib-container {
	padding: 0;
	background: transparent !important;
	border: 0 !important;
	max-width: none;
}

#ricky-modal .sib-form-message-panel {
	margin-bottom: 12px;
	border-radius: 8px;
	max-width: none;
	display: none;
}

#ricky-modal .sib-form-message-panel.ricky-visible {
	display: block !important;
}

#ricky-modal #success-message {
	background: linear-gradient(135deg, #f0faf4 0%, #e4f7ec 100%) !important;
	border: 1px solid #34c759 !important;
	border-radius: 12px;
	padding: 24px 22px;
	text-align: center !important;
	box-shadow: 0 4px 16px rgba(52, 199, 89, 0.15);
}

#ricky-modal #success-message .sib-form-message-panel__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

#ricky-modal #success-message .sib-icon {
	width: 44px;
	height: 44px;
	fill: #34c759;
	margin: 0 0 4px;
}

#ricky-modal #success-message .sib-form-message-panel__inner-text {
	display: block;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	color: #1a6b35;
}

#ricky-modal .entry__label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #333 !important;
	font-family: inherit !important;
}

#ricky-modal .entry__field input.input,
#ricky-modal .entry__field select.input {
	display: block;
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.3;
	color: #111;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	transition: border-color 120ms ease, box-shadow 120ms ease;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

#ricky-modal .entry__field select.input {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%23555' stroke-width='1.6' d='M1 1l5 5 5-5'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	padding-right: 36px;
}

#ricky-modal .entry__field input.input:focus,
#ricky-modal .entry__field select.input:focus {
	outline: none;
	border-color: #E11D2F;
	box-shadow: 0 0 0 3px rgba(225, 29, 47, 0.18);
}

#ricky-modal .sib-form-block__button {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 13px 18px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	color: #fff !important;
	background: #E11D2F !important;
	border: 0 !important;
	border-radius: 8px !important;
	cursor: pointer;
	transition: background-color 120ms ease, transform 60ms ease;
	font-family: inherit !important;
	text-align: center !important;
}

#ricky-modal .sib-form-block__button:hover {
	background: #c4172a !important;
}

#ricky-modal .sib-form-block__button:active {
	transform: translateY(1px);
}

#ricky-modal .input--hidden {
	position: absolute;
	left: -9999px;
}

#ricky-modal .entry__error {
	margin-top: 4px;
	font-size: 13px !important;
	border-radius: 6px;
	padding: .5rem;
    line-height: 1.4;
	display: none;
}

#ricky-modal .sib-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	vertical-align: middle;
	margin-right: 6px;
}

#ricky-modal .sib-form-block__button .icon {
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 6px;
}

#ricky-modal .progress-indicator .progress-indicator__icon {
	fill: #FFF;
	height: 2rem;
	width: 2rem;
}

#ricky-modal .progress-indicator_small .progress-indicator__icon {
	height: 1rem;
	width: 1rem;
}

#ricky-modal .progress-indicator__icon {
	fill: #FFF;
	display: none;
	animation: indicator-spin 1.3s cubic-bezier(0.46, 0.35, 0.39, 0.85) infinite;
}

@keyframes indicator-spin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(1turn); }
}

#ricky-modal .ricky-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.9);
	color: #111;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 2;
}

#ricky-modal .ricky-modal__close:hover {
	background: #fff;
}

#ricky-modal .ricky-modal__close:focus-visible {
	outline: none;
}

@media (max-width: 720px) {
	#ricky-modal {
		padding: 12px;
		align-items: flex-start;
	}

	#ricky-modal .ricky-modal__dialog {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		max-height: calc(100dvh - 24px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	#ricky-modal .ricky-modal__media {
		min-height: 0;
		height: auto;
		overflow: hidden;
	}

	#ricky-modal .ricky-modal__media picture {
		display: block;
		height: auto;
	}

	#ricky-modal .ricky-modal__media img {
		display: block;
		width: 100%;
		height: auto;
		object-fit: initial;
	}

	#ricky-modal .ricky-modal__content {
		padding: 22px 20px 24px;
		overflow: visible;
	}

	#ricky-modal .ricky-modal__title {
		font-size: 22px;
	}
}

html.ricky-modal-open,
body.ricky-modal-open {
	overflow: hidden;
}
