/* WooMerchants — Vertriebspartner dashboard
 * Theme-agnostic styling that inherits typography + colors via
 * currentColor and CSS custom properties so individual sites can
 * retune without forking the plugin.
 */

.wm-vp-dashboard {
    --wm-vp-tile-bg:         rgba(255, 255, 255, 0.04);
    --wm-vp-tile-border:     rgba(255, 255, 255, 0.12);
    --wm-vp-button-bg:       #ec4899;
    --wm-vp-button-fg:       #ffffff;
    --wm-vp-status-active:   #1a7f37;
    --wm-vp-status-pending:  #b08c00;
    --wm-vp-status-paused:   #b08c00;
    --wm-vp-status-terminated: #b91c1c;

    max-width: 1100px;
    margin: 2rem auto;
    font-size: inherit;
    line-height: 1.45;
}

.wm-vp-dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 1.5em;
}
.wm-vp-dashboard-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    margin: 0;
}
.wm-vp-dashboard-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin: 0;
}
.wm-vp-dashboard-code code {
    padding: 0.15em 0.5em;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 1.05em;
}

.wm-vp-status {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2em 0.6em;
    border-radius: 999px;
    color: #fff;
}
.wm-vp-status--active     { background: var(--wm-vp-status-active); }
.wm-vp-status--pending    { background: var(--wm-vp-status-pending); }
.wm-vp-status--paused     { background: var(--wm-vp-status-paused); }
.wm-vp-status--terminated { background: var(--wm-vp-status-terminated); }

.wm-vp-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2em;
}
@media (max-width: 720px) {
    .wm-vp-tile-grid { grid-template-columns: 1fr; }
}

.wm-vp-tile {
    background: var(--wm-vp-tile-bg);
    border: 1px solid var(--wm-vp-tile-border);
    border-radius: 8px;
    padding: 1.1em 1.2em;
}
.wm-vp-tile h3 {
    margin: 0 0 0.7em;
    font-size: 1.05em;
}
.wm-vp-tile--wide {
    grid-column: 1 / -1;
}
.wm-vp-tile--notice {
    background: rgba(176, 140, 0, 0.12);
    border-color: rgba(176, 140, 0, 0.5);
}

.wm-vp-kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35em 1em;
    margin: 0;
}
.wm-vp-kv dt {
    font-weight: 600;
    opacity: 0.85;
}
.wm-vp-kv dd {
    margin: 0;
}

.wm-vp-button {
    display: inline-block;
    padding: 0.6em 1.2em;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    transition: opacity 0.15s ease, transform 0.05s ease;
}
.wm-vp-button:hover  { opacity: 0.85; }
.wm-vp-button:active { transform: translateY(1px); }
.wm-vp-button[disabled] { opacity: 0.6; cursor: progress; }
.wm-vp-button--primary {
    background: var(--wm-vp-button-bg);
    color: var(--wm-vp-button-fg);
    border-color: var(--wm-vp-button-bg);
}

.wm-vp-copy {
    cursor: pointer;
    background: transparent;
    border: 0;
    font-size: 1em;
    padding: 0.1em 0.4em;
    color: inherit;
}

.wm-vp-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 0;
}
.wm-vp-badge {
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}
.wm-vp-badge--ok    { background: rgba(26, 127, 55, 0.18);  color: #4ade80; }
.wm-vp-badge--warn  { background: rgba(176, 140, 0, 0.18);  color: #facc15; }

.wm-vp-error { color: #f87171; }

.wm-vp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.wm-vp-table th,
.wm-vp-table td {
    padding: 0.45em 0.6em;
    border-bottom: 1px solid var(--wm-vp-tile-border);
    text-align: left;
}
.wm-vp-table th {
    font-weight: 600;
    opacity: 0.85;
}

.wm-vp-payouts {
    margin: 0;
    padding: 0;
    list-style: none;
}
.wm-vp-payouts li {
    padding: 0.35em 0;
    border-bottom: 1px solid var(--wm-vp-tile-border);
}
.wm-vp-payouts li:last-child { border-bottom: 0; }

/* Signup form */
.wm-vp-signup {
    max-width: 540px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.wm-vp-field {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
.wm-vp-field label {
    font-weight: 600;
}
.wm-vp-field input[type="text"],
.wm-vp-field input[type="email"],
.wm-vp-field input[type="password"] {
    padding: 0.6em 0.75em;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
}
.wm-vp-field input[type="text"]#wm-vp-signup-code {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wm-vp-field-hint {
    margin: 0;
    font-size: 0.85em;
    opacity: 0.75;
}
.wm-vp-code-availability {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.95em;
}
.wm-vp-code-availability[data-state="ok"]    { color: #4ade80; }
.wm-vp-code-availability[data-state="error"] { color: #f87171; }
.wm-vp-signup-feedback {
    margin: 0;
    min-height: 1.4em;
}
.wm-vp-signup-feedback[data-state="ok"]    { color: #4ade80; }
.wm-vp-signup-feedback[data-state="error"] { color: #f87171; }

/* Profile edit form on the dashboard + multi-column rows in signup */
.wm-vp-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}
.wm-vp-field-row .wm-vp-field {
    flex: 1 1 0;
    min-width: 12em;
}
.wm-vp-field input[type="email"],
.wm-vp-field select {
    padding: 0.6em 0.75em;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 6px;
}
.wm-vp-profile-feedback {
    margin: 0.5em 0 0;
    min-height: 1.4em;
}
.wm-vp-profile-feedback[data-state="ok"]    { color: #4ade80; }
.wm-vp-profile-feedback[data-state="error"] { color: #f87171; }
