/* ==================================================
   PLUGIN WRAPPER (SCOPED)
================================================== */
.rpgf-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    padding: 16px;
    display: flex;
    gap: 24px;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    color: #0f172a;
}

/* ==================================================
   CARDS
================================================== */
.rpgf-output-card,
.rpgf-control-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
}

.rpgf-output-card { flex: 2; }
.rpgf-control-card { flex: 1; }

/* ==================================================
   OUTPUT BOX
================================================== */
#rpgf-output-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    min-height: 260px;
    max-height: 360px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: normal;
}

/* ==================================================
   BUTTON ROW (FIXED)
================================================== */
.rpgf-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: center;
}

/* RESET DEFAULT BUTTON DAMAGE */
.rpgf-buttons button {
    appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
}

/* ==================================================
   BASE BUTTON STYLE
================================================== */
.rpgf-btn {
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease, 
                color .2s ease,
                transform .08s ease,
                box-shadow .2s ease;
}

/* ==================================================
   GENERATE BUTTON (PRIMARY)
================================================== */
.rpgf-btn-generate {
    background: #2563eb;
    color: #ffffff;
}

.rpgf-btn-generate:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.rpgf-btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

/* ==================================================
   COPY BUTTON
================================================== */
.rpgf-btn-copy {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #d1d5db;
}

.rpgf-btn-copy:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ==================================================
   DOWNLOAD BUTTON
================================================== */
.rpgf-btn-download {
    background: #10b981;
    color: #ffffff;
}

.rpgf-btn-download:hover {
    background: #059669;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

/* ==================================================
   COPIED TEXT
================================================== */
#rpgf-copied-text {
    font-size: 13px;
    color: #16a34a;
    margin-left: 8px;
    display: none;
}

/* ==================================================
   FORM FIELDS
================================================== */
.rpgf-field {
    margin-bottom: 16px;
}

.rpgf-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.rpgf-field input,
.rpgf-field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.rpgf-field input:focus,
.rpgf-field select:focus {
    border-color: #2563eb;
    outline: none;
}

/* ================================
   BUTTON STYLES (PRO UI – FIXED)
================================ */

/* Button container already exists */
.rpgf-buttons {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    align-items: center;
    flex-wrap: wrap;
}

/* RESET */
.rpgf-buttons button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* BASE BUTTON */
.rpgf-btn-primary,
.rpgf-btn-secondary {
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: transform 0.15s ease,
                box-shadow 0.15s ease,
                background 0.2s ease;
}

/* GENERATE BUTTON (PRIMARY – PURPLE) */
.rpgf-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.rpgf-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.45);
}

/* COPY + DOWNLOAD (SECONDARY) */
.rpgf-btn-secondary {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.rpgf-btn-secondary:hover {
    background: #e0e7ff;
}

/* COPIED TEXT */
#rpgf-copied-text {
    font-weight: 600;
    color: #15803d;
    display: none;
}

/* MOBILE */
@media (max-width: 600px) {
    .rpgf-buttons {
        flex-direction: column;
    }

    .rpgf-buttons button {
        width: 100%;
    }
}


/* ==================================================
   RESPONSIVE FIX (IMPORTANT)
================================================== */
@media (max-width: 900px) {
    .rpgf-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .rpgf-buttons {
        gap: 6px;
    }

    .rpgf-btn {
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
        border-radius: 8px;
    }
}
