/* --- Basic Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 17px;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}
/* Prevent body scroll when side nav is open */
body.side-nav-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h2 { font-size: 2rem; text-align: center; margin-bottom: 2rem;}
h3 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #333;}
h4 { font-size: 1.2rem; color: #444; }


a {
    color: #D90429; /* PiX AMP Red */
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
    color: #A90321; /* Darker Red */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul { list-style: none; }
table { width: 100%; border-collapse: collapse; }

section {
    padding: 20px 0 40px 0; /* Reduced top padding */
}

/* Accessibility: Hide visually but keep for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* --- Header --- */
header {
    background-color: #ffffff;
    padding: 8px 0; /* Reduced padding */
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 10px 15px; /* Reduced gap */
}
header .logo img {
    height: 38px; /* Slightly smaller logo */
}

/* === Main Navigation Styles === */
/* Desktop Only */
.main-nav-desktop {
    display: flex; /* Displayed by default */
    margin: 0;
    order: 2; /* Order for flexbox layout */
}
.main-nav-desktop a {
    padding: 6px 12px; /* Reduced padding */
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem; /* Slightly smaller font */
    color: #1a1a1a; /* Black text */
    background-color: #f0f0f0; /* Light grey background */
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dcdcdc; /* Grey border */
    transition: all 0.2s ease;
    display: inline-flex; /* To align icon if added */
    align-items: center; /* To align icon if added */
    gap: 4px; /* Reduced gap */
    white-space: nowrap; /* Prevent button text wrapping */
}
.main-nav-desktop a::after {
    content: '→'; /* Simple arrow */
    font-weight: bold;
    margin-left: 3px; /* Reduced margin */
    transition: transform 0.2s ease;
}
.main-nav-desktop a:hover {
    background-color: #D90429; /* Red on hover */
    color: #ffffff;
    text-decoration: none;
    border-color: #A90321; /* Darker red border */
    box-shadow: 0 2px 5px rgba(217,4,41,0.2);
}
.main-nav-desktop a:hover::after {
    transform: translateX(3px); /* Arrow moves slightly on hover */
}
/* ================================== */

/* === Tagline Styles === */
.tagline {
    font-family: 'Poppins', sans-serif;
    font-weight: 500; /* Base weight for rest of tagline */
    font-size: 0.9rem; /* Adjusted size */
    color: #1a1a1a; /* Black for base text */
    text-align: center;
    flex-grow: 1; /* Take up space */
    margin: 0 5px; /* Minimal margin */
    padding: 0; /* Removed padding */
    border: none; /* Removed borders */
    order: 1; /* Order for flexbox layout */
    min-width: 200px; /* Prevent shrinking too much */
}
.tagline span.separator {
    color: #D90429; /* Red color for dots */
    font-weight: 700; /* Make dots bolder */
    margin: 0 2px; /* Add slight space around dots */
}
.tagline-pix, .tagline-amp {
    font-weight: 700; /* Make PiX AMP bolder */
    font-size: 1rem; /* Adjusted size */
    margin: 0; /* Ensure no extra margin */
    padding: 0; /* Ensure no extra padding */
}
.tagline-pix { color: #D90429; }
.tagline-amp { color: #1a1a1a; }

.tagline-mobile { display: none; } /* Hide mobile tagline by default */
/* ============================= */

/* === Language Link Styles === */
.language-switcher-links {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between links/separators */
    order: 3; /* Order for flexbox layout */
}
.lang-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller font */
    color: #555; /* Grey inactive color */
    text-decoration: none;
    padding: 4px 6px; /* Small padding */
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-link:hover {
    background-color: #f0f0f0; /* Light grey hover */
    color: #1a1a1a; /* Black text on hover */
    text-decoration: none;
}
.lang-link.active {
    color: #D90429; /* Red for active language */
    font-weight: 700; /* Bolder active language */
    background-color: #fce8ec; /* Light red background */
    pointer-events: none; /* Make active link non-clickable */
    cursor: default;
}
.lang-separator {
    color: #ccc; /* Light grey separator */
    font-size: 0.85rem;
    line-height: 1;
}
/* ============================= */

/* --- Hamburger Menu (Mobile Only) --- */
.hamburger-menu {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 0;
    order: 4; /* Position it last in the flex row */
    z-index: 1100; /* Above header, side nav, overlay */
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333; /* Black bars */
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}
.hamburger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* --- Side Navigation Panel (Mobile Only) --- */
.side-nav {
    position: fixed; top: 0; right: -280px; width: 280px; max-width: 80%; height: 100%; background-color: #ffffff; box-shadow: -2px 0 5px rgba(0,0,0,0.1); padding: 60px 20px 20px; transition: right 0.3s ease-in-out; z-index: 1050; overflow-y: auto;
}
.side-nav.active { right: 0; }
.side-nav nav { display: flex; flex-direction: column; }
.side-nav a {
    color: #333; padding: 15px 10px; font-size: 1.1rem; font-family: 'Poppins', sans-serif; text-decoration: none; border-bottom: 1px solid #eee; transition: background-color 0.2s ease;
}
.side-nav a:hover { background-color: #f8f8f8; color: #D90429; }
.side-nav a:last-child { border-bottom: none; }


/* --- Overlay --- */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out, visibility 0s 0.3s linear; z-index: 1000;
}
.overlay.active { opacity: 1; visibility: visible; transition: opacity 0.3s ease-in-out, visibility 0s 0s linear; }


/* --- Buttons --- */
.cta-button {
    display: inline-block;
    background-color: #D90429; /* Red */
    color: #ffffff;
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cta-button:hover {
    background-color: #A90321; /* Darker Red */
    text-decoration: none;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid #D90429;
    color: #D90429;
}
.cta-button.secondary:hover {
    background-color: #D90429;
    color: #ffffff;
}

/* --- Calculator Hub (Section 1) --- */
.calculator-hub {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.calculator-hub h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 25px;
}

/* --- Content Formatting (NEW) --- */
.intro-content {
    max-width: 900px;
    margin: 20px auto 40px auto;
    padding: 0 10px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.intro-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    text-align: left;
    border-bottom: 2px solid #D90429; /* Red underline for modern emphasis */
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.intro-content p {
    margin-bottom: 1.5rem;
    color: #495057; /* Slightly softer text color */
}

.intro-content p strong {
    color: #1a1a1a; /* Ensure emphasized terms stand out */
    font-weight: 700;
}

.intro-content a {
    text-decoration: underline; /* Emphasize links in content */
}

.seo-link-box {
    margin-top: 30px;
    padding: 15px;
    border-left: 5px solid #D90429;
    background-color: #f8f9fa;
    font-style: italic;
    font-size: 0.95rem;
}
/* --- END Content Formatting --- */

/* --- Forms --- */
#importTaxForm, #standaloneFinanceForm, #financeForm {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px 30px;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;

    /* Mobile select field fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: 'Lato', sans-serif; /* Ensure consistent font */
    line-height: 1.5; /* Consistent line height */
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 10px;
    cursor: pointer;
}

/* Specific adjustments for select elements */
.form-group select {
    padding-right: 35px; /* Make room for custom arrow */
}

/* Remove default arrow on IE/Edge */
.form-group select::-ms-expand {
    display: none;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .form-group input[type="number"],
    .form-group input[type="text"],
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px; /* Slightly larger padding for touch */
        min-height: 48px; /* Ensure consistent height */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    .form-group select {
        padding-right: 40px; /* More space for arrow on mobile */
        background-size: 14px 12px; /* Larger arrow for mobile */
        background-position: right 14px center;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .form-group select {
        /* Remove iOS default styling completely */
        -webkit-appearance: none;
        border-radius: 4px; /* Ensure consistent border radius */
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-group select {
        background-color: #f8f9fa !important; /* Force background color */
        color: #495057 !important; /* Force text color */
    }
}

/* Remove spin buttons */
.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="text"][inputmode="numeric"]::-webkit-outer-spin-button,
.form-group input[type="text"][inputmode="numeric"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none; /* Added for extra safety */
}
.form-group input[type="number"],
.form-group input[type="text"][inputmode="numeric"] {
    -moz-appearance: textfield;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #D90429; /* Red focus */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(217, 4, 41, 0.25);
}

.form-group input::placeholder {
    color: #a0aec0;
}

#importTaxForm .cta-button,
#standaloneFinanceForm .cta-button,
#financeForm .cta-button {
    display: block;
    width: fit-content;
    margin: 25px auto 0;
}

/* Advanced Costs */
.advanced-toggle {
    margin: 20px 0;
    padding-left: 5px;
}
.advanced-toggle label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #0056b3;
    font-weight: 600;
}
.advanced-toggle label:hover {
    color: #007bff;
}
.advanced-toggle input[type="checkbox"] {
    margin-right: 10px;
    height: 17px;
    width: 17px;
    accent-color: #D90429;
}

.advanced-costs {
    margin-top: 15px;
    padding: 20px;
    background-color: #f1f3f5;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
}
.advanced-costs h4 {
    margin-bottom: 20px;
    text-align: center;
    color: #495057;
    font-size: 1.1rem;
}
.advanced-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px 25px;
    margin-bottom: 0;
}

/* --- Disclaimers --- */
.disclaimer {
    background-color: #fffbeb; /* Very pale yellow */
    border: 1px solid #ffeeba;   /* Soft yellow border */
    color: #665b3c;           /* Softer, less saturated brown text */
    padding: 12px 15px;
    margin: 25px 0;
    border-radius: 5px;

    /* --- FONT STYLES --- */
    font-family: 'Open Sans', sans-serif; /* Use the new font */
    font-size: 0.75rem;        /* Smaller font */
    line-height: 1.6;          /* Adjust line height */
}
.disclaimer p {
    margin-bottom: 5px;
}
.disclaimer p:last-child {
    margin-bottom: 0;
}
.disclaimer strong {
    font-family: 'Open Sans', sans-serif; /* Ensure strong tag also uses it */
    font-weight: 600;     /* Use semi-bold */
    display: inline;      /* Make it flow with the text */
    margin-bottom: 0;
    color: #856404;       /* Darker brown for the title */
}
/* --- Loading & Error --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #D90429; /* Red spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-overlay p {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    margin: 20px auto;
    border-radius: 5px;
    text-align: center;
    max-width: 800px;
    font-weight: 600;
}


/* --- Result Section Layout --- */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 40px;
}
/* Container for finance options form */
.finance-options-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.finance-options-container h3 { text-align: center; }
.finance-options-container .form-grid {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* Main content column (tables, etc.) */
.results-main { flex: 2; min-width: 320px; display: flex; flex-direction: column; }
/* Sidebar (charts) */
.results-visuals {
    flex: 1; min-width: 280px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    display: flex; flex-direction: column; align-items: center; gap: 30px;
}

/* Result Block Headers */
.results-main h3 {
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    color: #333;
}
.results-visuals h4 { text-align: center; margin-bottom: 20px; color: #444; }

/* Final Cost Styling */
.final-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #D90429; /* Red */
    text-align: center;
}
.final-value span { display: block; font-size: 1rem; color: #555; font-weight: normal; margin-bottom: 5px; }
.final-cost-import { margin-top: 25px; }

/* Result Table Styling */
.results-table { width: 100%; margin-bottom: 20px; font-size: 0.95rem; }
.results-table td { padding: 12px 5px; border-bottom: 1px solid #e9ecef; }
.results-table tr:last-child td { border-bottom: none; }
.results-table td:last-child { text-align: right; font-weight: bold; color: #333; }
.results-table .total-row td { font-weight: bold; font-size: 1.1rem; padding-top: 12px; color: #1a1a1a; }
.results-table .total-row td:last-child { color: #D90429; }
.results-table .advanced-cost-row td { color: #555; font-size: 0.9rem; padding-top: 5px; padding-bottom: 5px; }

/* Chart Containers */
#taxChartContainer, #financeChartContainer { position: relative; width: 100%; max-width: 400px; }
#taxChartContainer { height: 300px; }
#financeChartContainer { height: 300px; }
#taxChart, #financeChart { max-width: 100%; }

/* --- Slider Styles --- */
.form-group-slider { }
.slider-container { display: flex; align-items: center; gap: 15px; margin-top: 5px; }
input[type="range"] {
    flex-grow: 1; height: 8px; cursor: pointer; background: #e9ecef; border-radius: 5px; appearance: none; -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none; height: 18px; width: 18px; background: #D90429; border-radius: 50%; cursor: pointer; margin-top: -5px;
}
input[type="range"]::-moz-range-thumb {
    height: 16px; width: 16px; background: #D90429; border-radius: 50%; border: none; cursor: pointer;
}
.slider-value {
    font-weight: 600; color: #333; background-color: #f8f9fa; padding: 5px 10px; border-radius: 4px; border: 1px solid #ced4da; font-size: 0.9rem; min-width: 160px; text-align: center; white-space: nowrap;
}


/* --- Footer --- */
footer {
    background-color: #343a40;
    color: #adb5bd;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 0.9rem;
}
footer a { color: #dee2e6; }
footer a:hover { color: #ffffff; }
footer .social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 15px; padding-top: 5px; }
footer .social-links a { color: #adb5bd; margin: 0; font-size: 1rem; }
footer .social-links a:hover { color: #ffffff; }


/* --- Hamburger Menu (Mobile Only) --- */
.hamburger-menu {
    display: none; background: none; border: none; cursor: pointer; padding: 10px; margin: 0; order: 4; z-index: 1100;
}
.hamburger-menu span {
    display: block; width: 25px; height: 3px; background-color: #333; margin: 5px 0; transition: all 0.3s ease-in-out;
}
.hamburger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.side-nav {
    position: fixed; top: 0; right: -280px; width: 280px; max-width: 80%; height: 100%; background-color: #ffffff; box-shadow: -2px 0 5px rgba(0,0,0,0.1); padding: 60px 20px 20px; transition: right 0.3s ease-in-out; z-index: 1050; overflow-y: auto;
}
.side-nav.active { right: 0; }
.side-nav nav { display: flex; flex-direction: column; }
.side-nav a {
    color: #333; padding: 15px 10px; font-size: 1.1rem; font-family: 'Poppins', sans-serif; text-decoration: none; border-bottom: 1px solid #eee; transition: background-color 0.2s ease;
}
.side-nav a:hover { background-color: #f8f8f8; color: #D90429; }
.side-nav a:last-child { border-bottom: none; }


/* --- Overlay --- */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out, visibility 0s 0.3s linear; z-index: 1000;
}
.overlay.active { opacity: 1; visibility: visible; transition: opacity 0.3s ease-in-out, visibility 0s 0s linear; }


/* --- Responsive Adjustments --- */

@media (max-width: 992px) {
    /* Stack main results and chart sidebars */
    .results-container { flex-direction: column; }
    .results-visuals { margin-top: 30px; max-width: 500px; margin-left: auto; margin-right: auto; order: 1; }
    .results-main { order: 0; }
    #taxChartContainer, #financeChartContainer { max-width: 100%; height: 320px; }
}

/* === MODIFIED Mobile Header Styles (768px and below) === */
@media (max-width: 768px) {
    header { position: static; padding: 10px 0; }
    .header-content { gap: 8px 10px; justify-content: space-between; display: flex; }
    header .logo { order: 1; margin-right: auto; }
    header .logo img { height: 30px; }

    /* Hide Desktop Nav Button & Desktop Tagline */
    .main-nav-desktop, .tagline-desktop { display: none; }

    /* Hide Mobile Tagline */
    .tagline-mobile { display: none; }

    .language-switcher-links { order: 2; gap: 3px; }
    .lang-link { font-size: 0.8rem; padding: 3px 5px; }
    .lang-separator { font-size: 0.8rem; }

    /* Show Hamburger Menu */
    .hamburger-menu { display: block; order: 3; }

    .calculator-hub, .results-container, .finance-partners, .finance-options-container { padding: 20px; }
    .results-main, .results-visuals { min-width: unset; }
}

@media (max-width: 576px) {
     h1 { font-size: 1.8rem; }
     h2 { font-size: 1.5rem; }
     .form-grid { grid-template-columns: 1fr; }
     .partner-grid { grid-template-columns: 1fr; }
     .final-value { font-size: 1.4rem;}
     .results-table td { font-size: 0.85rem;}
}

/* --- Sticky Footer Fix --- */
html { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main.container { flex-grow: 1; }

/* === FLOATING ACTION CTA (FINAL BLINKING BOX) === */
.floating-cta {
    /* Base positioning and look */
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    right: 20px;
    bottom: 20px;

    /* Box Styling */
    width: auto;
    height: auto;
    min-width: 150px;
    background-color: #D90429; /* PiX AMP Red */
    color: #ffffff; 
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 6px 15px rgba(217, 4, 41, 0.6); /* Strong shadow */
    text-align: center;
    text-transform: uppercase;
    z-index: 9999; 

    /* === PERMANENT VISIBILITY FIX === */
    opacity: 1; /* Always visible */
    visibility: visible; /* Always visible */
    transition: all 0.3s ease;

    /* Animation Call */
    animation: blink-shadow 1.5s infinite ease-in-out; /* Blinking/pulsing effect */
}

/* We remove .floating-cta.visible as it's always visible now */

.floating-cta:hover {
    background-color: #A90321; /* Darker Red on hover */
    text-decoration: none;
    color: #ffffff; 
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    animation: none; /* Stop pulsing/blinking on hover */
    transform: scale(1.05);
}

/* Keyframe animation to make the shadow pulse and scale slightly */
@keyframes blink-shadow {
    0% { box-shadow: 0 6px 15px rgba(217, 4, 41, 0.6); transform: scale(1); }
    50% { box-shadow: 0 0 10px rgba(217, 4, 41, 0.2); transform: scale(0.98); }
    100% { box-shadow: 0 6px 15px rgba(217, 4, 41, 0.6); transform: scale(1); }
}

/* Mobile adjustment */
@media (max-width: 576px) {
    .floating-cta {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 10px 15px;
        right: 10px;
        bottom: 10px;
    }
}

/* Add this CSS rule to your global stylesheet */
.results-table tr.no-bottom-border td {
    border-bottom: none !important; /* Removes the line under the main tax row */
}

/* Ensure the detail row itself has padding and a border on its bottom */
.results-table tr.detail-row td {
    border-top: none; /* Removes the line above the detail row */
    border-bottom: 1px solid #ddd; /* Re-applies the line under the detail section */
    padding-top: 0;
    padding-bottom: 5px;
}

/* --- 1. GUARANTEED FIX: REMOVE LINE UNDER THE PARENT TAX ROW --- */
/* Targets the cell itself in the parent row (CID, SUR, XID, LXT, VEL, COM, VAT) */
.results-table tr.no-bottom-border td {
    border-bottom: none !important; 
}

/* --- 2. GUARANTEED FIX: REMOVE LINE ABOVE THE DETAIL ROW --- */
/* Targets the cell itself in the detail row (which sits immediately under the parent) */
.results-table tr.detail-info-row td {
    border-top: none !important; /* <--- This ensures no line separation is inherited from above */
    
    /* Re-applies the separator line below the entire group */
    border-bottom: 1px solid #ddd; 
    
    /* Style for the detail text and icon */
    color: #007bff;
    font-weight: 500;
    font-size: 0.9em;
    padding-top: 2px !important;
    padding-bottom: 5px !important;
    vertical-align: top;
    padding-left: 20px !important;
}

/* --- 3. Style for the Info Icon placeholder (Unicode) --- */
.results-table tr.detail-info-row .info-icon {
    content: "\2139"; 
    font-style: normal;
    font-weight: bold;
    color: #007bff;
    margin-right: 5px;
}

/* --- 4. Style for inline detail text (used on CIF, CID, SUR, VAT descriptions) --- */
.results-table .tax-info {
    color: #007bff;
    font-weight: 500;
    font-size: 0.95em;
    margin-left: 5px;
    white-space: nowrap;
}

/* Align label and tooltip perfectly on one line */
.label-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2; /* ensures vertical centering matches */
  vertical-align: middle;
}

.label-with-tooltip label {
  margin: 0;
}

/* Tooltip container */
.tooltip-container {
  position: relative;
  display: inline-block;
}

/* Info icon styling */
.info-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  background-color: #7c7979;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  position: relative;
  top: -1px;
  transition: background-color 0.2s;
  /* Safari touch support */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.info-icon:hover,
.info-icon:focus,
.info-icon:active {
  background-color: #a12000;
  outline: none;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  max-width: 90vw; /* Responsive width */
  background-color: #333;
  color: #fff;
  text-align: left;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  z-index: 1000;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
  /* Safari improvements */
  -webkit-transform: translateX(-50%);
  word-wrap: break-word;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Enhanced hover/touch support for all devices */
.tooltip-container:hover .tooltip-content,
.tooltip-container:focus .tooltip-content,
.tooltip-container:active .tooltip-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  .info-icon {
    width: 20px;
    height: 20px;
    font-size: 13px;
  }
  
  .tooltip-content {
    width: 280px;
    max-width: 85vw;
    font-size: 14px;
    padding: 15px;
    /* On mobile, show tooltip below the icon instead */
    bottom: auto;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .tooltip-content::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #333 transparent;
  }
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
  .tooltip-container {
    /* Make the container tappable on Safari */
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  }
  
  .info-icon {
    /* Ensure proper touch handling */
    -webkit-user-select: none;
    user-select: none;
  }
}