/* Conteneur principal */
.mike-record-widget-container {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 30px;
	padding: 20px;
	border-radius: 8px;
	/* Background color is set from Elementor inline styles */
}

/* Section Gauche : Play + Description */
.mike-record-top-section {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 15px;
	flex: 1;
}

/* Bouton Play Principal */
.elementor-widget-mike_record .mike-record-main-play-btn {
	flex-shrink: 0;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.3s ease;
	/* Tailles et couleurs par défaut gérées par Elementor */
	padding: 0 !important;
}

/* Description alignée verticalement */
.mike-record-description {
	flex: 1;
}
.mike-record-description p:last-child {
	margin-bottom: 0;
}

/* Section Droite : Modules de mots */
.mike-record-bottom-section {
	display: flex;
	flex-direction: column;
	gap: 15px;
	flex: 1;
}

.mike-record-modules {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mike-record-word-module {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.mike-record-word-module:nth-child(odd) {
	background-color: #FAFBFF;
}

.mike-record-word-module:nth-child(even) {
	background-color: #EBF0F9;
}

.mike-record-word-module:hover {
	border-color: rgba(79, 74, 120, 0.2);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mike-record-module-text {
	font-weight: 600;
	font-size: 15px;
	color: #000000; /* Black color for maximum contrast */
	margin-bottom: 2px;
	line-height: 1.2;
}

.mike-record-module-actions {
	display: flex !important;
	flex-direction: row !important;
	gap: 10px !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	width: 100% !important; /* Force full width for alignment */
}

/* Style des boutons d'action */
.elementor-widget-mike_record .mike-record-rec-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	text-decoration: none;
	padding: 0 !important;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.elementor-widget-mike_record .mike-record-rec-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.elementor-widget-mike_record .mike-record-rec-btn:active {
	transform: scale(0.95);
}

.mike-record-rec-btn:disabled {
	cursor: not-allowed;
	filter: grayscale(1);
}

/* Sizing par défaut des icônes SVG */
.elementor-widget-mike_record .mike-record-rec-btn svg {
	width: 55%;
	height: 55%;
}

/* Visibility management for recording buttons inner icons */
.mike-record-rec-btn .mike-record-icon-stop-rec,
.mike-record-rec-btn .mike-record-icon-play-rec {
    /* We don't force display:block here to allow inline styles to win */
}

/* Hammer to hide/show things */
.mike-record-rec-btn svg[style*="display: none"],
.mike-record-rec-btn svg[style*="display:none"] {
    display: none !important;
}
.mike-record-rec-btn svg[style*="display: block"],
.mike-record-rec-btn svg[style*="display:block"] {
    display: block !important;
}

/* Fix spécifique pour assurer flex items SVGs */
.elementor-widget-mike_record .mike-record-main-play-btn, 
.elementor-widget-mike_record .mike-record-rec-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* ===========================
   RESPONSIVE DESIGN (Mobile)
   =========================== */
@media (max-width: 767px) {
	.mike-record-widget-container {
		flex-direction: column;
		gap: 20px;
	}

	.mike-record-top-section {
		width: 100%;
	}
	
	.mike-record-bottom-section {
		width: 100%;
	}

	.mike-record-word-module {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.mike-record-module-actions {
		width: 100%;
		display: flex !important;
		flex-direction: row !important;
		justify-content: flex-start !important;
		gap: 10px !important;
	}

	.elementor-widget-mike_record .mike-record-rec-btn {
		display: flex !important;
	}
}

/* Help Button - White bg, Black icon, pushed far right */
/* High specificity selector to win against Elementor theme settings */
div.elementor-widget-mike_record .mike-record-module-actions button.mike-record-btn-help.mike-record-btn-help {
	margin-left: auto !important;
	background-color: #ffffff !important;
	background-image: none !important; /* Remove any theme gradients */
	border: 1px solid rgba(0,0,0,0.2) !important;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

div.elementor-widget-mike_record .mike-record-module-actions button.mike-record-btn-help.mike-record-btn-help svg {
	fill: #000000 !important;
	width: 50% !important;
	height: 50% !important;
}

/* Modal Styling */
.mike-record-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
}

.mike-record-modal-container {
	background: #ffffff;
	width: 90%;
	max-width: 520px;
	border-radius: 12px;
	box-shadow: 0 30px 60px rgba(0,0,0,0.4);
	overflow: hidden;
	animation: mikeScaleIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mikeScaleIn {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.mike-record-modal-header {
	padding: 20px 25px;
	border-bottom: 1px solid #eeeeee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #ffffff;
}

.mike-record-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #222;
}

/* Modal Close Button - No Square, Always visible, color stable */
.elementor-widget-mike_record .mike-record-modal-close {
	background: transparent !important;
	border: none !important;
	font-size: 32px !important;
	line-height: 1 !important;
	cursor: pointer;
	color: #333333 !important; /* Force visible color */
	padding: 0 !important;
	margin: 0 !important;
	transition: color 0.2s ease, transform 0.2s ease !important;
	width: auto !important;
	height: auto !important;
	box-shadow: none !important;
	display: block !important;
}

.elementor-widget-mike_record .mike-record-modal-close:hover {
	transform: scale(1.1) !important;
	color: #000000 !important; /* Darken slightly on hover but stay visible */
}

.mike-record-modal-content {
	padding: 20px 25px 35px 25px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.mike-record-help-item {
	display: flex;
	align-items: center;
	gap: 15px;
}

/* Reduced size of buttons in help modal */
.mike-record-help-icon-preview {
	flex-shrink: 0;
	width: 34px !important;
	height: 34px !important;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.mike-record-help-icon-preview svg {
	width: 18px !important;
	height: 18px !important;
	fill: #ffffff !important;
}

.mike-record-help-item p {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #333;
	font-weight: 500;
}
