/**
 * Pryma Multi-Gateways for WooCommerce — Admin CSS
 */

:root {
    --pryma-primary: #4f46e5;
    --pryma-primary-hover: #4338ca;
    --pryma-primary-light: #eef2ff;
    --pryma-success: #22c55e;
    --pryma-danger: #ef4444;
    --pryma-warning: #f59e0b;
    --pryma-surface: #ffffff;
    --pryma-border: #e5e7eb;
    --pryma-bg: #f9fafb;
    --pryma-text: #111827;
    --pryma-text-muted: #6b7280;
    --pryma-radius: 10px;
    --pryma-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
    --pryma-transition: .2s ease;
}

/* Page Wrapper */

.pryma-admin-wrap {
    margin: 20px 20px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--pryma-text);
}

.pryma-admin-wrap .pryma-main-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 30px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.pryma-admin-wrap .pryma-main-content {
    min-width: 0 !important;
    overflow: hidden !important;
}

.pryma-admin-wrap .pryma-sidebar-area {
    width: 340px !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 50px !important;
}

.pryma-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--pryma-text);
    margin-bottom: 20px;
}

.pryma-logo {
    height: 32px;
    width: auto;
}

.pryma-version {
    font-size: 13px;
    font-weight: 500;
    color: var(--pryma-text-muted);
    background: var(--pryma-primary-light);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Stat Cards (Dashboard) */

.pryma-stat-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.pryma-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--pryma-surface);
    border: 1px solid var(--pryma-border);
    border-radius: var(--pryma-radius);
    padding: 18px 22px;
    min-width: 180px;
    box-shadow: var(--pryma-shadow);
    flex: 1;
}

.pryma-stat-icon {
    font-size: 28px;
    width: 36px;
    height: 36px;
    color: var(--pryma-primary);
}

.pryma-stat-info {
    display: flex;
    flex-direction: column;
}

.pryma-stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--pryma-text);
}

.pryma-stat-number.pryma-alert {
    color: var(--pryma-danger);
}

.pryma-stat-label {
    font-size: 12px;
    color: var(--pryma-text-muted);
    margin-top: 4px;
}

/* Quick Links */

.pryma-quick-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pryma-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--pryma-surface);
    border: 1px solid var(--pryma-border);
    border-radius: var(--pryma-radius);
    color: var(--pryma-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--pryma-transition);
    box-shadow: var(--pryma-shadow);
}

.pryma-quick-link:hover {
    background: var(--pryma-primary);
    border-color: var(--pryma-primary);
    color: #fff;
    text-decoration: none;
}

.pryma-quick-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Section */

.pryma-section {
    background: var(--pryma-surface);
    border: 1px solid var(--pryma-border);
    border-radius: var(--pryma-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--pryma-shadow);
}

.pryma-section h2 {
    margin-top: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--pryma-text);
    border-bottom: 1px solid var(--pryma-border);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

/* Toggle Switch */

.pryma-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    vertical-align: middle;
}

.pryma-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.pryma-toggle-slider {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    background: var(--pryma-border);
    border-radius: 24px;
    transition: background var(--pryma-transition);
    flex-shrink: 0;
}

.pryma-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--pryma-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.pryma-toggle input:checked+.pryma-toggle-slider {
    background: var(--pryma-primary);
}

.pryma-toggle input:checked+.pryma-toggle-slider::before {
    transform: translateX(18px);
}

.pryma-toggle input:focus+.pryma-toggle-slider {
    outline: 2px solid var(--pryma-primary);
    outline-offset: 2px;
}

/* Modules Table */

.pryma-modules-table .pryma-col-status {
    width: 60px;
}

.pryma-modules-table .pryma-col-actions {
    width: 120px;
}

.pryma-module-id {
    display: block;
    font-size: 11px;
    color: var(--pryma-text-muted);
    font-family: monospace;
    margin-top: 2px;
}

.pryma-module-row.pryma-enabled {
    background: #f0fdf4;
}

/* Status Indicators */

.pryma-status-ok {
    color: var(--pryma-success);
    font-weight: 600;
}

.pryma-status-fail {
    color: var(--pryma-danger);
    font-weight: 600;
}

.pryma-status-disabled {
    color: var(--pryma-text-muted);
}

.pryma-status-na {
    color: var(--pryma-text-muted);
    font-size: 14px;
}

.pryma-status-table .dashicons {
    font-size: 18px;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.pryma-status-table .pryma-status-ok {
    color: var(--pryma-success);
}

.pryma-status-table .pryma-status-fail {
    color: var(--pryma-danger);
}

/* Form */

.pryma-form-table th {
    width: 220px;
}

.pryma-form-table th label {
    font-weight: 600;
}

.pryma-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.pryma-btn-primary {
    background: var(--pryma-primary) !important;
    border-color: var(--pryma-primary) !important;
    color: #fff !important;
    padding: 6px 18px !important;
    height: auto !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    transition: background var(--pryma-transition) !important;
}

.pryma-btn-primary:hover {
    background: var(--pryma-primary-hover) !important;
    border-color: var(--pryma-primary-hover) !important;
}

.pryma-save-status {
    font-size: 13px;
    font-weight: 500;
    transition: opacity var(--pryma-transition);
}

.pryma-save-status.success {
    color: var(--pryma-success);
}

.pryma-save-status.error {
    color: var(--pryma-danger);
}

.pryma-danger-note {
    color: var(--pryma-danger) !important;
    font-weight: 500;
}

/* Admin Notice */

.pryma-notice-pending {
    margin: 0 0 20px !important;
    border-left-color: var(--pryma-warning) !important;
}

.pryma-module-notice {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: var(--pryma-radius);
    font-size: 13px;
    font-weight: 500;
}

.pryma-module-notice.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.pryma-module-notice.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Donation Sidebar */

.pryma-glass,
.pryma-donation-box,
.pryma-promo-box {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--pryma-radius) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
}

.pryma-donation-box {
    overflow: hidden;
    margin-bottom: 20px;
}

.pryma-donation-banner img {
    width: 100% !important;
    max-width: 340px !important;
    height: auto !important;
    display: block !important;
}

.pryma-donation-content {
    padding: 20px;
}

.pryma-donation-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.pryma-donation-content p {
    font-size: 13px;
    color: var(--pryma-text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.pryma-support-toggle {
    display: flex;
    background: var(--pryma-bg);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}

.pryma-toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--pryma-transition);
}

.pryma-toggle-btn.active {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: var(--pryma-primary);
}

.pryma-amt-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pryma-amt-btn {
    flex: 1;
    background: #fff;
    border: 1px solid var(--pryma-border);
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pryma-transition);
}

.pryma-amt-btn:hover {
    border-color: var(--pryma-primary);
    color: var(--pryma-primary);
}

.pryma-amt-btn.active {
    background: var(--pryma-primary);
    border-color: var(--pryma-primary);
    color: #fff;
}

.pryma-custom-amt {
    position: relative !important;
    display: block !important;
}

.pryma-custom-amt input {
    width: 100% !important;
    margin-bottom: 16px !important;
    border-radius: 6px !important;
    border: 1px solid var(--pryma-border) !important;
    padding: 10px 65px 10px 12px !important;
    /* Space for the badge */
    font-size: 14px !important;
    transition: all var(--pryma-transition) !important;
}

.pryma-custom-amt input:focus {
    border-color: var(--pryma-primary) !important;
    box-shadow: 0 0 0 3px var(--pryma-primary-light) !important;
    outline: none !important;
}

.pryma-custom-badge {
    position: absolute !important;
    right: 12px !important;
    top: 20px !important;
    /* Fixed center position relative to input */
    transform: translateY(-50%) !important;
    background: var(--pryma-primary-light) !important;
    color: var(--pryma-primary) !important;
    font-size: 9px !important;
    /* Smaller text */
    font-weight: 700 !important;
    font-style: italic !important;
    /* Italic text */
    text-transform: uppercase !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all var(--pryma-transition) !important;
    line-height: 1 !important;
    z-index: 5 !important;
}

.pryma-custom-badge.is-active {
    opacity: 1 !important;
    visibility: visible !important;
}

.pryma-donate-btn {
    width: 100%;
    background: var(--pryma-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--pryma-transition);
}

.pryma-donate-btn:hover {
    background: var(--pryma-primary-hover);
}

.pryma-crypto-networks select {
    width: 100%;
    margin-top: 12px;
    border-radius: 6px;
}

.pryma-support-links {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--pryma-border);
}

.pryma-review-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pryma-warning);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.pryma-upgrade-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--pryma-text);
    text-decoration: none;
    font-size: 13px;
}