/**
 * mantislook.com 360° Tours - Frontend Styles
 */

.mantislook-tour-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Let the iframe's width/height attributes work; don't override with CSS */
.mantislook-tour-embed iframe {
    display: block;
    width: 100%;
    /* height: auto removed - let the height attribute from shortcode take effect */
    min-height: 300px; /* fallback if no height attribute */
}

/* Responsive aspect ratio container option */
.mantislook-tour-embed.aspect-16-9::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.mantislook-tour-embed.aspect-4-3::before {
    content: "";
    display: block;
    padding-top: 75%; /* 4:3 aspect ratio */
}

.mantislook-tour-embed.aspect-1-1::before {
    content: "";
    display: block;
    padding-top: 100%; /* 1:1 aspect ratio */
}

/* Error state */
.mantislook-tour-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.mantislook-tour-error code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Gutenberg block editor preview styles */
.wp-block-mantislook-360-tours-tour {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.wp-block-mantislook-360-tours-tour .block-editor-block-preview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
}

.wp-block-mantislook-360-tours-tour .block-editor-block-preview::before {
    content: "🏠 360° Virtual Tour";
    color: #3c9a5a;
    font-size: 18px;
    font-weight: 600;
}

/* Placeholder for when property ID is not set */
.wp-block-mantislook-360-tours-tour[data-property-id=""] .block-editor-block-preview::before {
    content: "⚠️ Enter Property ID in settings";
    color: #d63638;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mantislook-tour-embed iframe {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .mantislook-tour-embed iframe {
        min-height: 200px;
    }
}

/* Print styles */
@media print {
    .mantislook-tour-embed {
        page-break-inside: avoid;
    }

    .mantislook-tour-embed iframe {
        display: none;
    }

    .mantislook-tour-embed::after {
        content: "[360° Virtual Tour - view online]";
        display: block;
        text-align: center;
        padding: 20px;
        color: #666;
        font-style: italic;
    }
}