/* PPM to PPB Converter — Plugin Styles */

.ppc-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #0f172a;
    box-sizing: border-box;
}
.ppc-wrap *, .ppc-wrap *::before, .ppc-wrap *::after { box-sizing: border-box; }

/* Header */
.ppc__header {
    text-align: center;
    margin-bottom: 24px;
}
.ppc__header h2 {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.ppc__header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* Body card */
.ppc__body {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

/* Tabs */
.ppc__tabs {
    display: flex;
    border-bottom: 1.5px solid #e2e8f0;
    background: #f8fafc;
}
.ppc__tab {
    flex: 1;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-bottom: 2.5px solid transparent;
    background: transparent;
    color: #64748b;
    transition: all 0.15s;
    font-family: inherit;
}
.ppc__tab--active {
    background: #fff;
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
}

/* Inner padding */
.ppc__presets-section,
.ppc__input-section {
    padding: 18px 24px 0;
}
.ppc__input-section { padding-bottom: 18px; }

/* Presets */
.ppc__presets-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.ppc__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.ppc__preset {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.ppc__preset:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.ppc__preset.ppc--active { border-color: #0ea5e9; background: #e0f2fe; color: #0284c7; }

/* Input */
.ppc__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.ppc__input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}
.ppc__input-wrap {
    position: relative;
    flex: 1;
}
.ppc__input {
    width: 100%;
    padding: 11px 52px 11px 14px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}
.ppc__input::-webkit-outer-spin-button,
.ppc__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ppc__input:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.1); background: #fff; }
.ppc__unit {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    pointer-events: none;
}
.ppc__btn {
    padding: 11px 24px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.ppc__btn:hover { opacity: 0.9; }
.ppc__error { margin: 4px 0 0; font-size: 13px; color: #ef4444; }
.ppc__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 12px;
}
.ppc__hint-icon { color: #0ea5e9; font-style: normal; }
.ppc__hint-text { font-family: 'Courier New', monospace; font-weight: 600; }

/* Result bar */
.ppc__result-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #f0fdfa;
    border-top: 1.5px solid #99f6e4;
    border-bottom: 1.5px solid #99f6e4;
    padding: 12px 24px;
}
.ppc__result-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0f766e;
}
.ppc__result-value {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 900;
    color: #0d9488;
}
.ppc__verify-badge {
    margin-left: auto;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.5px;
}

/* Steps panels */
.ppc__steps-wrap { padding: 20px 24px 0; }
.ppc__steps-panel {
    border: 1.5px solid;
    border-radius: 12px;
    overflow: hidden;
}
.ppc__steps-panel--fwd { border-color: #99f6e4; }
.ppc__steps-panel--rev { border-color: #ddd6fe; }

.ppc__steps-header {
    padding: 10px 18px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.ppc__steps-header--fwd { background: #f0fdfa; color: #0f766e; border-bottom: 1.5px solid #99f6e4; }
.ppc__steps-header--rev { background: #faf5ff; color: #5b21b6; border-bottom: 1.5px solid #ddd6fe; }

/* Step item */
.ppc__step { padding: 14px 18px; border-bottom: 1px solid #f1f5f9; }
.ppc__step:last-child { border-bottom: none; }

.ppc__stp-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ppc__stp-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
.ppc__steps-panel--fwd .ppc__stp-num { background: #ccfbf1; color: #0f766e; }
.ppc__steps-panel--rev .ppc__stp-num { background: #ede9fe; color: #5b21b6; }

.ppc__stp-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.ppc__stp-formula {
    font-size: 12px;
    font-style: italic;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 4px 10px;
    margin-bottom: 8px;
    display: inline-block;
    font-family: 'Courier New', Courier, monospace;
}

.ppc__stp-calc {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 13px;
}
.ppc__stp-val { font-weight: 600; color: #334155; }
.ppc__stp-eq  { font-weight: 400; color: #94a3b8; }
.ppc__stp-arrow { color: #94a3b8; font-weight: 400; }

.ppc__stp-result {
    font-size: 13px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}
.ppc__steps-panel--fwd .ppc__stp-result { background: #ccfbf1; color: #0f766e; }
.ppc__steps-panel--rev .ppc__stp-result { background: #ede9fe; color: #5b21b6; }

.ppc__stp-result--final {
    font-size: 15px;
    padding: 6px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.ppc__steps-panel--fwd .ppc__stp-result--final { background: linear-gradient(90deg,#0d9488,#14b8a6); color: #fff; }
.ppc__steps-panel--rev .ppc__stp-result--final { background: linear-gradient(90deg,#7c3aed,#a78bfa); color: #fff; }

/* Divider */
.ppc__steps-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 10px 20px;
    border-top: 1.5px solid #e2e8f0;
    border-bottom: 1.5px solid #e2e8f0;
    margin: 20px 0 0;
}
.ppc__steps-divider::before,
.ppc__steps-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #cbd5e1;
}
.ppc__steps-divider span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7c3aed;
    white-space: nowrap;
}

/* Rev wrap bottom padding */
#ppc-rev-wrap { padding-bottom: 20px; }

/* About */
.ppc__about {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ppc__about h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px !important;
}
.ppc__about p { font-size: 13px; color: #64748b; line-height: 1.65; margin: 0 0 12px; }
.ppc__about p:last-of-type { margin-bottom: 0; }

.ppc__formula-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}
.ppc__ref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.ppc__ref-item {
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.ppc__ref-item--blue  { background: #f0f9ff; border: 1px solid #bae6fd; }
.ppc__ref-item--violet { background: #f5f3ff; border: 1px solid #ddd6fe; }
.ppc__ref-label { display: block; font-size: 11px; font-weight: 700; color: #64748b; margin-bottom: 4px; }
.ppc__ref-val--blue   { font-size: 14px; font-weight: 800; color: #075985; }
.ppc__ref-val--violet { font-size: 14px; font-weight: 800; color: #5b21b6; }
