/* ==========================================================================
   WHMCS Pricelist – inherits theme styles, responsive table
   ========================================================================== */

.whmcs-pricelist-wrap {
    margin: 1.5em 0;
    overflow-x: auto;
}

.whmcs-pricelist-heading {
    margin-bottom: 0.75em;
}

/* ---- Table base ---- */
.whmcs-pricelist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    line-height: 1.5;
}

.whmcs-pricelist-table thead tr {
    border-bottom: 2px solid currentColor;
    opacity: 0.9;
}

.whmcs-pricelist-table th {
    padding: 0.65em 1em;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.whmcs-pricelist-table td {
    padding: 0.75em 1em;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Subtle zebra stripe that won't clash with dark themes */
.whmcs-pricelist-table tbody tr:nth-child(even) td {
    background-color: rgba(0,0,0,0.03);
}

.whmcs-pricelist-table tbody tr:hover td {
    background-color: rgba(0,0,0,0.055);
}

/* ---- Column widths ---- */
.whmcs-pricelist-table .col-name    { min-width: 140px; }
.whmcs-pricelist-table .col-desc    { min-width: 200px; }
.whmcs-pricelist-table .col-monthly { white-space: nowrap; text-align: right; }
.whmcs-pricelist-table .col-setup   { white-space: nowrap; text-align: right; }
.whmcs-pricelist-table .col-action  { text-align: center; white-space: nowrap; }

.whmcs-pricelist-table thead .col-monthly,
.whmcs-pricelist-table thead .col-setup {
    text-align: right;
}

.whmcs-pricelist-table thead .col-action {
    text-align: center;
}

/* ---- Buy Now button – inherits theme link colour ---- */
.whmcs-pricelist-btn {
    display: inline-block;
    padding: 0.4em 1.1em;
    border: 2px solid currentColor;
    border-radius: 3px;
    font-size: 0.875em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.whmcs-pricelist-btn:hover {
    background-color: currentColor;
    /* Overlay hack: set text transparent so only bg shows; works across themes */
    color: currentColor;
    opacity: 0.85;
    text-decoration: none;
}

/* ---- Error / notice ---- */
.whmcs-pricelist-error {
    color: #c0392b;
    border-left: 3px solid #c0392b;
    padding-left: 0.75em;
}

.whmcs-pricelist-notice {
    opacity: 0.7;
    font-style: italic;
}

/* ==========================================================================
   Responsive: stack as labelled rows on small screens
   ========================================================================== */
@media ( max-width: 640px ) {

    .whmcs-pricelist-table thead {
        display: none;
    }

    .whmcs-pricelist-table,
    .whmcs-pricelist-table tbody,
    .whmcs-pricelist-table tr,
    .whmcs-pricelist-table td {
        display: block;
        width: 100%;
    }

    .whmcs-pricelist-table tr {
        border-bottom: 2px solid rgba(0,0,0,0.1);
        padding: 0.5em 0;
        margin-bottom: 0.5em;
    }

    .whmcs-pricelist-table td {
        border-bottom: none;
        padding: 0.35em 0.75em;
        text-align: left !important;
    }

    /* Show the column label inline */
    .whmcs-pricelist-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        margin-right: 0.25em;
    }

    .whmcs-pricelist-table .col-action {
        padding-top: 0.6em;
    }

    .whmcs-pricelist-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}
