/* =========================================================
   Data2Report Payment Module Styles
   Prefix: #d2r-payment-module (Provides strict scoping)
========================================================= */

#d2r-payment-module {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    box-sizing: border-box;
}

#d2r-payment-module * {
    box-sizing: border-box;
}

/* Base Panel & Grid (Screen 1) */
#d2r-payment-module .d2r-panel {
    background: #fdfdfd;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#d2r-payment-module .d2r-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-start;
}

#d2r-payment-module .d2r-row-border {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

#d2r-payment-module .d2r-col-30 { width: 33%; padding-right: 15px; }
#d2r-payment-module .d2r-col-60 { width: 66%; padding-right: 15px; }

#d2r-payment-module .d2r-label {
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    color: #444;
}

#d2r-payment-module .d2r-help-text {
    font-size: 0.85em;
    color: #888;
    display: block;
    margin-top: 4px;
}

/* Auto-style all Zend Form inputs inside the module */
#d2r-payment-module input[type="text"],
#d2r-payment-module select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out;
}

#d2r-payment-module input[type="text"]:focus,
#d2r-payment-module select:focus {
    border-color: #80bdff;
    outline: 0;
}

/* Summary Box (Screen 2) */
#d2r-payment-module .d2r-summary-box {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#d2r-payment-module .d2r-summary-title { font-size: 1.1em; margin-bottom: 5px; }
#d2r-payment-module .d2r-summary-value { font-size: 1.3em; font-weight: bold; color: #1565c0; }
#d2r-payment-module .d2r-unapplied-alert { color: #d32f2f !important; }

/* The Data Table (Screen 2) */
#d2r-payment-module .d2r-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#d2r-payment-module .d2r-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: bold;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.95em;
}

#d2r-payment-module .d2r-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 0.95em;
}

#d2r-payment-module .d2r-table tr:hover { background-color: #f1f3f5; }

/* Buttons & Utilities */
#d2r-payment-module .d2r-btn-post {
    background-color: #28a745;
    color: white;
    padding: 10px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#d2r-payment-module .d2r-btn-post:hover { background-color: #218838; }
#d2r-payment-module .d2r-btn-post:disabled { background-color: #6c757d; cursor: not-allowed; opacity: 0.65; }

#d2r-payment-module .d2r-text-right { text-align: right !important; }
#d2r-payment-module .d2r-text-center { text-align: center !important; }

/* Make the Report Totals footer stick to the bottom of the table container */
#d2r-payment-module .d2r-table tfoot td {
    position: sticky;
    bottom: 0;
    background-color: #e9ecef;
    box-shadow: 0 -3px 6px rgba(0,0,0,0.1);
    z-index: 10;
}