/**
 * SEO Meta Data Widget Styles
 * 
 * @package Mystic_Elementor_Widgets
 * @since 2.0.55
 */

/* SEO Preview Container */
.mystic-seo-preview {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    background-color: #ffffff;
    font-family: Arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Google Search Preview */
.mystic-seo-preview-google .mystic-seo-preview-title {
    color: #1a0dab;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 3px 0;
    text-decoration: none;
    cursor: pointer;
}

.mystic-seo-preview-google .mystic-seo-preview-title:hover {
    text-decoration: underline;
}

.mystic-seo-preview-google .mystic-seo-preview-url {
    color: #006621;
    font-size: 14px;
    line-height: 1.3;
    margin: 0 0 3px 0;
}

.mystic-seo-preview-google .mystic-seo-preview-description {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Facebook Post Preview */
.mystic-seo-preview-facebook {
    display: flex;
    flex-direction: column;
    max-width: 500px;
}

.mystic-seo-preview-facebook .mystic-seo-preview-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.mystic-seo-preview-facebook .mystic-seo-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mystic-seo-preview-facebook .mystic-seo-preview-content {
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #dadde1;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.mystic-seo-preview-facebook .mystic-seo-preview-title {
    color: #1d2129;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.mystic-seo-preview-facebook .mystic-seo-preview-description {
    color: #606770;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Twitter Card Preview */
.mystic-seo-preview-twitter {
    display: flex;
    max-width: 500px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.mystic-seo-preview-twitter .mystic-seo-preview-image {
    width: 125px;
    height: 125px;
    flex-shrink: 0;
    overflow: hidden;
}

.mystic-seo-preview-twitter .mystic-seo-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mystic-seo-preview-twitter .mystic-seo-preview-content {
    padding: 12px;
    flex: 1;
}

.mystic-seo-preview-twitter .mystic-seo-preview-title {
    color: #1c2022;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

.mystic-seo-preview-twitter .mystic-seo-preview-description {
    color: #536471;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Character Count Indicators */
.mystic-seo-character-count {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.mystic-seo-character-count.warning {
    color: #f39c12;
}

.mystic-seo-character-count.error {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mystic-seo-preview {
        padding: 15px;
        margin: 15px 0;
    }
    
    .mystic-seo-preview-google .mystic-seo-preview-title {
        font-size: 18px;
    }
    
    .mystic-seo-preview-facebook,
    .mystic-seo-preview-twitter {
        max-width: 100%;
    }
    
    .mystic-seo-preview-twitter {
        flex-direction: column;
    }
    
    .mystic-seo-preview-twitter .mystic-seo-preview-image {
        width: 100%;
        height: 200px;
    }
}

/* Editor Mode Styles */
.elementor-editor .mystic-seo-preview {
    border: 2px dashed #007cba;
    background-color: #f8f9fa;
}

.elementor-editor .mystic-seo-preview::before {
    content: "SEO Preview - This will not be visible on the frontend";
    display: block;
    font-size: 12px;
    color: #007cba;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #e7f3ff;
    border-radius: 3px;
}

/* SEO Meta Data Widget Specific Styles */
.elementor-widget-mystic-seo-meta-data {
    /* Hide the widget container in frontend when not in preview mode */
}

.elementor-widget-mystic-seo-meta-data .mystic-seo-preview {
    /* Show preview in editor and when preview is enabled */
}

/* Form Field Styling */
.elementor-control-mystic_seo_meta_title .elementor-control-field-description,
.elementor-control-mystic_seo_meta_description .elementor-control-field-description,
.elementor-control-mystic_seo_page_slug .elementor-control-field-description {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* Character count for text areas */
.elementor-control-mystic_seo_meta_description .elementor-control-field-description::after {
    content: " (Character count will be shown in preview)";
    font-size: 11px;
    color: #999;
}
