/* ============================================================
   SPRITES PLANTAS — Stylesheet v1.0.0
   ============================================================ */

.ppg-wrapper {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px;
    background: transparent;
}

.ppg-title { font-size: 20px; margin-bottom: 8px; }

.spr-description {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.5;
    border-left: 3px solid #276749;
    padding-left: 10px;
}

.ppg-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.ppg-row label {
    width: 160px;
    font-weight: 600;
}

.ppg-row select,
.ppg-row input[type="number"] {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
}

/* =========================
   ENCABEZADOS DE SECCIÓN
========================= */
.spr-section-header {
    margin-top: 18px;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 2px solid #c6f6d5;
}

.spr-section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #276749;
}

/* =========================
   HINT DE TIPO DE ANIMACIÓN
========================= */
.spr-hint-row {
    margin-top: -6px;
    margin-bottom: 8px;
    padding-left: 170px;
}

.spr-hint {
    font-size: 12px;
    color: #276749;
    font-style: italic;
}

/* =========================
   FRAMES CONTROL
========================= */
.spr-frames-row .spr-frames-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.spr-frames-control input[type="number"] {
    width: 80px;
    flex: none;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.spr-frame-hint {
    font-size: 12px;
    color: #276749;
    font-style: italic;
}

/* =========================
   ACCIONES
========================= */
.ppg-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.ppg-btn {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #2b6cb0;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    font-size: 14px;
}

.ppg-btn:hover  { background: #2c5282; transform: translateY(-1px); }
.ppg-btn:active { transform: translateY(0); }

.ppg-btn-natural       { background: #276749; }
.ppg-btn-natural:hover { background: #22543d; }

.ppg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.ppg-actions-json {
    margin-top: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #c6f6d5;
}

.ppg-actions-lineal { margin-top: 10px; }

.ppg-actions-badge {
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

/* =========================
   TABS DE SALIDA
========================= */
.ppg-tabs {
    display: flex;
    gap: 4px;
    margin-top: 18px;
    border-bottom: 2px solid #e2e8f0;
}

.ppg-tab-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    background: #edf2f7;
    color: #4a5568;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.ppg-tab-btn:hover           { background: #e2e8f0; color: #2d3748; }
.ppg-tab-btn.active          { background: #fff; color: #2b6cb0; border-color: #2b6cb0; }
.ppg-tab-btn.active.tab-natural { color: #276749; border-color: #276749; }

/* =========================
   PANELES DE SALIDA
========================= */
.ppg-output-panel { display: none; }
.ppg-output-panel.active { display: block; }

.ppg-output {
    white-space: pre-wrap;
    background: #fff;
    padding: 12px;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 6px 6px;
    min-height: 200px;
    font-family: monospace;
    font-size: 13px;
    color: #111;
    margin-top: 0;
}

.ppg-output-natural {
    white-space: pre-wrap;
    background: #f0fff4;
    padding: 14px 16px;
    border: 1px solid #c6f6d5;
    border-top: none;
    border-radius: 0 0 6px 6px;
    min-height: 200px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.7;
    color: #1a202c;
    margin-top: 0;
}

.ppg-natural-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 11px;
    color: #276749;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 4px;
    padding: 3px 8px;
}

/* =========================
   WIKIPEDIA BOX
========================= */
.ppg-wiki-box {
    margin-top: 12px;
    transition: all 0.3s ease;
}

.ppg-wiki-box img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 8px;
}

.ppg-wiki-attr {
    font-size: 11px;
    color: #555;
    margin-top: 6px;
    line-height: 1.6;
}

.ppg-attr-line    { display: block; }
.ppg-attr-line a  { color: #2b6cb0; text-decoration: underline; }

.ppg-attr-disclaimer {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: #888;
    font-style: italic;
}

.ppg-wiki-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ppg-wiki-controls { display: flex; gap: 6px; }

.ppg-wiki-controls button {
    background: #276749;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    color: #fff;
    transition: background 0.15s ease;
}

.ppg-wiki-controls button:hover { background: #22543d; }

.ppg-wiki-box.minimized #spr-wiki-result { display: none !important; }
.ppg-wiki-box.hidden { display: none; }

/* =========================
   STICKY MODE
========================= */
.ppg-wiki-box.sticky {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    max-width: 90vw;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    box-sizing: border-box;
    overflow: hidden;
}

.ppg-wiki-box.sticky .ppg-wiki-header {
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

.ppg-wiki-box.sticky .ppg-wiki-header #spr-wiki-btn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.ppg-wiki-box.sticky .ppg-wiki-controls { flex: 0 0 auto; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
    .ppg-row { flex-direction: column; align-items: stretch; }
    .ppg-row label { width: auto; }
    .ppg-actions { flex-direction: column; }
    .ppg-tabs { flex-wrap: wrap; }
    .spr-hint-row { padding-left: 0; }
    .spr-frames-control { flex-direction: column; align-items: flex-start; }
    .ppg-wiki-box.sticky { right: 10px; bottom: 10px; width: calc(100% - 20px); }
}