/* 动态码区块样式 */
.outer-iframe {
    display: inline-flex;
    align-items: center;
    margin: 8px 0;
    padding: 2px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.2s ease;
    height: 34px;
    box-sizing: border-box;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
}

.outer-iframe:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007cba;
}

.outer-iframe strong {
    margin-right: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    line-height: 28px !important;
    height: 28px !important;
    display: flex;
    align-items: center;
}

.outer-iframe iframe {
    border: none;
    border-radius: 3px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    display: block;
    flex-shrink: 0;
    height: 28px !important;
    width: 70px !important;
}

/* 复制按钮样式 */
.copy-dynamic-code-btn {
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 12px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-dynamic-code-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.copy-dynamic-code-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 编辑器中的预览样式 */
.wp-block-ssh-script-executor-dynamic-code {
    margin: 10px 0;
}

.wp-block-ssh-script-executor-dynamic-code .outer-iframe {
    border: 1px dashed rgb(0, 124, 186);
    padding: 2px 12px;
    margin: 10px 0px;
    background: linear-gradient(135deg, rgb(240, 248, 255) 0%, rgb(255, 255, 255) 100%);
    border-radius: 6px;
    box-shadow: rgba(0, 124, 186, 0.1) 0px 2px 4px;
    display: inline-flex;
    align-items: center;
    height: 34px;
    box-sizing: border-box;
    flex-wrap: wrap;
    max-width: 100%;
    align-content: center;
    flex-direction: row;
    justify-content: space-around;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .outer-iframe {
        flex-direction: row;
        align-items: center;
        padding: 10px;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        height: 34px !important;
        align-content: center;
    
    }
    
    .outer-iframe strong {
        margin-right: 0;
        /* margin-bottom: 8px; */
        height: 34px !important;
        line-height: 1.4;
    }
    
    .outer-iframe iframe {
        margin-left: 0;
        /* margin-bottom: 8px; */
    }
    
    .copy-dynamic-code-btn {
        margin-left: 0;
        width: 100%;
        max-width: 120px;
        justify-content: center;
    }
}

/* 小屏幕手机端 */
@media (max-width: 480px) {
    .outer-iframe {
        padding: 8px;
        margin: 5px 0;
    }
    
    .outer-iframe strong {
        font-size: 13px;
        /* margin-bottom: 6px; */
    }
    
    .outer-iframe iframe {
        width: 60px !important;
        height: 24px !important;
        /* margin-bottom: 6px; */
    }
    
    .copy-dynamic-code-btn {
        font-size: 11px;
        padding: 3px 6px;
        max-width: 100px;
        height: 24px;
    }
}

/* 超小屏幕 */
@media (max-width: 360px) {
    .outer-iframe {
        padding: 6px;
    }
    
    .outer-iframe strong {
        font-size: 12px;
    }
    
    .outer-iframe iframe {
        width: 50px !important;
        height: 22px !important;
    }
    
    .copy-dynamic-code-btn {
        font-size: 10px;
        padding: 2px 4px;
        max-width: 80px;
        height: 22px;
    }
}
