/* Enhanced Transactions with Syncfusion Grids */

.enhanced-transactions-container {
    margin-top: 1.5rem;
}

/* Transaction Summary Enhanced */
.transaction-summary-enhanced {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.summary-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.statement-date {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.summary-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.summary-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-icon {
    font-size: 1.5rem;
}

.summary-content {
    flex: 1;
}

.summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.summary-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.summary-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.pending-summary .summary-amount {
    color: var(--alliance-primary);
}

.pending-summary .summary-icon i {
    color: var(--alliance-primary) !important; /* antes ámbar (text-warning) */
}

.posted-summary .summary-amount {
    color: #059669;
}

/* Transactions Sections */
.transactions-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header-simple {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.section-header-simple h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
}

/* Grid Containers */
.transactions-grid-container {
    padding: 0;
}

/* Syncfusion Grid Styling */
.transactions-grid {
    border: none !important;
}

.transactions-grid .e-gridheader {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.transactions-grid .e-headercell {
    border-right: 1px solid #e2e8f0;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.transactions-grid .e-row {
    border-bottom: 1px solid #f1f5f9;
}

.transactions-grid .e-row:hover {
    background-color: #f8fafc;
}

.transactions-grid .e-rowcell {
    border-right: 1px solid #f1f5f9;
    padding: 0.75rem;
    vertical-align: middle;
}

/* Pagination Styling */
.transactions-grid .e-pager {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.transactions-grid .e-pager .e-pagercontainer {
    justify-content: center;
}

/* Transaction Description Cell */
.transaction-description-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.transaction-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon-small i {
    font-size: 0.875rem;
    color: #6b7280;
}

.description-content {
    flex: 1;
    min-width: 0;
}

.description-text {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.25;
    margin-bottom: 0.125rem;
}

.merchant-text {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.25;
}

/* Amount Styling */
.amount-positive {
    color: #059669;
    font-weight: 600;
}

.amount-negative {
    color: #dc2626;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-cards-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .transactions-grid .e-rowcell {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .transaction-description-cell {
        gap: 0.5rem;
    }

    .transaction-icon-small {
        width: 28px;
        height: 28px;
    }
}

/* ============================================================
   Detalle de transaccion: afordancia de clic + modal.
   ============================================================ */

/* La fila completa es pulsable, no solo la flecha. */
.transactions-grid--clickable .e-row {
    cursor: pointer;
}

.transactions-grid--clickable .e-row:hover {
    background-color: rgba(var(--alliance-primary-rgb), 0.06) !important;
}

/* Indicador de "hay mas informacion". Antes era un icono gris plano que no
   sugeria interaccion. */
.transaction-detail-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--alliance-primary-rgb), 0.1);
    color: var(--alliance-primary);
    font-size: 0.8rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.transactions-grid--clickable .e-row:hover .transaction-detail-hint {
    background: var(--alliance-primary);
    color: #ffffff;
    transform: translateX(2px);
}

/* ---------- Modal ---------- */
.transaction-detail-modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.txn-detail-hero {
    text-align: center;
    padding: 0.5rem 0 1.25rem;
    border-bottom: 1px solid var(--alliance-content-border, #e5e7eb);
    margin-bottom: 1.25rem;
}

.txn-detail-hero__desc {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--alliance-text-primary, #1f2937);
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.txn-detail-hero__amount {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.txn-detail-hero__amount.amount-positive {
    color: #059669;
}

.txn-detail-hero__amount.amount-negative {
    color: #dc2626;
}

/* Dos columnas en escritorio, una en movil. */
.txn-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 1.5rem;
}

.txn-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--alliance-content-border, #e5e7eb);
    min-width: 0;
}

.txn-detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--alliance-text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.txn-detail-value {
    font-size: 0.9rem;
    color: var(--alliance-text-primary, #1f2937);
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .txn-detail-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .txn-detail-hero__amount {
        font-size: 1.6rem;
    }
}
