/* C Contact Popup – Frontend Styles */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700&display=swap');

:root {
	--cc-navy: #1a2d4a;
	--cc-navy-dark: #152338;
	--cc-teal: #3ec9d6;
	--cc-teal-dark: #2eb3c0;
	--cc-teal-light: #e8f8fa;
	--cc-text: #2c3e50;
	--cc-text-muted: #7a8a9a;
	--cc-border: #dde3ea;
	--cc-white: #ffffff;
	--cc-radius: 12px;
	--cc-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* Overlay */
.c-contact-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	font-family: 'Heebo', Arial, sans-serif;
	direction: rtl;
}

.c-contact-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.c-contact-overlay.is-open .c-contact-modal {
	transform: translateY(0) scale(1);
}

/* Modal */
.c-contact-modal {
	background: var(--cc-white);
	border-radius: var(--cc-radius);
	width: 100%;
	max-width: 820px;
	max-height: 95vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--cc-shadow);
	transform: translateY(20px) scale(0.97);
	transition: transform 0.3s ease;
}

/* Header */
.c-contact-header {
	background: var(--cc-navy);
	padding: 24px 28px 22px 24px;
	position: relative;
	flex-shrink: 0;
}

.c-contact-close {
	position: absolute;
	top: 16px;
	left: 16px;
	background: none;
	border: none;
	color: var(--cc-white);
	cursor: pointer;
	padding: 6px;
	line-height: 0;
	opacity: 0.85;
	transition: opacity 0.2s;
	border-radius: 6px;
}

.c-contact-close:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.1);
}

.c-contact-header-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	padding-inline-start: 8px;
}

.c-contact-header-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.c-contact-header-icon svg {
	width: 42px;
	height: 42px;
}

.c-contact-header-text {
	text-align: right;
	flex: 1;
	min-width: 0;
}

.c-contact-title {
	color: var(--cc-white);
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.3;
	text-align: right;
}

.c-contact-subtitle {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	margin: 0;
	font-weight: 400;
	text-align: right;
	line-height: 1.45;
}

/* Body */
.c-contact-body {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	flex: 1;
}

.c-contact-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	padding: 24px 28px 0;
}

.c-contact-col {
	padding: 0 12px;
}

.c-contact-col--right {
	border-left: 1px solid var(--cc-border);
	padding-left: 24px;
}

.c-contact-col--left {
	padding-right: 24px;
}

.c-contact-section-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--cc-text);
	margin: 0 0 12px;
}

.c-contact-section-title--notes {
	margin-top: 18px;
}

/* Inquiry cards */
.c-contact-inquiry-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 20px;
}

.c-contact-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 14px 8px 12px;
	border: 2px solid var(--cc-border);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
	position: relative;
	background: var(--cc-white);
}

.c-contact-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.c-contact-card-icon {
	color: var(--cc-text-muted);
	margin-bottom: 6px;
	transition: color 0.2s;
}

.c-contact-card-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--cc-text);
	margin-bottom: 10px;
	text-align: center;
	line-height: 1.3;
}

.c-contact-card-radio {
	width: 16px;
	height: 16px;
	border: 2px solid var(--cc-border);
	border-radius: 50%;
	transition: border-color 0.2s, background 0.2s;
}

.c-contact-card--selected,
.c-contact-card:has(input:checked) {
	border-color: var(--cc-teal);
	background: rgba(62, 201, 214, 0.04);
}

.c-contact-card--selected .c-contact-card-icon,
.c-contact-card:has(input:checked) .c-contact-card-icon {
	color: var(--cc-teal);
}

.c-contact-card--selected .c-contact-card-radio,
.c-contact-card:has(input:checked) .c-contact-card-radio {
	border-color: var(--cc-teal);
	background: radial-gradient(circle, var(--cc-teal) 40%, transparent 45%);
}

/* Select fields */
.c-contact-select-wrap {
	position: relative;
	margin-bottom: 18px;
}

.c-contact-select-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cc-teal);
	pointer-events: none;
	z-index: 1;
	display: flex;
}

.c-contact-select-arrow {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cc-text-muted);
	pointer-events: none;
	display: flex;
}

.c-contact-select-wrap select {
	width: 100%;
	padding: 12px 44px 12px 36px;
	border: 1.5px solid var(--cc-border);
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	color: var(--cc-text);
	background: var(--cc-white);
	appearance: none;
	cursor: pointer;
	transition: border-color 0.2s;
}

.c-contact-select-wrap select:focus {
	outline: none;
	border-color: var(--cc-teal);
}

.c-contact-select-wrap select:invalid,
.c-contact-select-wrap select option[value=""] {
	color: var(--cc-text-muted);
}

/* Help box */
.c-contact-help-box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--cc-teal-light);
	border-radius: 10px;
	padding: 14px 16px;
	margin-top: 4px;
}

.c-contact-help-icon {
	flex-shrink: 0;
	margin-top: 1px;
}

.c-contact-help-box p {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--cc-text);
}

/* Input fields */
.c-contact-field {
	position: relative;
	margin-bottom: 12px;
	direction: rtl;
}

.c-contact-field input,
.c-contact-field textarea {
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--cc-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	color: var(--cc-text);
	background: var(--cc-white);
	transition: border-color 0.2s;
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
}

.c-contact-field input[name="full_name"],
.c-contact-field input[name="phone"],
.c-contact-field input[name="email"],
.c-contact-field input[name="company"] {
	padding: 12px 46px 12px 14px;
}

.c-contact-field input::placeholder,
.c-contact-field textarea::placeholder {
	color: var(--cc-text-muted);
	text-align: right;
	opacity: 1;
}

.c-contact-field input:focus,
.c-contact-field textarea:focus {
	outline: none;
	border-color: var(--cc-teal);
}

.c-contact-field input.is-error,
.c-contact-field textarea.is-error {
	border-color: #e74c3c;
}

.c-contact-field-icon {
	position: absolute;
	right: 14px;
	left: auto;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cc-text-muted);
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	z-index: 1;
}

.c-contact-field-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.c-contact-field--textarea .c-contact-field-icon--textarea {
	top: 14px;
	transform: none;
}

.c-contact-field textarea {
	height: auto;
	min-height: 90px;
	padding: 12px 46px 12px 14px;
	resize: vertical;
	line-height: 1.5;
}

.c-contact-error {
	display: block;
	font-size: 11px;
	color: #e74c3c;
	margin-top: 4px;
	padding-right: 4px;
	min-height: 0;
}

/* Footer */
.c-contact-footer {
	padding: 20px 28px 18px;
	flex-shrink: 0;
}

.c-contact-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 14px;
	text-align: center;
}

.c-contact-message.is-success {
	background: #d4edda;
	color: #155724;
}

.c-contact-message.is-error {
	background: #f8d7da;
	color: #721c24;
}

.c-contact-privacy {
	margin-bottom: 16px;
}

.c-contact-privacy-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	direction: rtl;
	text-align: right;
}

.c-contact-privacy-label input[type="checkbox"] {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--cc-teal);
	cursor: pointer;
}

.c-contact-privacy-text {
	display: block;
	flex: 1;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--cc-text);
	cursor: pointer;
}

.c-contact-privacy-link {
	font-weight: 700;
	text-decoration: underline;
	color: var(--cc-teal);
}

.c-contact-privacy-link:hover {
	color: var(--cc-teal-dark);
}

.c-contact-privacy.is-error .c-contact-privacy-label {
	outline: 1px solid #e74c3c;
	outline-offset: 4px;
	border-radius: 6px;
}

.c-contact-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 14px;
}

.c-contact-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 20px;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, opacity 0.2s;
	border: 2px solid transparent;
}

.c-contact-btn--secondary {
	background: var(--cc-white);
	border-color: var(--cc-teal);
	color: var(--cc-teal);
}

.c-contact-btn--secondary:hover {
	background: var(--cc-teal-light);
}

.c-contact-btn--primary {
	background: var(--cc-teal);
	color: var(--cc-white);
	border-color: var(--cc-teal);
}

.c-contact-btn--primary:hover {
	background: var(--cc-teal-dark);
	border-color: var(--cc-teal-dark);
}

.c-contact-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.c-contact-security {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 11.5px;
	color: var(--cc-text-muted);
	margin: 0;
}

/* Responsive */
@media (max-width: 680px) {
	.c-contact-columns {
		grid-template-columns: 1fr;
		padding: 20px 16px 0;
	}

	.c-contact-col--right {
		border-left: none;
		border-bottom: 1px solid var(--cc-border);
		padding-left: 0;
		padding-bottom: 20px;
		margin-bottom: 4px;
	}

	.c-contact-col--left {
		padding-right: 0;
	}

	.c-contact-col {
		padding: 0;
	}

	.c-contact-inquiry-cards {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
	}

	.c-contact-card {
		padding: 10px 4px 8px;
	}

	.c-contact-card-label {
		font-size: 11px;
	}

	.c-contact-title {
		font-size: 22px;
	}

	.c-contact-footer {
		padding: 16px;
	}

	.c-contact-buttons {
		grid-template-columns: 1fr;
	}
}

/* Prevent body scroll when open */
body.c-contact-open {
	overflow: hidden;
}
