/* =======================================================
   💎 SCHEMA GENERATOR - BULLETPROOF SAAS UI
   ======================================================= */
:root {
    --primary: #2563eb;
    --dark: #0f172a;
    --border: #e2e8f0;
}

.dw-saas-wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px; font-family: 'Inter', sans-serif; color: #334155; }
.text-gradient { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }

/* 🚀 HEADER */
.dw-saas-header { text-align: center; margin-bottom: 40px; }
.dw-saas-chip { display: inline-block; padding: 6px 16px; background: #eff6ff; color: var(--primary); border-radius: 100px; font-size: 12px; font-weight: 700; margin-bottom: 12px; }

/* 🚀 LAYOUT GRID (BULLETPROOF) */
.dw-schema-container { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }
.dw-schema-main { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* 📱 SIDEBAR */
.dw-schema-sidebar { display: flex; flex-direction: column; gap: 10px; }
.dw-tab { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font-weight: 700; color: #64748b; transition: 0.3s; }
.dw-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 10px 20px rgba(37,99,235,0.15); }

/* 🛡️ CARDS & INPUTS (STRICT NO-RESIZE) */
.dw-card { background: #fff; padding: 25px; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.dw-section { display: none; }
.dw-section.active { display: block; }

.dw-form-group { margin-bottom: 15px; }
.dw-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--dark); }

.dw-input { width: 100% !important; padding: 12px; border-radius: 10px; border: 1px solid var(--border); box-sizing: border-box; font-size: 15px; outline: none; transition: 0.3s; }
.dw-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
textarea.dw-input { resize: none !important; height: 110px; } /* 🛑 Fixed! */

/* =======================================================
   💻 OUTPUT CARD (RIGHT BOX) - SAAS DARK MODE FIX
   ======================================================= */

.dw-output-card {
    background: #0f172a !important; /* Deep Navy Dark */
    border-radius: 24px;
    overflow: hidden;
    position: sticky;
    top: 20px;
    border: 1px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.dw-output-header {
    background: #1e293b;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.dw-output-header h3 {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

/* 🛡️ THE IDE WINDOW (INSIDE BOX) */
.dw-ide-wrapper {
    background: #020617 !important; /* Pure Dark for Code */
    padding: 20px;
    min-height: 300px;
    overflow-x: auto;
}

#json {
    color: #38bdf8 !important; /* Neon Blue Code */
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 📋 COPY BUTTON */
.dw-btn-icon {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dw-btn-icon:hover {
    background: #3b82f6;
    transform: translateY(-2px);
}

/* 👁️ SEARCH PREVIEW (INSIDE BOX) */
.dw-google-preview {
    background: #ffffff;
    margin: 20px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-tag {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

#preview-title {
    color: #1a0dab;
    font-size: 19px;
    margin: 0 0 4px 0;
    font-weight: 500;
    line-height: 1.3;
}

#preview-desc {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* 👁️ SEARCH PREVIEW */
.dw-google-preview { background: #fff; margin-top: 20px; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; }
.preview-tag { font-size: 10px; color: #94a3b8; font-weight: 800; margin-bottom: 5px; }
#preview-title { color: #1a0dab; font-size: 18px; margin: 0 0 4px 0; font-weight: 500; }
#preview-desc { color: #4d5156; font-size: 14px; margin: 0; }

/* 🛡️ RESPONSIVE (CENTERING LOGIC) */
@media screen and (max-width: 1100px) { .dw-schema-main { grid-template-columns: 1fr; } }
@media screen and (max-width: 991px) {
    .dw-schema-container { grid-template-columns: 1fr; }
    .dw-schema-sidebar { flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .dw-tab { width: auto; font-size: 13px; }
    .dw-saas-header { text-align: center; }
}