/* ==========================================================================
   Retro Version Manager - Admin Styles
   ========================================================================== */

/* Layout wrapper */
.rvm-wrap {
    max-width: 860px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    margin-top: 20px;
}

.rvm-wrap h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
    line-height: 1.4;
}

/* Instructions panel */
.rvm-instructions {
    background: linear-gradient(135deg, #f0f6f0 0%, #f8faf8 100%);
    padding: 20px 24px;
    border-left: 4px solid #4CAF50;
    border-radius: 0 8px 8px 0;
    margin-bottom: 28px;
}

.rvm-instructions > p:first-child {
    margin-top: 0;
    color: #3c434a;
    font-size: 13.5px;
    line-height: 1.6;
}

.rvm-instructions ol {
    margin: 12px 0;
    padding-left: 20px;
    color: #50575e;
    font-size: 13px;
    line-height: 1.8;
}

.rvm-instructions ol li {
    padding: 2px 0;
}

.rvm-warning {
    color: #b32d2e;
    font-weight: 600;
    font-size: 13px;
}

.rvm-notice {
    color: #9a6700;
    font-weight: 600;
    background: #fff8e5;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 13px;
    border-left: 3px solid #dba617;
}

/* Search form */
.rvm-wrap h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px;
}

.rvm-form {
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rvm-form label {
    font-weight: 600;
    color: #3c434a;
    font-size: 13px;
}

.rvm-form select,
.rvm-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3338;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 38px;
    box-sizing: border-box;
}

.rvm-form select {
    width: 120px;
    cursor: pointer;
    appearance: auto;
}

.rvm-form input[type="text"] {
    width: 300px;
}

.rvm-form select:focus,
.rvm-form input[type="text"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
    outline: none;
}

.rvm-form input[type="submit"] {
    background: #4CAF50;
    border: none;
    color: #fff;
    padding: 0 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    height: 38px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}

.rvm-form input[type="submit"]:hover {
    background: #43a047;
}

.rvm-form input[type="submit"]:active {
    transform: scale(0.98);
}

.rvm-form .description {
    font-size: 12.5px;
    color: #787c82;
    margin: 5px 0 0 0;
    width: 100%;
}

/* Error messages */
.retrvema-error {
    color: #b32d2e;
    font-weight: 600;
    background: #fcf0f1;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid #d63638;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Installed version badge */
.rvm-installed-version {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f1 100%);
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 24px;
    border-left: 4px solid #4CAF50;
    font-size: 13.5px;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rvm-installed-label {
    color: #388e3c;
    margin-right: 4px;
}

/* Versions list */
.rvm-wrap h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px;
}

.rvm-versions-list {
    margin-top: 0;
    list-style: none;
    padding: 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.rvm-versions-list li {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    transition: background 0.15s;
}

.rvm-versions-list li:nth-child(even) {
    background: #fafafa;
}

.rvm-versions-list li:hover {
    background: #f0f7f0;
}

.rvm-versions-list li:last-child {
    border-bottom: none;
}

.rvm-version {
    font-weight: 700;
    color: #1d2327;
    min-width: 90px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.rvm-install-link,
.rvm-download-link {
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    display: inline-block;
}

.rvm-install-link {
    color: #fff;
    background: #4CAF50;
}

.rvm-install-link:hover {
    background: #43a047;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.rvm-download-link {
    color: #2271b1;
    background: #f0f0f1;
}

.rvm-download-link:hover {
    background: #dcdcde;
    color: #135e96;
    text-decoration: none;
    transform: translateY(-1px);
}

.rvm-download-link::before {
    content: '\2193 ';
}

/* Buy me a coffee */
.rvm-bmc-button {
    display: inline-block;
    transition: transform 0.2s;
}

.rvm-bmc-button:hover {
    transform: scale(1.05);
}

/* ==========================================================================
   Popup Dialog
   ========================================================================== */

.rvm-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    animation: rvmFadeIn 0.2s ease-out;
}

@keyframes rvmFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes rvmSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rvm-confirm-dialog-content {
    background: #fff;
    padding: 28px 32px;
    border-radius: 12px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: rvmSlideUp 0.25s ease-out;
}

.rvm-confirm-dialog h3 {
    margin: 0 0 12px;
    color: #1d2327;
    font-size: 17px;
    font-weight: 700;
}

.rvm-confirm-dialog p {
    margin: 0 0 24px;
    color: #50575e;
    font-size: 13.5px;
    line-height: 1.6;
}

.rvm-confirm-dialog-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rvm-confirm-dialog button {
    padding: 9px 22px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.rvm-confirm-dialog button:active {
    transform: scale(0.97);
}

.rvm-confirm-dialog .rvm-confirm {
    background: #2271b1;
    color: #fff;
}

.rvm-confirm-dialog .rvm-confirm:hover {
    background: #135e96;
}

.rvm-confirm-dialog .rvm-cancel {
    background: #f0f0f1;
    color: #50575e;
}

.rvm-confirm-dialog .rvm-cancel:hover {
    background: #dcdcde;
    color: #2c3338;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 782px) {
    .rvm-wrap {
        padding: 20px;
        margin-top: 10px;
    }

    .rvm-form {
        flex-direction: column;
        align-items: stretch;
    }

    .rvm-form select,
    .rvm-form input[type="text"] {
        width: 100%;
    }

    .rvm-form input[type="submit"] {
        width: 100%;
    }

    .rvm-versions-list li {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
    }

    .rvm-version {
        width: 100%;
    }

    .rvm-confirm-dialog-content {
        padding: 20px 24px;
        margin: 0 16px;
    }
}
