/* General Styles */
.olsera-report-container {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.olsera-report-header h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Controls Section */
.olsera-controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.olsera-date-filter-container {
    display: flex;
    align-items: center;
}

.olsera-date-filter-container label {
    margin-right: 10px;
    font-weight: bold;
    color: #555;
}

.olsera-date-filter {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0px 10px;
    background-color: #fff;
    cursor: pointer;
}

.olsera-date-icon::before {
    content: "📅"; /* Calendar icon */
    margin-right: 8px;
    font-size: 16px;
}

.olsera-date-filter-input {
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    font-size: 14px;
    width: 200px; /* Adjust as needed */
}

.olsera-date-filter-input:focus {
    outline: none;
}

.olsera-actions-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between Tampilkan button and export buttons */
}

.olsera-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    color: white;
    transition: background-color 0.3s ease;
}

.olsera-fetch-data-btn {
    background-color: #007bff; /* Blue */
}

.olsera-fetch-data-btn:hover {
    background-color: #0056b3;
}

.olsera-pdf-btn {
    background-color: #dc3545; /* Red */
}

.olsera-pdf-btn:hover {
    background-color: #c82333;
}

.olsera-excel-btn {
    background-color: #28a745; /* Green */
}

.olsera-excel-btn:hover {
    background-color: #218838;
}

/* Sections: Payment Summary and Detailed Transactions */
.olsera-section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.olsera-section h2 {
    font-size: 18px;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Tables */
.olsera-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.olsera-table th,
.olsera-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

.olsera-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.olsera-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.olsera-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Specific for Payment Summary Table */
.olsera-payment-summary-table th:nth-child(1),
.olsera-payment-summary-table td:nth-child(1) { /* No. */
    width: 5%;
    text-align: center;
}
.olsera-payment-summary-table th:nth-child(3),
.olsera-payment-summary-table td:nth-child(3) { /* Total Transaksi */
    width: 20%;
    text-align: right;
}
.olsera-payment-summary-table th:nth-child(4),
.olsera-payment-summary-table td:nth-child(4) { /* Jumlah */
    width: 25%;
    text-align: right;
}

/* Specific for Detailed Transactions Table */
.olsera-transactions-table th:nth-child(1),
.olsera-transactions-table td:nth-child(1) { /* No. */
    width: 5%;
    text-align: center;
}
.olsera-transactions-table th:nth-child(6),
.olsera-transactions-table td:nth-child(6),
.olsera-transactions-table th:nth-child(7),
.olsera-transactions-table td:nth-child(7),
.olsera-transactions-table th:nth-child(8),
.olsera-transactions-table td:nth-child(8) { /* Total, Diskon, Grand Total */
    text-align: right;
}

.olsera-transactions-total-row td {
    font-weight: bold;
    background-color: #f8f9fa;
}

.olsera-transactions-grand-total {
    text-align: right;
}

.olsera-record-note {
    margin-top: 10px;
    font-style: italic;
    color: #777;
    font-size: 13px;
    text-align: right;
}

/* Pagination */
.olsera-pagination {
    margin-top: 20px;
    text-align: center;
}

.olsera-pagination button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.olsera-pagination button:hover {
    background-color: #0056b3;
}

.olsera-pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.olsera-pagination .page-numbers {
    margin: 0 10px;
    font-weight: bold;
}

/* Loading and Error States */
.olsera-loading, .olsera-error {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #555;
}

.olsera-loading-spinner {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

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

.olsera-error {
    color: #dc3545; /* Red */
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .olsera-controls-main {
        flex-direction: column;
        align-items: stretch;
    }
    .olsera-date-filter-container {
        margin-bottom: 10px;
        width: 100%;
    }
    .olsera-date-filter-input {
        width: calc(100% - 40px); /* Adjust based on icon and padding */
    }
    .olsera-actions-container {
        width: 100%;
        justify-content: space-between;
    }
    .olsera-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
    .olsera-table th,
    .olsera-table td {
        font-size: 12px;
        padding: 8px;
    }
    .olsera-section h2 {
        font-size: 16px;
    }
}

