/* Konbi Multi Wallet Frontend Styles */

.kmw-wallet-management-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.kmw-header {
    margin-bottom: 30px;
    padding: 0;
}

.kmw-header h2 {
    margin: 0 0 10px 0;
    font-size: 2em;
    font-weight: 600;
    color: #333;
}

.kmw-header p {
    margin: 0;
    font-size: 1em;
    color: #666;
}

/* Spending Limit Section */
.kmw-spending-limit-section {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.kmw-spending-limit-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 500;
}

.kmw-limit-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kmw-limit-form label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
    min-width: 120px;
}

.kmw-limit-form input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 150px;
    transition: border-color 0.3s ease;
}

.kmw-limit-form input[type="number"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Buttons */
.kmw-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.kmw-btn-primary {
    background: #007cba;
    color: white;
}

.kmw-btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.kmw-btn-secondary {
    background: #6c757d;
    color: white;
}

.kmw-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Wallet Balances */
.kmw-wallet-balances {
    margin-bottom: 30px;
}

.kmw-wallet-balances h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.kmw-wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.kmw-wallet-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kmw-wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kmw-wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.kmw-wallet-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.kmw-wallet-balance {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
}

.kmw-wallet-actions {
    text-align: center;
}

/* Transaction History */
.kmw-transaction-history {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.kmw-transaction-history h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.kmw-wallet-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.kmw-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.kmw-tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
}

.kmw-tab-btn:hover {
    color: #007cba;
    background: #f8f9fa;
}

.kmw-transaction-content {
    position: relative;
}

.kmw-transaction-list {
    display: none;
}

.kmw-transaction-list.active {
    display: block;
}

.kmw-transaction-table {
    overflow-x: auto;
}

.kmw-transaction-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.kmw-transaction-table th,
.kmw-transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.kmw-transaction-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.kmw-transaction-table tr:hover {
    background: #f8f9fa;
}

.kmw-transaction-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.kmw-transaction-type.kmw-credit {
    background: #d4edda;
    color: #155724;
}

.kmw-transaction-type.kmw-debit {
    background: #f8d7da;
    color: #721c24;
}

.kmw-amount .kmw-positive {
    color: #28a745;
    font-weight: 600;
}

.kmw-amount .kmw-negative {
    color: #dc3545;
    font-weight: 600;
}

.kmw-no-transactions {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Messages */
.kmw-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
}

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

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

.kmw-login-required {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kmw-wallet-management-container {
        padding: 10px;
    }
    
    .kmw-header h2 {
        font-size: 1.8em;
    }
    
    .kmw-limit-form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .kmw-limit-form label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .kmw-limit-form input[type="number"] {
        width: 100%;
    }
    
    .kmw-wallet-grid {
        grid-template-columns: 1fr;
    }
    
    .kmw-wallet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .kmw-wallet-tabs {
        flex-direction: column;
    }
    
    .kmw-tab-btn {
        text-align: center;
    }
    
    .kmw-transaction-table {
        font-size: 14px;
    }
    
    .kmw-transaction-table th,
    .kmw-transaction-table td {
        padding: 8px;
    }
}

/* Loading Animation */
.kmw-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: kmw-spin 1s linear infinite;
}

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

/* Success/Error States */
.kmw-success {
    color: #28a745;
}

.kmw-error {
    color: #dc3545;
}

/* Accessibility */
.kmw-btn:focus,
.kmw-tab-btn:focus,
.kmw-limit-form input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .kmw-wallet-management-container {
        max-width: none;
        padding: 0;
    }
    
    .kmw-btn {
        display: none;
    }
    
    .kmw-wallet-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
