/* ================================================================
   TOPUP HOSTING — GoDaddy Reseller Plugin Styles
   Version 1.2

   HOW THIS WORKS:
   We wrap every [rstore-*] shortcode in:
     <div class="rstore-products-wrap">
       <?php echo do_shortcode('[rstore-vps]'); ?>
     </div>

   This file then targets the plugin's HTML output INSIDE that
   wrapper and transforms it into our branded card design.

   The plugin outputs for each product:
     <h4>Product Name</h4>
     price text
     <a>Add to cart</a>
     <ul><li>Feature</li>...</ul>
     <p>Description/note text</p>
     <a>More info</a>

   Exact class names vary by plugin version — we target both
   element types AND known plugin class names so it works
   regardless of the plugin version installed.
================================================================ */


/* ================================================================
   1. PRODUCTS GRID WRAPPER
   Makes the plugin's flat list of products into a responsive
   card grid.
================================================================ */

.rstore-products-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
}

/* Remove any default flex/block layout the plugin may apply */
.rstore-products-wrap > *,
.rstore-products-wrap .rstore-product,
.rstore-products-wrap .rstore-products,
.rstore-products-wrap [class*="rstore-product"],
.rstore-products-wrap [class*="rstores-product"] {
    display: flex !important;
    flex-direction: column !important;
    background: var(--color-background-primary, #fff) !important;
    border: 1px solid var(--color-border-tertiary, #E5E7EB) !important;
    border-radius: 12px !important;
    padding: 22px !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    position: relative !important;
}

.rstore-products-wrap > *:hover,
.rstore-products-wrap .rstore-product:hover {
    border-color: #1A7FE8 !important;
    box-shadow: 0 2px 16px rgba(26, 127, 232, 0.1) !important;
}


/* ================================================================
   2. PRODUCT NAME  (plugin outputs as <h4> or .rstore-product-name)
================================================================ */

.rstore-products-wrap h4,
.rstore-products-wrap .rstore-product-name,
.rstore-products-wrap [class*="product-name"],
.rstore-products-wrap [class*="plan-name"],
.rstore-products-wrap .card-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--color-text-primary, #1A1A1A) !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    border: none !important;
    background: none !important;
    min-height: 40px !important;
    /* Keep the name readable even when long */
    word-break: break-word !important;
}


/* ================================================================
   3. PRICE DISPLAY
   Plugin outputs price as text — we style whatever wraps it.
================================================================ */

.rstore-products-wrap .rstore-price,
.rstore-products-wrap .rstores-price,
.rstore-products-wrap [class*="rstore-price"]:not(.rstore-products-wrap),
.rstore-products-wrap [class*="price-wrap"],
.rstore-products-wrap .card-price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--color-text-primary, #1A1A1A) !important;
    line-height: 1.1 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    font-family: inherit !important;
}

/* Price period: "/ per month" */
.rstore-products-wrap .rstore-price .rstore-period,
.rstore-products-wrap .rstore-price .rstore-term,
.rstore-products-wrap [class*="price-term"],
.rstore-products-wrap [class*="price-period"],
.rstore-products-wrap sub {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--color-text-secondary, #6B7280) !important;
    display: block !important;
    margin-bottom: 16px !important;
}

/* Currency symbol */
.rstore-products-wrap sup,
.rstore-products-wrap .rstore-currency {
    font-size: 16px !important;
    font-weight: 600 !important;
    vertical-align: super !important;
    color: var(--color-text-primary, #1A1A1A) !important;
}

/* Strike-through / was-price */
.rstore-products-wrap del,
.rstore-products-wrap .rstore-list-price,
.rstore-products-wrap [class*="was-price"],
.rstore-products-wrap [class*="list-price"] {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--color-text-secondary, #9CA3AF) !important;
    text-decoration: line-through !important;
    display: block !important;
    margin-bottom: 4px !important;
}


/* ================================================================
   4. ADD TO CART BUTTON
   Plugin outputs as <a> or <button> with various class names.
   We target all of them.
================================================================ */

/* All possible add to cart selectors */
.rstore-products-wrap a[class*="add-to-cart"],
.rstore-products-wrap button[class*="add-to-cart"],
.rstore-products-wrap a[class*="rstore-btn"],
.rstore-products-wrap button[class*="rstore-btn"],
.rstore-products-wrap a[class*="rstores-btn"],
.rstore-products-wrap a.btn-primary,
.rstore-products-wrap button.btn-primary,
.rstore-products-wrap a.btn,
.rstore-products-wrap input[type="submit"],
.rstore-products-wrap .rstore-add-to-cart,
.rstore-products-wrap .rstores-add-to-cart {
    display: block !important;
    width: 100% !important;
    padding: 11px 16px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid #1A7FE8 !important;
    background: transparent !important;
    color: #1A7FE8 !important;
    text-decoration: none !important;
    margin-bottom: 16px !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s !important;
    font-family: inherit !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
}

.rstore-products-wrap a[class*="add-to-cart"]:hover,
.rstore-products-wrap button[class*="add-to-cart"]:hover,
.rstore-products-wrap a[class*="rstore-btn"]:hover,
.rstore-products-wrap a.btn:hover {
    background: #1A7FE8 !important;
    color: #fff !important;
    text-decoration: none !important;
}


/* ================================================================
   5. FEATURES LIST  (plugin outputs as <ul><li>)
================================================================ */

.rstore-products-wrap ul,
.rstore-products-wrap .rstore-features,
.rstore-products-wrap [class*="rstore-feature"],
.rstore-products-wrap [class*="plan-features"] {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 14px 0 !important;
    border-top: 1px solid var(--color-border-tertiary, #E5E7EB) !important;
    padding-top: 14px !important;
    flex: 1 !important;
}

.rstore-products-wrap ul li,
.rstore-products-wrap .rstore-features li,
.rstore-products-wrap [class*="rstore-feature"] li {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 5px 0 !important;
    font-size: 12px !important;
    color: var(--color-text-secondary, #6B7280) !important;
    border-bottom: 1px solid var(--color-border-tertiary, #F3F4F6) !important;
    background: none !important;
    margin: 0 !important;
    list-style: none !important;
}

.rstore-products-wrap ul li:last-child,
.rstore-products-wrap .rstore-features li:last-child {
    border-bottom: none !important;
}

/* Checkmark bullet — generated via CSS pseudo-element */
.rstore-products-wrap ul li::before,
.rstore-products-wrap .rstore-features li::before {
    content: '' !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    border-radius: 50% !important;
    background: #E8F7EE !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: inset 0 0 0 4px #E8F7EE, inset 0 0 0 8px #2E9E5B !important;
    /* Creates a green dot inside a light green circle */
}


/* ================================================================
   6. DESCRIPTION / NOTES
   Plugin outputs extra description text as <p>.
   Currently styled as a subtle info note.
   To HIDE all descriptions, uncomment the display:none line below.
================================================================ */

.rstore-products-wrap p,
.rstore-products-wrap .rstore-description,
.rstore-products-wrap [class*="rstore-desc"],
.rstore-products-wrap [class*="card-text"],
.rstore-products-wrap .rstore-product-description {
    font-size: 11px !important;
    color: var(--color-text-secondary, #6B7280) !important;
    line-height: 1.6 !important;
    background: var(--color-background-secondary, #F7F8FA) !important;
    border-left: 3px solid #1A7FE8 !important;
    padding: 8px 12px !important;
    border-radius: 0 6px 6px 0 !important;
    margin: 0 0 12px 0 !important;
    font-style: italic !important;

    /* TO HIDE DESCRIPTIONS ENTIRELY, uncomment this: */
    /* display: none !important; */
}


/* ================================================================
   7. MORE INFO LINK
================================================================ */

.rstore-products-wrap a[class*="more-info"],
.rstore-products-wrap a.rstore-more-info,
.rstore-products-wrap .rstore-product a:last-child,
.rstore-products-wrap > * > a:last-of-type {
    font-size: 12px !important;
    color: #1A7FE8 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: block !important;
    margin-top: auto !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--color-border-tertiary, #E5E7EB) !important;
}

.rstore-products-wrap a[class*="more-info"]:hover,
.rstore-products-wrap a.rstore-more-info:hover {
    color: #1265C0 !important;
    text-decoration: underline !important;
}


/* ================================================================
   8. PLANS NOTE (below the grid)
================================================================ */

.rstore-plans-note {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary, #6B7280);
    margin-top: 20px;
    padding: 10px 16px;
    background: var(--color-background-secondary, #F7F8FA);
    border-radius: 8px;
}


/* ================================================================
   9. DOMAIN SEARCH WIDGET  [rstore-domain-search]
================================================================ */

.rstore-domain-search-wrap {
    max-width: 600px;
    margin: 0 auto 20px;
}

.rstore-domain-search-wrap form,
.rstore-domain-search-wrap [class*="rstore-domain"],
.rstore-domain-search-wrap [class*="rstores-domain"] {
    display: flex !important;
    border: 2px solid #1A7FE8 !important;
    border-radius: 9px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rstore-domain-search-wrap input[type="text"],
.rstore-domain-search-wrap input[type="search"] {
    flex: 1 !important;
    padding: 15px 18px !important;
    font-size: 15px !important;
    border: none !important;
    outline: none !important;
    color: #1A1A1A !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-family: inherit !important;
}

.rstore-domain-search-wrap input[type="submit"],
.rstore-domain-search-wrap button[type="submit"],
.rstore-domain-search-wrap [class*="search-btn"] {
    background: #1A7FE8 !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    border-radius: 0 !important;
    transition: background 0.15s !important;
    font-family: inherit !important;
}

.rstore-domain-search-wrap input[type="submit"]:hover,
.rstore-domain-search-wrap button[type="submit"]:hover {
    background: #1265C0 !important;
}


/* ================================================================
   10. GLOBAL PLUGIN RESETS
   Strip unwanted default plugin container styles.
================================================================ */

[class*="rstore-"],
[class*="rstores-"] {
    box-sizing: border-box;
}

/* Remove any default cards/panels from the plugin */
.rstore-products-wrap .rstore-product,
.rstore-products-wrap [class*="rstore-product"],
.rstore-products-wrap [class*="rstores-product"] {
    border-collapse: unset !important;
}

/* Hide plugin's own header/title if it injects one above the products */
.rstore-products-wrap > h2,
.rstore-products-wrap > h3,
.rstore-products-wrap [class*="rstore-heading"],
.rstore-products-wrap [class*="rstore-header"]:not(h4) {
    display: none !important;
}

/* Remove unwanted images the plugin may inject */
.rstore-products-wrap .rstore-product img,
.rstore-products-wrap [class*="product-image"] {
    display: none !important;
}


/* ================================================================
   11. RESPONSIVE
================================================================ */

@media (max-width: 900px) {
    .rstore-products-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .rstore-products-wrap {
        grid-template-columns: 1fr !important;
    }

    .rstore-domain-search-wrap form,
    .rstore-domain-search-wrap [class*="rstore-domain"] {
        flex-direction: column !important;
    }

    .rstore-domain-search-wrap input[type="submit"],
    .rstore-domain-search-wrap button[type="submit"] {
        width: 100% !important;
    }
}
