/**
 * WP Affiliate Pro - Dashboard Styles (Frontend)
 *
 * @package WP_Affiliate_Pro
 * @since   2.0.0
 */

/* Dashboard Container */
.wpap-dashboard {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Notices */
.wpap-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wpap-notice-info {
    background: #e8f4fd;
    border-left: 4px solid #0073aa;
    color: #004085;
}

.wpap-notice-warning {
    background: #fff3cd;
    border-left: 4px solid #ffb900;
    color: #856404;
}

/* Stats Grid */
.wpap-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.wpap-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wpap-stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6fc;
    border-radius: 8px;
    color: #0073aa;
}

.wpap-stat-content {
    display: flex;
    flex-direction: column;
}

.wpap-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

.wpap-stat-label {
    font-size: 13px;
    color: #757575;
    margin-top: 2px;
}

/* Section */
.wpap-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wpap-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

/* Link Generator */
.wpap-link-row {
    margin-bottom: 12px;
}

.wpap-link-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
    color: #1d2327;
}

.wpap-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.wpap-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.wpap-link-output {
    display: flex;
    gap: 8px;
}

.wpap-link-output .wpap-input {
    flex: 1;
    background: #f6f7f7;
}

.wpap-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}

.wpap-btn-primary {
    background: #0073aa;
    color: #fff;
}

.wpap-btn-primary:hover {
    background: #005a87;
}

.wpap-link-info {
    margin-top: 8px;
    font-size: 13px;
    color: #757575;
}

.wpap-link-info code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* Table */
.wpap-table-responsive {
    overflow-x: auto;
}

.wpap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wpap-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f6f7f7;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
}

.wpap-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #50575e;
}

.wpap-table tr:nth-child(even) td {
    background: #fafafa;
}

.wpap-table tr:hover td {
    background: #f0f6fc;
}

/* Badges */
.wpap-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: capitalize;
}

.wpap-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.wpap-badge-approved {
    background: #d4edda;
    color: #155724;
}

.wpap-badge-paid {
    background: #cce5ff;
    color: #004085;
}

.wpap-badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.wpap-badge-active {
    background: #d4edda;
    color: #155724;
}

.wpap-badge-suspended {
    background: #f8d7da;
    color: #721c24;
}

/* Conversion Rate */
.wpap-conversion-rate {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 15px;
}

.wpap-conversion-label {
    color: #757575;
}

.wpap-conversion-value {
    font-weight: 700;
    color: #0073aa;
    font-size: 18px;
}

/* No data */
.wpap-no-data {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .wpap-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wpap-stat-card {
        padding: 14px;
    }

    .wpap-stat-value {
        font-size: 17px;
    }

    .wpap-link-output {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .wpap-stats-grid {
        grid-template-columns: 1fr;
    }

    .wpap-section {
        padding: 16px;
    }
}
