/**
 * Frontend CSS for ProPoints Manager
 */

/* Button Container */
.ppm-button-container {
    margin: 10px 0;
    position: relative;
}

/* Buttons */
.ppm-button {
    background: #0073aa;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    position: relative;
}

.ppm-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.ppm-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.3);
}

.ppm-button:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ppm-button:disabled:hover {
    background: #cccccc;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.ppm-button.ppm-button-secondary {
    background: #666666;
}

.ppm-button.ppm-button-secondary:hover {
    background: #4a4a4a;
}

.ppm-button.ppm-button-success {
    background: #46b450;
}

.ppm-button.ppm-button-success:hover {
    background: #389e3f;
}

.ppm-button.ppm-button-warning {
    background: #f56e28;
}

.ppm-button.ppm-button-warning:hover {
    background: #e55b1f;
}

.ppm-button.ppm-button-danger {
    background: #dc3232;
}

.ppm-button.ppm-button-danger:hover {
    background: #c62d2d;
}

/* Messages */
.ppm-message {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    animation: ppm-fade-in 0.3s ease;
}

.ppm-message.ppm-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ppm-message.ppm-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ppm-message.ppm-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Indicator */
.ppm-loading {
    margin-top: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ppm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #6c757d;
    border-radius: 50%;
    animation: ppm-spin 1s linear infinite;
}

/* Balance Display */
.ppm-balance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ppm-balance.ppm-balance-updated {
    animation: ppm-balance-highlight 1s ease;
}

.ppm-balance-format-detailed {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ppm-balance-label {
    font-size: 12px;
    font-weight: 400;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ppm-balance-amount {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
}

.ppm-balance-type {
    font-size: 12px;
    font-weight: 400;
    color: #666666;
}

/* Transactions Table */
.ppm-transactions {
    margin: 20px 0;
}

.ppm-transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.ppm-transactions-table th,
.ppm-transactions-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.ppm-transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ppm-transactions-table tbody tr:hover {
    background: #f8f9fa;
}

.ppm-transaction-amount.ppm-credit {
    color: #46b450;
    font-weight: 600;
}

.ppm-transaction-amount.ppm-debit {
    color: #dc3232;
    font-weight: 600;
}

.ppm-transaction-date {
    color: #6c757d;
    font-size: 13px;
}

.ppm-transaction-description {
    color: #495057;
    font-style: italic;
}

/* Error States */
.ppm-error,
.ppm-login-required,
.ppm-no-transactions {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    margin: 10px 0;
}

.ppm-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ppm-login-required {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ppm-no-transactions {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ppm-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ppm-transactions-table {
        font-size: 12px;
    }
    
    .ppm-transactions-table th,
    .ppm-transactions-table td {
        padding: 8px 4px;
    }
    
    .ppm-balance-amount {
        font-size: 16px;
    }
}

/* Animations */
@keyframes ppm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ppm-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ppm-balance-highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #e6f3ff; }
    100% { transform: scale(1); }
}

/* Print Styles */
@media print {
    .ppm-button,
    .ppm-loading {
        display: none;
    }
    
    .ppm-message {
        border: 1px solid #000;
        background: #fff !important;
        color: #000 !important;
    }
}