/**
 * IV1 WP Tools – Admin Styles
 * Version 4.0.0
 */

/* ═══ Status Card – Two Column ═══ */
.iv1wpt-status-grid { display:flex; gap:24px; align-items:flex-start; }
.iv1wpt-status-left { flex:1; min-width:0; }
.iv1wpt-status-right { width:260px; flex-shrink:0; }
@media (max-width:860px) {
    .iv1wpt-status-grid { flex-direction:column; }
    .iv1wpt-status-right { width:100%; }
}

/* ═══ Donate Box ═══ */
.iv1wpt-donate-box {
    text-align:center; padding:16px;
    background:#fefefe; border:1px solid #e8e8e8; border-radius:8px;
}
.iv1wpt-donate-box strong { display:block; margin:6px 0 4px; font-size:13px; color:#1d2327; }
.iv1wpt-donate-box p { margin:0 0 12px; font-size:12px; color:#888; line-height:1.4; }

/* ═══ Buttons ═══ */
.iv1wpt-btn {
    display:inline-flex; align-items:center; justify-content:center; gap:6px;
    padding:8px 18px; border-radius:6px; font-size:13px; font-weight:600;
    text-decoration:none; cursor:pointer; border:none;
    transition:all .15s ease; line-height:1.4;
}
.iv1wpt-btn-paypal { background:#0070ba; color:#fff !important; width:100%; box-sizing:border-box; }
.iv1wpt-btn-paypal:hover { background:#005ea6; color:#fff !important; transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,112,186,.3); }

/* WP Standard Buttons */
.iv1wpt-admin-wrap .button,
.iv1wpt-admin-wrap .button-primary,
.iv1wpt-admin-wrap .button-secondary {
    border-radius:6px !important; font-weight:500; padding:4px 16px; transition:all .15s ease;
}
.iv1wpt-admin-wrap .button-primary { background:#2271b1; border-color:#2271b1; box-shadow:0 1px 2px rgba(0,0,0,.1); }
.iv1wpt-admin-wrap .button-primary:hover { background:#135e96; border-color:#135e96; transform:translateY(-1px); box-shadow:0 2px 6px rgba(34,113,177,.25); }
.iv1wpt-admin-wrap .button-secondary { box-shadow:0 1px 2px rgba(0,0,0,.05); }
.iv1wpt-admin-wrap .button-secondary:hover { background:#f0f0f1; transform:translateY(-1px); box-shadow:0 2px 4px rgba(0,0,0,.08); }
.iv1wpt-admin-wrap .button-hero { padding:10px 28px !important; font-size:14px !important; border-radius:8px !important; }
.iv1wpt-admin-wrap .button-small { padding:2px 10px; font-size:12px; border-radius:5px !important; }
.iv1wpt-admin-wrap .button-small:hover { transform:translateY(-1px); }

/* Danger Buttons */
.iv1wpt-admin-wrap .iv1wpt-delete-btn,
.iv1wpt-admin-wrap .iv1wpt-clean-single,
.iv1wpt-admin-wrap .iv1wpt-drop-table,
.iv1wpt-admin-wrap .iv1wpt-img-delete,
.iv1wpt-admin-wrap #iv1wpt-tables-delete-selected,
.iv1wpt-admin-wrap #iv1wpt-images-delete-selected,
.iv1wpt-admin-wrap #iv1wpt-clean-all { color:#b32d2e !important; border-color:#ddd; }
.iv1wpt-admin-wrap .iv1wpt-delete-btn:hover,
.iv1wpt-admin-wrap .iv1wpt-clean-single:hover,
.iv1wpt-admin-wrap .iv1wpt-drop-table:hover,
.iv1wpt-admin-wrap .iv1wpt-img-delete:hover,
.iv1wpt-admin-wrap #iv1wpt-tables-delete-selected:hover,
.iv1wpt-admin-wrap #iv1wpt-images-delete-selected:hover,
.iv1wpt-admin-wrap #iv1wpt-clean-all:hover { background:#fef2f2 !important; border-color:#d63638 !important; color:#d63638 !important; }

.iv1wpt-tab-content .submit .button-primary { padding:6px 24px; }
.backup-btn:disabled { opacity:.6; cursor:not-allowed; }
.iv1wpt-delete-btn:disabled { opacity:.5; }
.iv1wpt-scan-single:disabled, .iv1wpt-clean-single:disabled { opacity:.5; cursor:not-allowed; }

/* ═══ Layout ═══ */
.iv1wpt-admin-wrap { max-width:none; width:calc(100% - 20px); }


/* ═══ Page Header ═══ */
.iv1wpt-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.iv1wpt-page-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.iv1wpt-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
}
.iv1wpt-version-badge { display:inline-block; padding:2px 10px; border-radius:12px; background:#f0f0f1; color:#666; font-size:12px; font-weight:500; border:1px solid #ddd; }

.iv1wpt-top-notices {
    display: block;
    width: 100%;
    clear: both;
    margin: 12px 0 18px;
}

.iv1wpt-top-notices .notice {
    display: block;
    margin: 0 0 12px;
}

/* ═══ Status Card ═══ */
.iv1wpt-admin-wrap .card {
    max-width:none; width:100%; box-sizing:border-box;
    border:1px solid #ddd; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,.04);
    padding:16px 20px; margin-bottom:0; background:#fff;
}
.iv1wpt-admin-wrap .card h2 { font-size:15px; color:#1d2327; border:none; padding:0; margin:0 0 8px 0; }
.iv1wpt-admin-wrap .main-form-table th,
.iv1wpt-admin-wrap .main-form-table td { padding:5px 10px 5px 0; line-height:1.4; font-size:13px; }
.iv1wpt-admin-wrap .main-form-table th { color:#646970; font-weight:500; }

/* ═══ Tab Navigation ═══ */
.iv1wpt-admin-wrap .nav-tab-wrapper {
    margin-top: 18px;
    border-bottom: 2px solid #2271b1;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}

.iv1wpt-admin-wrap .nav-tab {
    border: 1px solid #c3c4c7;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #50575e;
    background: #f0f0f1;
    margin-bottom: -2px;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;	
}

.iv1wpt-admin-wrap .nav-tab:hover {
    color: #1d2327;
    background: #fff;
    border-color: #8c8f94;
}

.iv1wpt-admin-wrap .nav-tab-active,
.iv1wpt-admin-wrap .nav-tab-active:hover {
    background: #fff;
    color: #1d2327;
    font-weight: 600;
    border: 2px solid #2271b1;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    position: relative;
    z-index: 2;
}

.iv1wpt-admin-wrap .nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    color: #646970;
    transition: color .15s ease, transform .15s ease;
}

.iv1wpt-admin-wrap .nav-tab:hover .dashicons {
    color: #2271b1;
    transform: translateY(-1px);
}

.iv1wpt-admin-wrap .nav-tab-active .dashicons,
.iv1wpt-admin-wrap .nav-tab-active:hover .dashicons {
    color: #2271b1;
}


/* ═══ Tab Content ═══ */
.iv1wpt-tab-content {
    background:#fff; border:1px solid #ddd; border-top:none;
    border-radius:0 0 6px 6px; padding:24px !important;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.iv1wpt-tab-content h2 { font-size:17px; color:#1d2327; margin:0 0 12px 0; padding:0; border:none; }
.iv1wpt-tab-content h3 { font-size:14px; color:#1d2327; margin:20px 0 8px 0; }
.iv1wpt-tab-content .form-table th { padding:12px 10px 12px 0; font-weight:500; color:#1d2327; }
.iv1wpt-tab-content .form-table td { padding:10px 0; }

/* ═══ Notices ═══ */
#backup-result .notice,
#iv1wpt-cleanup-result .notice,
#iv1wpt-tables-result .notice,
#iv1wpt-images-result .notice { margin:12px 0; border-radius:4px; }

/* ═══ Backup List ═══ */
.iv1wpt-size-db, .iv1wpt-size-files { display:inline-block; padding:2px 10px; border-radius:10px; font-size:12px; font-weight:500; }
.iv1wpt-size-db { background:#e8f0fe; color:#1a56db; }
.iv1wpt-size-files { background:#fef3c7; color:#92400e; }
#iv1wpt-backup-list table { margin-top:8px; }
#iv1wpt-backup-list .iv1wpt-loading { color:#666; font-style:italic; }

/* ═══ Cleanup Table ═══ */
.iv1wpt-group-row td { padding:8px 10px !important; background:#f6f7f7 !important; }
#iv1wpt-cleanup-table .iv1wpt-clean-count.has-items { color:#d63638; font-weight:600; }
#iv1wpt-cleanup-table .iv1wpt-clean-count.clean { color:#00a32a; font-weight:500; }
#iv1wpt-cleanup-table .iv1wpt-clean-size.has-items { color:#d63638; }

/* ═══ Tables Tab ═══ */
#iv1wpt-tables-list table { margin-top:10px; }

/* ═══ Images Tab ═══ */
.iv1wpt-stat-card { background:#f8f9fa; border:1px solid #e0e0e0; border-radius:8px; padding:14px 20px; text-align:center; min-width:120px; }
.iv1wpt-stat-num { display:block; font-size:24px; font-weight:700; color:#1d2327; }
.iv1wpt-stat-label { display:block; font-size:11px; color:#888; margin-top:2px; text-transform:uppercase; letter-spacing:.3px; }
.iv1wpt-stat-used { color:#00a32a; }
.iv1wpt-stat-unused { color:#d63638; }
.iv1wpt-stat-size { color:#dba617; font-size:18px; }
.iv1wpt-img-row { display:flex; align-items:center; gap:12px; padding:10px 12px; border-bottom:1px solid #eee; }
.iv1wpt-img-row:hover { background:#f8fbff; }
.iv1wpt-img-thumb { width:60px; height:60px; border-radius:6px; object-fit:cover; border:1px solid #e0e0e0; background:#f0f0f1; flex-shrink:0; }
.iv1wpt-img-info { flex:1; min-width:0; }
.iv1wpt-img-name { font-weight:500; color:#1d2327; font-size:13px; word-break:break-all; }
.iv1wpt-img-meta { font-size:12px; color:#888; margin-top:2px; }
.iv1wpt-img-meta span { margin-right:12px; }
.iv1wpt-img-used { color:#00a32a; }
.iv1wpt-img-unused { color:#d63638; font-weight:600; }
.iv1wpt-img-actions { flex-shrink:0; }
.iv1wpt-images-header {
    display:flex; align-items:center; gap:10px; padding:10px 12px;
    background:#f8f9fa; border-bottom:2px solid #e0e0e0; border-radius:6px 6px 0 0;
    font-size:12px; font-weight:600; color:#646970; text-transform:uppercase; letter-spacing:.3px;
}
.iv1wpt-images-container { border:1px solid #e0e0e0; border-radius:6px; overflow:hidden; box-shadow:0 1px 2px rgba(0,0,0,.04); max-height:600px; overflow-y:auto; }

/* ═══ WP Tables Override ═══ */
.iv1wpt-admin-wrap .widefat { border:1px solid #e0e0e0; border-radius:6px; overflow:hidden; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.iv1wpt-admin-wrap .widefat thead th {
    background:#f8f9fa; border-bottom:2px solid #e0e0e0;
    font-weight:600; font-size:12px; text-transform:uppercase;
    letter-spacing:.3px; color:#646970; padding:10px 12px;
}
.iv1wpt-admin-wrap .widefat td { padding:10px 12px; vertical-align:middle; }
.iv1wpt-admin-wrap .widefat tbody tr:hover { background:#f8fbff; }

/* ═══ WP-Settings Toggle ═══ */
.iv1wpt-settings-table { width:100%; border-collapse:collapse; }
.iv1wpt-settings-table td { padding:10px 12px; border-bottom:1px solid #eee; vertical-align:middle; }
.iv1wpt-settings-table tr:last-child td { border-bottom:none; }
.iv1wpt-settings-table tr:hover { background:#f8fbff; }
.iv1wpt-settings-label { font-size:13px; color:#1d2327; }
.iv1wpt-settings-desc { font-size:12px; color:#888; margin-top:2px; }
.iv1wpt-settings-group td { background:#f6f7f7; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.3px; color:#646970; padding:8px 12px !important; }
/* Toggle Switch */
.iv1wpt-toggle { position:relative; display:inline-block; width:40px; height:22px; flex-shrink:0; }
.iv1wpt-toggle input { opacity:0; width:0; height:0; }
.iv1wpt-toggle-slider {
    position:absolute; cursor:pointer; inset:0; background:#ccc; border-radius:22px;
    transition:.2s ease;
}
.iv1wpt-toggle-slider:before {
    content:""; position:absolute; height:16px; width:16px; left:3px; bottom:3px;
    background:#fff; border-radius:50%; transition:.2s ease;
    box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.iv1wpt-toggle input:checked + .iv1wpt-toggle-slider { background:#2271b1; }
.iv1wpt-toggle input:checked + .iv1wpt-toggle-slider:before { transform:translateX(18px); }
.iv1wpt-toggle input:focus + .iv1wpt-toggle-slider { box-shadow:0 0 0 2px rgba(34,113,177,.3); }

/* ═══ Footer ═══ */
.iv1wpt-footer {
    display:flex; align-items:center; gap:16px; flex-wrap:wrap;
    margin-top:30px; padding:16px 20px;
    background:#f8f9fa; border:1px solid #e0e0e0; border-radius:6px; color:#666;
}
.iv1wpt-footer-logo { height:32px; width:auto; }
.iv1wpt-footer-text { font-size:13px; line-height:1.5; }
.iv1wpt-footer-text a { color:#2271b1; text-decoration:none; }
.iv1wpt-footer-text a:hover { color:#135e96; text-decoration:underline; }

/* ═══ Modal ═══ */
.iv1wpt-modal-overlay {
    display:none; position:fixed; inset:0; z-index:100000;
    background:rgba(0,0,0,.5); align-items:center; justify-content:center; backdrop-filter:blur(2px);
}
.iv1wpt-modal-overlay.active { display:flex; }
.iv1wpt-modal {
    background:#fff; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.2);
    max-width:460px; width:90%; padding:0; overflow:hidden; animation:iv1wpt-modal-in .2s ease-out;
}
@keyframes iv1wpt-modal-in {
    from { opacity:0; transform:scale(.95) translateY(-10px); }
    to { opacity:1; transform:scale(1) translateY(0); }
}
.iv1wpt-modal-header { display:flex; align-items:center; gap:10px; padding:18px 22px; border-bottom:1px solid #eee; font-size:15px; font-weight:600; }
.iv1wpt-modal-header .dashicons { font-size:22px; width:22px; height:22px; }
.iv1wpt-modal-header.confirm .dashicons { color:#dba617; }
.iv1wpt-modal-header.error .dashicons { color:#d63638; }
.iv1wpt-modal-header.success .dashicons { color:#00a32a; }
.iv1wpt-modal-body { padding:18px 22px; font-size:14px; line-height:1.6; color:#3c434a; }
.iv1wpt-modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:14px 22px; border-top:1px solid #eee; background:#f8f9fa; }
.iv1wpt-modal-footer .button { border-radius:5px; }
.iv1wpt-modal-footer .button-danger { background:#d63638; border-color:#d63638; color:#fff; border-radius:5px; }
.iv1wpt-modal-footer .button-danger:hover { background:#b32d2e; border-color:#b32d2e; }


/* ═══ Virus Scanner – Content-Viewer Modal (groß, scrollbar) ═══ */
.iv1wpt-modal-overlay.iv1wpt-vs-modal-overlay {
    align-items: flex-start;        /* nicht zentriert, sondern oben */
    overflow-y: auto;
}

.iv1wpt-vs-modal-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    overflow: hidden;
    animation: iv1wpt-modal-in .2s ease-out;  /* bestehende Animation */
}

.iv1wpt-vs-modal-box--wide {
    max-width: 960px;
}

/* Header – gleiche Basis wie .iv1wpt-modal-header, dunkel statt hell */
.iv1wpt-vs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    background: #23479D;
    color: #fff;
    border-bottom: none;
    font-size: 13px;
    font-weight: 400;
}

.iv1wpt-vs-modal-title {
    font-family: monospace;
    word-break: break-all;
}

.iv1wpt-vs-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.iv1wpt-vs-modal-close:hover {
    color: #ccc;
}

/* Meta-Zeile */
.iv1wpt-vs-modal-meta {
    background: #f1f1f1;
    padding: 8px 20px;
    font-size: 12px;
    color: #555;
    border-bottom: 1px solid #ddd;
}

/* Code-Viewer */
.iv1wpt-vs-modal-code {
    margin: 0;
    padding: 16px 20px;
    overflow: auto;
    max-height: 60vh;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    background: #1e1e1e;
    color: #d4d4d4;
}

/* Scrollbarer Body (DB-Modal) */
.iv1wpt-vs-modal-body--scroll {
    padding: 16px 20px;
    overflow: auto;
    max-height: 65vh;
}

/* Footer – gleiche Struktur wie .iv1wpt-modal-footer */
.iv1wpt-vs-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.iv1wpt-vs-modal-footer .button-danger {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
    border-radius: 5px;
}

.iv1wpt-vs-modal-footer .button-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

.iv1wpt-vs-modal-delete-status {
    font-size: 12px;
}

.iv1wpt-icon-btn {
    width: 32px;
    min-height: 28px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.iv1wpt-icon-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.iv1wpt-restore-btn .dashicons {
    color: #2271b1;
}

.iv1wpt-delete-btn .dashicons {
    color: #b32d2e;
}

.iv1wpt-pro-restore-btn .dashicons {
    color: #646970;
}


