/* Customer Debt Manager Frontend Styles */

.cdm-debt-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #495057;
}

.cdm-debt-page h1,
.cdm-debt-page h2,
.cdm-debt-page h3 {
    color: #343a40;
    margin-bottom: 15px;
}

.debt-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.debt-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.debt-summary-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.debt-order-card {
    transition: box-shadow 0.3s ease;
    border-radius: 8px !important;
}

.debt-order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.debt-order-header {
    border-radius: 8px 8px 0 0 !important;
}

.debt-status-badge {
    transition: all 0.3s ease;
}

.debt-status-badge:hover {
    transform: scale(1.05);
}

.order-items {
    background: #f8f9fa !important;
    border-left: 4px solid #007cba;
    border-radius: 0 4px 4px 0 !important;
}

.order-payments table {
    border-radius: 4px;
    overflow: hidden;
}

.order-payments table th {
    background: #343a40 !important;
    color: white !important;
}

.all-payments-summary table {
    border-radius: 4px;
    overflow: hidden;
}

.all-payments-summary table th {
    background: #007cba !important;
    color: white !important;
}

.no-debts {
    border-left: 4px solid #28a745;
}

.no-payments {
    border-left: 4px solid #ffc107;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .debt-order-header>div {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .debt-order-details>div {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .debt-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .order-items div {
        margin-bottom: 8px !important;
    }

    .order-items span[style*="float: right"] {
        float: none !important;
        display: block;
        margin-top: 5px;
    }
}

/* Table Responsiveness */
@media (max-width: 600px) {

    .order-payments table,
    .all-payments-summary table {
        font-size: 12px;
    }

    .order-payments th,
    .order-payments td,
    .all-payments-summary th,
    .all-payments-summary td {
        padding: 6px !important;
    }
}

/* Animation for payment amounts */
.payment-amount {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading states */
.cdm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
