/* SlimWP Simple Points - Admin Styles */

/* Admin Dashboard Enhancements */
.slimwp-admin-notice {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 4px solid #00a32a;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.slimwp-admin-notice.error {
    border-left-color: #d63638;
}

.slimwp-admin-notice p {
    margin: 0;
    font-size: 14px;
}

/* User Profile Enhancements */
.slimwp-profile-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.slimwp-balance-display {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.slimwp-balance-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
}

.slimwp-balance-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.slimwp-balance-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.slimwp-balance-free .slimwp-balance-value {
    color: #135e96;
}

.slimwp-balance-permanent .slimwp-balance-value {
    color: #00a32a;
}

/* Form Styling */
.slimwp-form-row {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    align-items: end;
}

.slimwp-form-group {
    flex: 1;
}

.slimwp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.slimwp-form-group input,
.slimwp-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.slimwp-form-group input:focus,
.slimwp-form-group select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.slimwp-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.slimwp-button:hover {
    background: #135e96;
}

.slimwp-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Transaction Table */
.slimwp-transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.slimwp-transactions-table th {
    background: #f9f9f9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.slimwp-transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.slimwp-transactions-table tr:hover td {
    background: #f9f9f9;
}

.slimwp-amount {
    font-weight: 600;
}

.slimwp-amount.positive {
    color: #00a32a;
}

.slimwp-amount.negative {
    color: #d63638;
}

.slimwp-balance-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 5px;
}

.slimwp-balance-type.free {
    background: #e7f2fd;
    color: #135e96;
}

.slimwp-balance-type.permanent {
    background: #edfaef;
    color: #00a32a;
}

.slimwp-balance-type.mixed {
    background: #fcf0e4;
    color: #996800;
}

/* Settings Page */
.slimwp-settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.slimwp-settings-header {
    background: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.slimwp-settings-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.slimwp-settings-content {
    padding: 20px;
}

.slimwp-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.slimwp-setting-row:last-child {
    border-bottom: none;
}

.slimwp-setting-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
    color: #333;
}

.slimwp-setting-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Toggle Switch */
.slimwp-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.slimwp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slimwp-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.slimwp-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.slimwp-toggle input:checked + .slimwp-toggle-slider {
    background-color: #2271b1;
}

.slimwp-toggle input:checked + .slimwp-toggle-slider:before {
    transform: translateX(20px);
}

/* Save Status */
.slimwp-save-status {
    display: none;
    margin-left: 10px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
}

.slimwp-save-status.success {
    background: #edfaef;
    color: #00a32a;
}

.slimwp-save-status.error {
    background: #fef1f1;
    color: #d63638;
}

/* Responsive Design */
@media (max-width: 768px) {
    .slimwp-balance-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .slimwp-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .slimwp-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .slimwp-transactions-table {
        font-size: 12px;
    }
    
    .slimwp-transactions-table th,
    .slimwp-transactions-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .slimwp-transactions-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Loading States */
.slimwp-loading {
    opacity: 0.6;
    pointer-events: none;
}

.slimwp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: slimwp-spin 1s linear infinite;
    margin-right: 5px;
}

@keyframes slimwp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.slimwp-text-center { text-align: center; }
.slimwp-text-right { text-align: right; }
.slimwp-text-muted { color: #666; }
.slimwp-text-success { color: #00a32a; }
.slimwp-text-error { color: #d63638; }
.slimwp-text-warning { color: #996800; }

.slimwp-mb-0 { margin-bottom: 0; }
.slimwp-mb-10 { margin-bottom: 10px; }
.slimwp-mb-20 { margin-bottom: 20px; }

.slimwp-mt-0 { margin-top: 0; }
.slimwp-mt-10 { margin-top: 10px; }
.slimwp-mt-20 { margin-top: 20px; }

.slimwp-hidden { display: none; }
.slimwp-visible { display: block; }
