/* ==========================================================================
   LICENSE WHITEPAPER PAGE — mani-license-whitepaper-ltr.css
   Components: main-grid, panel, code-editor, terminal, control-panel,
               input-field, btn-validate, flow-diagram, flow-step,
               status-banner, status-valid/invalid, spin
   ========================================================================== */

/* --- DUAL PANEL GRID ---------------------------------------------------- */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* --- PANEL -------------------------------------------------------------- */
.panel {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
    padding: 22px;
    height: 520px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

.panel:hover {
    border-color: var(--pg-green, #059669);
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.04);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--pg-border, #e2e8f0);
    padding-bottom: 14px;
    flex-shrink: 0;
}

/* --- CODE EDITOR -------------------------------------------------------- */
.code-editor {
    flex: 1;
    background: #1e293b;
    border-radius: var(--pg-radius, 8px);
    padding: 18px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    overflow-y: auto;
    color: #e2e8f0;
    text-align: left;
    line-height: 1.5;
    white-space: pre-wrap;
}

.keyword  { color: #60a5fa; }
.string   { color: #34d399; }
.comment  { color: #64748b; font-style: italic; }
.function { color: #fbbf24; }

/* --- TERMINAL ----------------------------------------------------------- */
.terminal {
    flex: 1;
    background: #0f172a;
    border-radius: var(--pg-radius, 8px);
    padding: 18px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    overflow-y: auto;
    color: #94a3b8;
    text-align: left;
    line-height: 1.5;
}

.status-valid   { color: #10b981; font-weight: 700; }
.status-invalid { color: #ef4444; font-weight: 700; }

/* --- CONTROL PANEL ------------------------------------------------------ */
.control-panel {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: var(--pg-radius, 8px);
    padding: 28px;
    margin-top: 20px;
}

.control-panel:hover {
    border-color: var(--pg-green, #059669);
    border-style: dashed;
}

/* --- INPUT FIELD -------------------------------------------------------- */
.input-field {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--pg-border, #e2e8f0);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 6px;
    transition: 0.25s;
    background: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--pg-green, #059669);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

/* --- VALIDATE BUTTON ---------------------------------------------------- */
.btn-validate {
    display: block;
    width: auto;
    margin: 16px auto 0;
    text-align: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: 0.3s;
    cursor: pointer;
}

.btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.2);
}

/* --- STATUS BANNER ------------------------------------------------------ */
.status-banner {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 6px;
    display: none;
    border: 2px solid;
    animation: lic-slide-in 0.4s ease;
}

@keyframes lic-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- FLOW DIAGRAM ------------------------------------------------------- */
.flow-diagram {
    background: #fff;
    border: 1px solid var(--pg-border, #e2e8f0);
    padding: 36px;
    border-radius: var(--pg-radius, 8px);
    margin: 32px 0;
}

.flow-diagram:hover {
    border-color: var(--pg-green, #059669);
    border-style: dashed;
}

/* --- FLOW STEP ---------------------------------------------------------- */
.flow-step {
    padding: 18px 20px;
    background: #f8fafc;
    border-left: 4px solid var(--pg-green, #059669);
    margin: 12px 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.flow-step:hover {
    background: #f1f5f9;
}

.flow-step h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pg-navy, #0f172a);
    margin-bottom: 6px;
}

.flow-step p {
    margin: 0;
    color: var(--pg-muted, #475569);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* --- SPIN ANIMATION ----------------------------------------------------- */
@keyframes lic-spin {
    100% { transform: rotate(360deg); }
}

.spin {
    display: inline-block;
    animation: lic-spin 1s linear infinite;
    margin-right: 8px;
}

/* --- RESPONSIVE --------------------------------------------------------- */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .panel {
        height: 420px;
    }
}
