/**
 * Styles for Woo Partner Dashboard
 * Author: Absylom
 */

.wpd-dashboard {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    color: #222;
}

.wpd-title {
    text-align: center;
    font-size: 1.8em;
    color: #0073aa;
    margin-bottom: 30px;
}

.wpd-subtitle {
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #444;
    border-bottom: 2px solid #f2f2f2;
    padding-bottom: 6px;
}

/* === Summary Cards === */
.wpd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wpd-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.wpd-card:hover {
    background: #f0f7ff;
    border-color: #0073aa;
}

.wpd-card h3 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.wpd-card p {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
    color: #0073aa;
}

/* === Tables === */
.wpd-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
}

.wpd-table th,
.wpd-table td {
    border: 1px solid #e5e5e5;
    padding: 10px 12px;
    text-align: left;
}

.wpd-table thead {
    background: #0073aa;
    color: #fff;
}

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

/* === Export Button === */
.wpd-export-form {
    text-align: right;
    margin-top: 40px;
}

.wpd-export-form .button {
    background-color: #0073aa;
    color: #fff;
    font-size: 14px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpd-export-form .button:hover {
    background-color: #005f8d;
}

/* === Chart Canvas === */
#wpd-sales-chart {
    width: 100% !important;
    height: 300px !important;
    margin-top: 20px;
}

/* === Responsive === */
@media (max-width: 600px) {
    .wpd-dashboard {
        padding: 15px;
    }
    .wpd-card p {
        font-size: 1.2em;
    }
    .wpd-subtitle {
        font-size: 1.1em;
    }
}

/* === Inline Filter Row (Dates + Status + Button) === */
.wpd-date-filter {
    text-align: center;
    margin-bottom: 35px;
}

.wpd-date-fields {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

/* Labels */
.wpd-date-fields label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* Date inputs */
.wpd-date-fields input[type="date"] {
    width: 150px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Status dropdown (smaller width) */
.wpd-date-fields select {
    width: 130px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
}

/* Apply button */
.wpd-date-fields .button {
    background-color: #0073aa;
    color: #fff;
    font-size: 0.9em;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpd-date-fields .button:hover {
    background-color: #005f8d;
}

/* Responsive (stack vertically on small screens) */
@media (max-width: 650px) {
    .wpd-date-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .wpd-date-fields input[type="date"],
    .wpd-date-fields select,
    .wpd-date-fields .button {
        width: 100%;
    }
}

/* === Orders Table === */
.wpd-orders-table-wrapper {
    margin-top: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
}

.wpd-orders-table th, .wpd-orders-table td {
    text-align: center;
}

.wpd-orders-table td {
    font-size: 0.9em;
    padding: 8px 10px;
}

.wpd-orders-table thead th {
    background-color: #0073aa;
    color: #fff;
    font-weight: 600;
}

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

.wpd-orders-table tbody tr:hover {
    background: #f1f9ff;
}

/* === Pagination === */
.wpd-pagination {
    text-align: center;
    margin: 20px 0 30px;
}

.wpd-page-link {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.wpd-page-link:hover {
    background-color: #0073aa;
    color: #fff;
}

.wpd-page-link.active {
    background-color: #0073aa;
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}
