/**
 * Forms Overview for Elementor - Stylesheet
 * Version: 1.2.0
 */

.forms-overview-container {
    max-width: 1200px;
}

.date-filter-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.date-input {
    width: 200px;
    padding: 5px 8px;
    line-height: 2;
    min-height: 30px;
}

#loading {
    text-align: center;
    font-style: italic;
    color: #666;
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#results-container table {
    margin-top: 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    /* Ensure table takes full width for percentage widths to work */
    width: 100%;
    table-layout: fixed; /* This helps in controlling column widths precisely */
}

#no-results {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    text-align: center;
    color: #666;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#error-message {
    background: #fff;
    border-left: 4px solid #dc3232;
    padding: 12px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#error-message .error {
    color: #dc3232;
    margin: 0;
}

.wp-list-table th {
    font-weight: 600;
}

.wp-list-table td.text-center {
    text-align: left;
    padding-left: 20px;
}

.wp-list-table .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.wp-list-table .success-icon {
    color: #46b450;
}

.wp-list-table .failed-icon {
    color: #dc3232;
}

/* Totals row styling */
.wp-list-table .totals-row {
    background-color: #f1f1f1;
    border-top: 2px solid #0073aa;
}

.wp-list-table .totals-row td {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 14px;
}

.wp-list-table .totals-row:hover {
    background-color: #f1f1f1;
}

/* Column width adjustments */
.wp-list-table th:nth-child(1),
.wp-list-table td:nth-child(1) {
    width: 65%; /* First column for Form Name */
}

.wp-list-table th:nth-child(2),
.wp-list-table td:nth-child(2) {
    width: 17.5%; /* Second column for Successful Submissions */
    text-align: left; /* Center the icon and number */
    padding-left: 0; /* Remove extra padding if it causes alignment issues */
}

.wp-list-table th:nth-child(3),
.wp-list-table td:nth-child(3) {
    width: 17.5%; /* Third column for Failed Submissions */
    text-align: left; /* Center the icon and number */
    padding-left: 0; /* Remove extra padding if it causes alignment issues */
}

/* Ensure the text in the first column is left-aligned */
.wp-list-table td:nth-child(1) {
    text-align: left;
    padding-left: 8px; /* Adjust padding as needed for readability */
}

/* Previous Month button styling */
.button-secondary {
    margin-left: 10px;
}

/* Responsive improvements */
@media screen and (max-width: 782px) {
    .date-input {
        width: 100%;
        max-width: 300px;
    }

    .forms-overview-container {
        margin-right: 0;
    }

    .button-secondary {
        margin-left: 0;
        margin-top: 10px;
    }

    /* Adjust column widths for smaller screens if necessary */
    .wp-list-table th:nth-child(1),
    .wp-list-table td:nth-child(1) {
        width: auto; /* Allow content to dictate width or set a smaller percentage */
    }

    .wp-list-table th:nth-child(2),
    .wp-list-table td:nth-child(2),
    .wp-list-table th:nth-child(3),
    .wp-list-table td:nth-child(3) {
        width: auto; /* Allow content to dictate width */
        text-align: left;
    }
}
