/* Outer modern frame for the live preview */
.preview-frame {
    background-color: var(--bg-card) !important;
    border-radius: var(--border-radius-2xl); /* Matches wrapper border radius */
    box-shadow: var(--shadow-sm); /* Matches wrapper shadow */
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: -webkit-sticky;
    position: sticky;
    top: 40px;
    z-index: 100;
}

/* Top bar of the preview frame */
.preview-frame-header {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    /* Set to the light grey variable to match the wrapper header */
    background-color: var(--bg-surface-hover);
    border-bottom: 1px solid var(--border-color);
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
}

/* Ensure the wrapper card is light grey */
.form-panel {
    background-color: var(--bg-surface-hover);
}

/* Expand the preview frame footer to match the header size */
.preview-frame-footer {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-lg) var(--spacing-xl);
    /* Set to the light grey variable to match the header */
    background-color: var(--bg-surface-hover);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.info-icon {
    flex-shrink: 0;
    margin-right: 12px;
    color: var(--color-primary);
    margin-top: 2px;
}

/* Pulsing green live indicator */
.pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--color-success);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Inner wrapper that handles the responsive scaling */
.preview-box-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main);
    transition: height 0.1s ease-out;
    width: 100%;
}

/* Forces the content inside to act as if it's on a 1400px screen */
.preview-scaler {
    width: 1400px;
    transform-origin: top left;
}