/**
 * Elementor-specific styles for TTS player
 * Ensures proper display within Elementor content
 */

/* Ensure player displays correctly within Elementor content */
body.elementor-page .mementor-tts-player-container {
    margin: 20px 0;
    clear: both;
    width: 100%;
    max-width: 100%;
}

/* Fix alignment within Elementor widgets */
.elementor-widget-container .mementor-tts-player-container {
    margin-left: 0;
    margin-right: 0;
}

/* Ensure proper spacing when player is at beginning of content */
.elementor-widget-container > .mementor-tts-player-container:first-child {
    margin-top: 0;
}

/* Center alignment fix for Elementor */
.elementor-widget-container .mementor-tts-player-container.mementor-tts-align-center {
    margin-left: auto;
    margin-right: auto;
}

/* Width adjustments for Elementor */
.elementor-widget-container .mementor-tts-player-container.mementor-tts-width-content_width {
    max-width: 500px;
}

.elementor-widget-container .mementor-tts-player-container.mementor-tts-width-custom {
    max-width: var(--mementor-tts-custom-width, 500px);
}

/* Ensure player doesn't break Elementor's column layout */
.elementor-column-wrap .mementor-tts-player-container {
    position: relative;
    z-index: 1;
}

/* Fix for Elementor's text editor widget */
.elementor-widget-text-editor .mementor-tts-player-container {
    display: block;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .elementor-widget-container .mementor-tts-player-container {
        margin: 15px 0;
    }
    
    .elementor-widget-container .mementor-tts-player-container.mementor-tts-width-content_width,
    .elementor-widget-container .mementor-tts-player-container.mementor-tts-width-custom {
        max-width: 100%;
    }
}