/*
 * Plugin Name: FPMC Account
 * Description: Styles for FPMC Account plugin's admin and frontend displays.
 * Version: 1.0.0
 * Author: Harsh Gogi
 */

/* === General Styles for Admin & Frontend Tables === */
.fpmc-account-shortcode-summary,
.fpmc-account-shortcode-transactions,
.fpmc-account-shortcode-user-transactions,
.fpmc-account-form-section,
.fpmc-account-summary-section,
.fpmc-account-transactions-section {
    background-color: #ffffff; /* Light background */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fpmc-account-shortcode-summary h2,
.fpmc-account-shortcode-transactions h2,
.fpmc-account-shortcode-user-transactions h2,
.fpmc-account-form-section h2,
.fpmc-account-summary-section h2,
.fpmc-account-transactions-section h2 {
    color: #333;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.fpmc-transactions-table,
.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.fpmc-transactions-table th,
.wp-list-table th,
.fpmc-transactions-table td,
.wp-list-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.fpmc-transactions-table thead th,
.wp-list-table thead th {
    background-color: #f5f5f5;
    color: #555;
    font-weight: bold;
    text-transform: uppercase;
}

.fpmc-transactions-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* === Specific Colors for Transaction Types === */
.fpmc-transactions-table td.contribution,
.fpmc-contribution-amount,
.positive-balance {
    color: #28a745; /* Green for contributions/positive balance */
    font-weight: bold;
}

.fpmc-transactions-table td.expense,
.fpmc-expense-amount,
.negative-balance {
    color: #dc3545; /* Red for expenses/negative balance */
    font-weight: bold;
}

/* === Admin Form Specific Styles === */
.form-table th {
    font-weight: 600;
    padding-top: 15px;
    padding-bottom: 15px;
    width: 200px;
}

.form-table td {
    padding-top: 15px;
    padding-bottom: 15px;
}

.regular-text,
.large-text,
.form-table select {
    width: 100%;
    max-width: 400px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* === Action Links in Admin Table === */
.fpmc-transactions-table .row-actions a {
    color: #0073aa; /* WordPress default blue */
    text-decoration: none;
}
.fpmc-transactions-table .row-actions a:hover {
    text-decoration: underline;
}
.fpmc-transactions-table .row-actions a.fpmc-delete-link {
    color: #dc3545; /* Red for delete link */
}

/* === Notices (Success/Error) === */
.notice {
    margin-top: 20px;
}
.notice-success {
    border-left-color: #46b450;
}
.notice-error {
    border-left-color: #dc3232;
}

/* === Shortcode Specific Styles === */
.fpmc-account-shortcode-summary p,
.fpmc-account-shortcode-user-summary p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 782px) {
    .fpmc-account-form-section,
    .fpmc-account-summary-section,
    .fpmc-account-transactions-section,
    .fpmc-account-shortcode-summary,
    .fpmc-account-shortcode-transactions,
    .fpmc-account-shortcode-user-transactions {
        padding: 15px;
    }

    .form-table th, .form-table td {
        display: block;
        width: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .form-table th {
        padding-bottom: 0;
    }

    .regular-text, .large-text, .form-table select {
        max-width: 100%;
    }

    .wp-list-table, .fpmc-transactions-table {
        display: block;
        overflow-x: auto; /* Enable horizontal scrolling on small screens */
        white-space: nowrap; /* Prevent wrapping content in cells */
    }
}