/*
 * WC Affiliate Manager: affiliate area and forms.
 *
 * Deliberately light: the theme's own styles for forms, tables and buttons
 * do most of the work, and the child theme already styles the registration
 * form through #affwp-register-form. Only layout that the theme can't know
 * about lives here.
 */

/* Messages */
.wcam-errors,
.wcam-notice {
    margin: 0 0 1.25em;
    padding: 0.75em 1em;
    border-left: 4px solid #777;
    background: rgba(0, 0, 0, 0.04);
}
.wcam-errors {
    border-left-color: #b32d2e;
}
.wcam-errors p {
    margin: 0.25em 0;
}
.wcam-notice-success {
    border-left-color: #2e7d32;
}
.wcam-small {
    display: block;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Forms: labels above fields */
.wcam-form label {
    display: block;
}
.wcam-form label.affwp-tos,
.wcam-form label.affwp-user-remember,
.wcam-form label.affwp-referral-notifications {
    display: inline;
}
.wcam-form input[type="text"],
.wcam-form input[type="email"],
.wcam-form input[type="url"],
.wcam-form input[type="password"],
.wcam-form textarea,
.wcam-area input.wcam-copy {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Dashboard tabs */
.wcam-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em 1.25em;
    margin: 0 0 1.5em;
    padding: 0 0 0.5em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    list-style: none;
}
.wcam-tabs li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.wcam-tabs li.active a {
    font-weight: 700;
    text-decoration: underline;
}

/* Tables */
.wcam-table {
    width: 100%;
    margin: 0 0 1.5em;
    border-collapse: collapse;
}
.wcam-table th,
.wcam-table td {
    padding: 0.5em 0.75em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    text-align: left;
    vertical-align: top;
}
.wcam-table td.wcam-url {
    word-break: break-all;
}
.wcam-status-rejected {
    opacity: 0.6;
}
.wcam-pagination {
    display: flex;
    gap: 1em;
    align-items: center;
}

/* Earnings chart: one column per month, bars grow from the bottom */
.wcam-chart {
    display: flex;
    align-items: flex-end;
    gap: 2%;
    height: 180px;
    margin: 0 0 1.5em;
    padding: 0.5em 0 0;
}
.wcam-chart-month {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    text-align: center;
}
.wcam-chart-track {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.wcam-chart-bar {
    width: 100%;
    background: currentColor;
    opacity: 0.55;
    border-radius: 3px 3px 0 0;
}
.wcam-chart-label {
    display: block;
    padding-top: 0.25em;
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
}

/* Narrow screens: let wide tables scroll rather than squash */
@media (max-width: 600px) {
    .wcam-tab {
        overflow-x: auto;
    }
    .wcam-chart {
        gap: 1%;
        height: 140px;
    }
}
