/*
Theme Name: GPLinkIT Theme
Theme URI: https://gplinkit.com
Author: Md Zubayer Al Hasan
Author URI: https://www.linkedin.com/in/jubayerdev/
Description: Premium B2B Digital Services & Guest Posting Marketplace WordPress Theme built with a clean, modern, and accessible foundation.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: gplinkit-theme
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* WooCommerce Checkout Notice & Details Polishing */
.woocommerce-form-coupon-toggle {
    margin-bottom: 1.5rem;
}
.woocommerce-form-coupon-toggle .woocommerce-info {
    display: flex;
    align-items: center;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #10b981 !important;
    border-radius: 1rem !important;
    padding: 1rem 1.25rem !important;
    color: #334155 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
.woocommerce-form-coupon-toggle .woocommerce-info::before {
    display: none !important;
}
.woocommerce-form-coupon-toggle .woocommerce-info a {
    color: #059669 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    margin-left: 0.35rem;
}
.woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: #047857 !important;
}
form.checkout_coupon {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.25rem !important;
    padding: 1.25rem !important;
    margin-bottom: 2rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

/* ==========================================================================
   Single Document Scrollbar & Duplicate Scrollbar Prevention
   ========================================================================== */
html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
}

/* Ensure semantic main container never creates an isolated vertical scroll container */
#main-content,
main.site-main,
main {
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* Preserve intentional scrolling for data tables, modals, dropdowns, dashboards */
.overflow-x-auto,
[class*="overflow-x-auto"],
.table-responsive {
    overflow-x: auto !important;
}

.overflow-y-auto,
[class*="overflow-y-auto"] {
    overflow-y: auto !important;
}

/* ==========================================================================
   Floating Scroll-To-Top Button
   ========================================================================== */
.gplinkit-scroll-top {
    position: fixed;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background-color: #059669;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(6, 78, 59, 0.25), 0 4px 6px -4px rgba(6, 78, 59, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.9);
    visibility: hidden;
    z-index: 40;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .gplinkit-scroll-top {
        right: 24px;
        bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
}

.gplinkit-scroll-top:hover {
    background-color: #047857;
    transform: translateY(0) scale(1.06);
    box-shadow: 0 14px 20px -3px rgba(6, 78, 59, 0.35), 0 6px 8px -4px rgba(6, 78, 59, 0.25);
}

.gplinkit-scroll-top:active {
    transform: translateY(0) scale(0.95);
}

.gplinkit-scroll-top:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #059669;
}

.gplinkit-scroll-top.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
}

/* Intelligent offset if floating widgets are present */
body:has(#whatsapp-widget, .floating-whatsapp, .whatsapp-btn, #chat-widget) .gplinkit-scroll-top {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
    .gplinkit-scroll-top {
        transition: none !important;
    }
}

