/* iFrame Embed RX – Frontend & Editor Styles */

.iframe-embed-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
    background: #f5f5f5;
    margin: 1.5em 0;
}

/* ── Loading ── */
.iframe-embed-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    font-size: 14px;
    color: #666;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 5;
    transition: opacity .3s;
}
.iframe-embed-loading.hidden { opacity: 0; pointer-events: none; }

.iframe-embed-spinner {
    width: 18px; height: 18px;
    border: 2px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: ife-spin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes ife-spin { to { transform: rotate(360deg); } }

/* ── Blocked fallback ── */
.iframe-embed-blocked {
    padding: 48px 24px;
    background: #fff8f0;
    border: 2px dashed #f0b429;
    border-radius: 8px;
    margin: 8px;
    text-align: center;
    color: #6b5800;
}
.iframe-embed-blocked svg { margin-bottom: 12px; color: #d97706; }
.iframe-embed-blocked p  { margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.iframe-embed-blocked strong { color: #92400e; }

.iframe-embed-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, transform .15s;
}
.iframe-embed-open-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

/* ── iframe – otomatik yükseklik ── */
.iframe-embed-frame {
    display: block;
    border: none;
    width: 100%;
    /* Başlangıç / cross-origin fallback yüksekliği */
    height: var(--ife-fallback-height, 600px);
    /* Same-origin JS resize sonrası yumuşak geçiş */
    transition: height 0.25s ease;
    overflow: hidden;
}

/* ── Error ── */
.iframe-embed-error {
    padding: 12px 16px;
    background: #fff0f0;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    border-radius: 4px;
    font-size: 14px;
}

/* ── Gutenberg editor preview ── */
.iframe-embed-editor-preview {
    border: 2px dashed #c5d0e0;
    border-radius: 8px;
    background: #f0f4f8;
    padding: 32px 24px;
    text-align: center;
    color: #4a6080;
}
.iframe-embed-editor-preview svg { margin-bottom: 12px; opacity: .6; }
.iframe-embed-editor-preview p   { margin: 0; font-size: 14px; }
.iframe-embed-editor-preview .url-label {
    font-size: 12px;
    color: #0073aa;
    word-break: break-all;
    margin-top: 8px;
    font-family: monospace;
}
