/*
 * Coupon provider pages (/provider/{slug}/) only: the provider's own text in the top box and the article below the coupons.
 * Loaded only on these pages (kpc_enqueue_coupon_store_assets() in functions.php); every rule is scoped to body.tax-coupon_store.
 * Owner's request (5 Nov 2026), after the Couponbarrow store page: teal list dots, styled tables and a teal bar on FAQ questions.
 * The text itself (font, size, line and letter spacing) stays exactly as before (owner's choice); only table cells get smaller on phones so every column fits.
 * Teal #00979d is the theme's own colour (WP Coupon primary colour on kube.promo).
 */

/* Lists: teal bullets and numbers (text, sizes and spacing unchanged) */
body.tax-coupon_store main.coupon-store-main > ul li::marker,
body.tax-coupon_store main.coupon-store-main > ol li::marker {
    color: #00979d;
}

/* Questions (h3, e.g. the FAQ): a teal bar on the left (text, sizes and spacing unchanged) */
body.tax-coupon_store main.coupon-store-main > h3 {
    border-left: 4px solid #00979d;
    padding-left: 10px;
}

/* Tables: teal header row, rounded light-teal frame, every other row light teal, centred cells.
   Works for tables with a header row (th) and for tables whose first row is the header (plain td). */
body.tax-coupon_store main.coupon-store-main > table,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #bfe3e5;
    overflow: hidden;
    margin: 18px 0 24px;
    background: #fff;
}
/* Rounded table corners; typography.css makes every corner square on coupon pages with !important, so this needs !important and #content */
body.tax-coupon_store #content main.coupon-store-main > table,
body.tax-coupon_store #content main.coupon-store-main > figure.wp-block-table > table {
    border-radius: 8px !important;
}
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table {
    margin: 0;
}
body.tax-coupon_store main.coupon-store-main > table td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table td {
    padding: 11px 16px;
    border: 0;
    border-top: 1px solid #d9eff0;
    text-align: center;
}
body.tax-coupon_store main.coupon-store-main > table td + td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table td + td {
    border-left: 1px solid #e9e9e9;
}
body.tax-coupon_store main.coupon-store-main > table tr:nth-child(even) td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table tr:nth-child(even) td {
    background: #f0fafa;
}
body.tax-coupon_store main.coupon-store-main > table th,
body.tax-coupon_store main.coupon-store-main > table thead td,
body.tax-coupon_store main.coupon-store-main > table:not(:has(th)) tr:first-child td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table th,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table thead td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table:not(:has(th)) tr:first-child td {
    background: #00979d;
    color: #fff;
    text-transform: uppercase;
    padding: 11px 16px;
    border: 0;
    text-align: center;
}
/* Header row: thin white lines between the columns, so the column lines run through the whole table */
body.tax-coupon_store main.coupon-store-main > table th + th,
body.tax-coupon_store main.coupon-store-main > table thead td + td,
body.tax-coupon_store main.coupon-store-main > table:not(:has(th)) tr:first-child td + td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table th + th,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table thead td + td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table:not(:has(th)) tr:first-child td + td {
    border-left: 1px solid rgba(255, 255, 255, .45);
}
body.tax-coupon_store main.coupon-store-main > table tbody tr:hover td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table tbody tr:hover td {
    background: #e1f4f5;
}
body.tax-coupon_store main.coupon-store-main > table:not(:has(th)) tr:first-child:hover td,
body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table:not(:has(th)) tr:first-child:hover td {
    background: #00979d;
}

/* Phones: smaller table text and padding so a 4-column table fits the screen without cutting off a column */
@media (max-width: 600px) {
    body.tax-coupon_store main.coupon-store-main > table td,
    body.tax-coupon_store main.coupon-store-main > table th,
    body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table td,
    body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table th {
        padding: 8px 4px;
        font-size: 12px;
    }
    body.tax-coupon_store main.coupon-store-main > table th,
    body.tax-coupon_store main.coupon-store-main > table thead td,
    body.tax-coupon_store main.coupon-store-main > table:not(:has(th)) tr:first-child td,
    body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table th,
    body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table thead td,
    body.tax-coupon_store main.coupon-store-main > figure.wp-block-table > table:not(:has(th)) tr:first-child td {
        font-size: 11px;
    }
}

/* Share buttons (kpc_store_share() in functions.php; provider and category pages): the Twitter button shows the X logo in place of
   the theme's Twitter bird, same 16px size and spot, in black. The share link itself is the theme's Twitter one, which opens X. */
body.tax-coupon_store .kpc-share .social-likes__icon_twitter,
body.tax-coupon_category .kpc-share .social-likes__icon_twitter {
    visibility: hidden;
}
body.tax-coupon_store .kpc-share .social-likes__widget_twitter::before,
body.tax-coupon_category .kpc-share .social-likes__widget_twitter::before {
    content: "";
    display: block;
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") no-repeat center / 14px 14px;
    pointer-events: none;
}
/* Twitter button on hover or focus: X's own black (the theme would use Twitter blue), with a white logo and label */
body.tax-coupon_store .kpc-share .social-likes__widget_twitter:hover,
body.tax-coupon_store .kpc-share .social-likes__widget_twitter:focus,
body.tax-coupon_category .kpc-share .social-likes__widget_twitter:hover,
body.tax-coupon_category .kpc-share .social-likes__widget_twitter:focus {
    background: #000;
    border-color: #000;
    color: #fff;
}
body.tax-coupon_store .kpc-share .social-likes__widget_twitter:hover::before,
body.tax-coupon_store .kpc-share .social-likes__widget_twitter:focus::before,
body.tax-coupon_category .kpc-share .social-likes__widget_twitter:hover::before,
body.tax-coupon_category .kpc-share .social-likes__widget_twitter:focus::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}

/* "Copy link" button after Twitter (owner's choice, v2.57; kpc_store_share() in functions.php, coupon-store.js): the theme's share buttons
   and this button sit on one row, 10px apart, and wrap onto a second line on phones (5px between lines).
   Same size and look as the theme's share buttons (27px tall, 14px semi-bold text, grey border, 16px icon on the left); teal link icon,
   teal button with white text on hover or focus. The label reads "Copied!" for 2 seconds after a click. */
body.tax-coupon_store .kpc-share .skin_flat,
body.tax-coupon_category .kpc-share .skin_flat {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px 10px;
}
body.tax-coupon_store .kpc-share .kpc-copy-link,
body.tax-coupon_category .kpc-share .kpc-copy-link {
    position: relative;
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    margin: 0;
    padding: 2.625px 5.6px 3.5px 23.8px;
    height: 27px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}
body.tax-coupon_store .kpc-share .kpc-copy-link__icon,
body.tax-coupon_category .kpc-share .kpc-copy-link__icon {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 16px;
    height: 16px;
    color: #00979d;
}
body.tax-coupon_store .kpc-share .kpc-copy-link:hover,
body.tax-coupon_store .kpc-share .kpc-copy-link:focus,
body.tax-coupon_category .kpc-share .kpc-copy-link:hover,
body.tax-coupon_category .kpc-share .kpc-copy-link:focus {
    background: #00979d;
    border-color: #00979d;
    color: #fff;
}
body.tax-coupon_store .kpc-share .kpc-copy-link:hover .kpc-copy-link__icon,
body.tax-coupon_store .kpc-share .kpc-copy-link:focus .kpc-copy-link__icon,
body.tax-coupon_category .kpc-share .kpc-copy-link:hover .kpc-copy-link__icon,
body.tax-coupon_category .kpc-share .kpc-copy-link:focus .kpc-copy-link__icon {
    color: #fff;
}
