/*
Theme Name: ExpertSubmit Store
Theme URI: https://expertsubmit.com
Author: ExpertSubmit
Description: Custom storefront theme to match the main Python application.
Version: 1.5.0
Text Domain: expertsubmit-store
*/

:root {
    --primary-color-light: #ff7426;
    --secondary-color-light: #f7f9f9;
    --accent-color-light: #ff6347;
    --background-color-light: #fff;
    --text-color-light: #1a1a1a;
    --card-bg-light: rgba(255,255,255,.7);
    --nav-bg-light: rgba(255,255,255,.5);
    --shadow-light: 0 8px 32px 0 rgba(31,38,135,.1);
    
    --primary-color-dark: #ff7426;
    --secondary-color-dark: #1e1e2f;
    --accent-color-dark: #ff7f50;
    --background-color-dark: #12121b;
    --text-color-dark: #e0e0e0;
    --card-bg-dark: rgba(30,30,47,.7);
    --nav-bg-dark: rgba(18,18,27,.5);
    --shadow-dark: 0 8px 32px 0 rgba(0,0,0,.37);
    
    --font-family: "Inter", sans-serif;
    --transition-speed: .3s;
}

html.light-mode {
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --accent-color: var(--accent-color-light);
    --background-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --card-bg: var(--card-bg-light);
    --nav-bg: var(--nav-bg-light);
    --shadow: var(--shadow-light);
}

html.dark-mode {
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --accent-color: var(--accent-color-dark);
    --background-color: var(--background-color-dark);
    --text-color: var(--text-color-dark);
    --card-bg: var(--card-bg-dark);
    --nav-bg: var(--nav-bg-dark);
    --shadow: var(--shadow-dark);
}

body {
    font-family: var(--font-family);
    margin: 0; padding: 0; box-sizing: border-box;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

*, *::before, *::after { box-sizing: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-speed); }
a:hover { color: var(--accent-color); }
h1, h2, h3, h4, h5, h6 { margin-top: 0; }
.section-title { font-size: 2.8rem; text-align: center; margin-bottom: 1rem; font-weight: 800; }

/* --- HEADER & NAV --- */
.main-header { position: fixed; top: 20px; left: 20px; right: 20px; z-index: 1000; }
.main-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 30px; border-radius: 15px;
    background: var(--nav-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid hsla(0,0%,100%,.18); box-shadow: var(--shadow);
}
.logo img { height: 30px; display: block; }
html.dark-mode .logo-light { display: block; }
html.dark-mode .logo-dark { display: none; }
html.light-mode .logo-light { display: none; }
html.light-mode .logo-dark { display: block; }

.nav-links { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; }
.nav-links a { font-weight: 500; color: var(--text-color); }
.nav-links li.current-menu-item a { color: var(--primary-color); font-weight: 700; }

.theme-switcher { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #fff; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.hamburger, .mobile-nav { display: none; }

/* --- HEADER ICONS & CART --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}
.header-icon {
    color: var(--text-color);
    font-size: 1.15rem;
    transition: color var(--transition-speed);
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-icon:hover { color: var(--primary-color); }

.cart-icon .cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(255, 116, 38, 0.4);
}

/* --- HERO SECTION --- */
.hero {
    height: 70vh; min-height: 500px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    position: relative; overflow: hidden; padding: 0 2rem;
}
.hero-background-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,.7); z-index: -1; }
.hero-content { position: relative; z-index: 1; color: #fff; max-width: 800px; }
.hero h1 { font-size: 4rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: 1.3rem; margin-bottom: 2rem; opacity: .9; }

/* --- FOOTER --- */
.main-footer { background: var(--secondary-color); padding-top: 60px; color: var(--text-color); }
.footer-content { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 40px; }
.footer-about .logo { margin-bottom: 1rem; display: inline-block; }
.footer-about p { max-width: 300px; opacity: .8; }
.footer-links h4 { font-size: 1.1rem; margin-bottom: 1rem; font-weight: 600; color: var(--text-color); }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--text-color); opacity: .8; }
.footer-links a:hover { opacity: 1; }
.footer-bottom { text-align: center; padding: 20px 0; border-top: 1px solid rgba(128,128,128,.1); opacity: .7; }

/* --- BUTTONS & EDD OVERRIDES --- */
.btn, .edd-submit, .edd-add-to-cart {
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all var(--transition-speed) ease !important;
    border: 2px solid transparent !important;
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer; font-size: 16px;
    text-align: center;
    text-decoration: none;
}

/* We only apply flexbox to buttons that EDD hasn't hidden! */
.btn:not([style*="display: none"]):not([style*="display:none"]), 
.edd-submit:not([style*="display: none"]):not([style*="display:none"]), 
.edd-add-to-cart:not([style*="display: none"]):not([style*="display:none"]) {
    display: inline-flex;
    align-items: center; 
    justify-content: center;
}

.btn:hover, .edd-submit:hover, .edd-add-to-cart:hover {
    background-color: var(--accent-color) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,.2) !important;
    color: #fff !important;
}

/* Ensure the fallback button stays hidden when JavaScript is working */
.edd-js .edd-no-js {
    display: none !important;
}

/* EDD Product Grid */
.edd_downloads_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin: 0; padding: 0; }
.edd_download {
    background: var(--card-bg) !important;
    border-radius: 15px !important;
    padding: 25px !important;
    box-shadow: var(--shadow) !important;
    transition: all var(--transition-speed) ease !important;
    border: 1px solid hsla(0,0%,100%,.1) !important;
    display: flex; flex-direction: column;
    margin: 0 !important; width: 100% !important; float: none !important;
}
.edd_download:hover { transform: translateY(-5px) !important; }
.edd_download_image { margin-bottom: 20px; border-radius: 8px; overflow: hidden; }
.edd_download_image img { width: 100%; height: auto; display: block; }
.edd_download_title { font-size: 1.5rem !important; font-weight: 800 !important; margin-bottom: 10px !important; }
.edd_download_title a { color: var(--text-color); }
.edd_download_excerpt { color: var(--text-color); opacity: 0.8; margin-bottom: 20px; flex-grow: 1; }
.edd_price { font-size: 1.25rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; display: block; }
.edd_download_buy_button { margin-top: auto; }

/* Default Pages */
.store-content-area { padding: 150px 20px 80px; min-height: 60vh; }
.wp-block-cover { border-radius: 0px; min-height: 600px !important; }

/* --- SEARCH OVERLAY --- */
.search-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(18, 18, 27, 0.95);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-overlay .search-form { position: relative; width: 80%; max-width: 700px; display: flex; }
.search-overlay input {
    width: 100%; padding: 15px 60px 15px 10px; font-size: 2rem; font-weight: 800; font-family: var(--font-family);
    border: none; border-bottom: 3px solid var(--primary-color); background: transparent; color: #fff; outline: none;
}
.search-overlay input::placeholder { color: rgba(255,255,255,0.3); }
.search-overlay button[type="submit"] {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--primary-color); font-size: 2rem; cursor: pointer; transition: transform 0.2s;
}
.search-overlay button[type="submit"]:hover { transform: translateY(-50%) scale(1.1); }
.close-search {
    position: absolute; top: 40px; right: 50px; background: transparent; border: none; color: #fff;
    font-size: 2.5rem; cursor: pointer; transition: color 0.3s, transform 0.3s;
}
.close-search:hover { color: var(--primary-color); transform: scale(1.1); }

/* --- SEARCH PAGINATION --- */
.search-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; margin: 0 5px; border-radius: 8px;
    background: var(--nav-bg); color: var(--text-color); font-weight: 600;
    border: 1px solid hsla(0,0%,100%,.1); transition: all var(--transition-speed) ease;
}
.search-pagination .page-numbers:hover, .search-pagination .page-numbers.current {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
}

/* --- SUBMENU FIX (DROPDOWNS) --- */
.nav-links li { position: relative; }
.nav-links .sub-menu {
    position: absolute; top: 100%; left: 0; background: var(--nav-bg);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid hsla(0,0%,100%,.1); box-shadow: var(--shadow); border-radius: 12px;
    min-width: 220px; padding: 10px 0; margin: 0; list-style: none;
    opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s ease; z-index: 100;
    display: flex; flex-direction: column; gap: 0;
}
.nav-links li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(10px); }
.nav-links .sub-menu li { width: 100%; }
.nav-links .sub-menu a { display: block; padding: 10px 20px; font-size: 0.95rem; font-weight: 500; transition: all 0.2s ease; }
.nav-links .sub-menu a:hover { color: var(--primary-color); background: rgba(255,255,255,0.05); padding-left: 25px; }
.nav-links .menu-item-has-children > a::after { content: '\f0d7'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-left: 8px; font-size: 0.8rem; }


/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    .nav-links { display: none; }
    
    /* Keep Action Icons visible, hide Desktop Theme Switcher */
    .header-actions .theme-switcher { display: none; }
    
    /* Group elements nicely */
    .header-actions { gap: 14px; }
    .header-icon { font-size: 1.1rem; }
    .logo img { max-width: 130px; height: auto; }
    
    .hamburger { display: block; background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; padding-left: 5px; margin-left: 5px;}
    
    .mobile-nav {
        display: none; flex-direction: column; position: fixed; top: 90px; left: 20px; right: 20px;
        background: var(--nav-bg); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
        padding: 20px; border-radius: 15px; text-align: center; z-index: 999;
        border: 1px solid hsla(0,0%,100%,.18); box-shadow: var(--shadow);
    }
    .mobile-nav a { padding: 15px; color: var(--text-color); font-weight: 600; display: block; }
    
    .mobile-theme-switcher { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px 0; margin-top: 15px; border-top: 1px solid rgba(128,128,128,.2); }
    
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .section-title { font-size: 2.2rem; }

    /* Fix Mobile Submenus */
    .mobile-menu-wrap { list-style: none; padding: 0; margin: 0; width: 100%; }
    .mobile-menu-wrap li { width: 100%; }
    .mobile-menu-wrap .sub-menu {
        position: relative; 
        transform: none; 
        opacity: 1; 
        visibility: visible;
        background: rgba(0,0,0,0.03); 
        box-shadow: none; 
        border: none; 
        border-radius: 8px;
        padding: 5px 0; 
        margin: 5px 0 15px; 
        display: flex;
        flex-direction: column; /* FIX: This stacks them vertically! */
        gap: 0;
    }
    html.dark-mode .mobile-menu-wrap .sub-menu { background: rgba(255,255,255,0.05); }
    
    /* Make the submenu links look like a proper indented list */
    .mobile-menu-wrap .sub-menu a { 
        padding: 12px 20px 12px 30px; /* Adds indentation to the left */
        font-size: 0.9rem; 
        font-weight: 500; 
        display: block; 
        text-align: left; /* Aligns the text cleanly */
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    
    html.dark-mode .mobile-menu-wrap .sub-menu a {
        border-bottom: 1px solid rgba(255,255,255,0.03);
    }

    /* Remove the border from the last item so it looks clean */
    .mobile-menu-wrap .sub-menu li:last-child a {
        border-bottom: none;
    }

    .mobile-menu-wrap .menu-item-has-children > a::after { display: none; }
}

@media (max-width: 400px) {
    .main-nav { padding: 10px 15px; }
    .logo img { max-width: 150px; }
    .header-actions { gap: 14px; }
}

/* --- PRODUCT REVIEWS & STAR RATING --- */
.product-reviews-section {
    margin-top: 60px; padding-top: 50px; border-top: 1px solid hsla(0,0%,100%,.1);
}
html.light-mode .product-reviews-section { border-top: 1px solid rgba(0,0,0,0.1); }
.reviews-title { font-size: 2rem; font-weight: 800; margin-bottom: 30px; }
.reviews-container {
    background: var(--card-bg); padding: 40px; border-radius: 15px;
    box-shadow: var(--shadow); border: 1px solid hsla(0,0%,100%,.1);
}

/* Notice for Non-Purchasers */
.review-restriction-notice {
    background: rgba(255, 116, 38, 0.1);
    color: var(--primary-color);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 1.05rem;
    margin-top: 20px;
    display: flex; 
    align-items: flex-start; 
    gap: 12px;
    line-height: 1.5;
}
.review-restriction-notice i {
    margin-top: 4px; /* Aligns the icon perfectly with the first line of text */
    font-size: 1.1rem;
}
.review-restriction-notice a { 
    text-decoration: underline; 
    font-weight: 700;
}
.no-comments { display: none; } /* Hides default WP closed message */

/* Custom Interactive Star Rating Input */
.comment-rating-field { margin-bottom: 20px; }
.comment-rating-field label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.95rem; }
.star-rating-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating-input input { display: none; }
.star-rating-input label { color: rgba(128,128,128,0.3); font-size: 1.8rem; cursor: pointer; transition: color 0.2s; margin-right: 5px; display: inline-block; }
.star-rating-input input:checked ~ label, .star-rating-input label:hover, .star-rating-input label:hover ~ label { color: #ffb800; }

/* Displaying stars in the comment */
.comment-rating-display { color: #ffb800; font-size: 1rem; margin-bottom: 10px; }
.comment-rating-display .empty { color: rgba(128,128,128,0.3); }

/* --- CLEANED UP COMMENT LIST --- */
ol.commentlist { list-style: none; padding: 0; margin: 0; }
.commentlist li.comment { 
    margin-bottom: 30px; padding-bottom: 30px; 
    border-bottom: 1px solid hsla(0,0%,100%,.05); 
}
.commentlist li.comment:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
html.light-mode .commentlist li.comment { border-bottom: 1px solid rgba(0,0,0,0.05); }

/* Avatar on the left, Content on the right */
.comment-body { position: relative; padding-left: 65px; min-height: 50px; }
.comment-author img.avatar { 
    position: absolute; left: 0; top: 0; 
    border-radius: 50%; width: 50px; height: 50px; object-fit: cover; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.comment-author .fn { 
    font-weight: 800; font-size: 1.15rem; color: var(--text-color); 
    font-style: normal; display: block; margin-bottom: 2px;
}
.comment-author .says { display: none; } /* Hides the ugly WP "says:" */

.comment-meta { font-size: 0.85rem; opacity: 0.6; display: inline-block; margin-bottom: 5px; text-decoration: none; }
.comment-meta a { color: inherit; }

.comment-body p { margin: 0 0 15px 0; font-size: 1.05rem; line-height: 1.6; }

/* Reply Button */
.reply a { 
    font-size: 0.85rem; font-weight: 700; color: var(--primary-color); 
    text-transform: uppercase; letter-spacing: 0.5px;
}
.reply a:hover { color: var(--accent-color); }

/* Review Form Styling */
#respond { margin-top: 40px; }
#reply-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
    width: 100%; padding: 15px; border-radius: 8px; border: 1px solid hsla(0,0%,100%,.2);
    background: var(--nav-bg); color: var(--text-color); font-family: var(--font-family); margin-bottom: 20px; outline: none; transition: border 0.3s;
}
html.light-mode .comment-form input, html.light-mode .comment-form textarea { border: 1px solid rgba(0,0,0,0.1); }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary-color); }
.comment-form input[type="submit"] {
    background: var(--primary-color); color: #fff; border: none; padding: 12px 30px;
    border-radius: 50px; font-weight: 700; cursor: pointer; transition: background 0.3s;
}
.comment-form input[type="submit"]:hover { background: var(--accent-color); }

/* --- EDD CHECKOUT QUANTITY BOX --- */
.edd_cart_item_quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}
input.edd-item-quantity {
    width: 70px !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    border: 2px solid rgba(255, 116, 38, 0.3) !important;
    background: var(--nav-bg) !important;
    color: var(--text-color) !important;
    font-family: var(--font-family) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-align: center;
    transition: all var(--transition-speed) ease !important;
}
input.edd-item-quantity:focus {
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 10px rgba(255, 116, 38, 0.2) !important;
}

/* ========================================================
   EDD BLOCKS CHECKOUT & DISCOUNT FIX
======================================================== */

/* Fix: Prevent the discount field from disappearing on click */
#edd-discount-code-wrap {
    display: none; /* Initial state */
    width: 100%;
    margin-top: 15px;
}

/* Force display when EDD toggles it */
.edd-blocks-cart__discount #edd-discount-code-wrap[style*="display: block"],
.edd-blocks-cart__discount #edd-discount-code-wrap[style*="display: inline-block"] {
    display: flex !important;
    gap: 10px;
    align-items: center;
}

/* Style the Discount Input to match your theme */
#edd-discount {
    background: var(--nav-bg) !important;
    border: 1px solid hsla(0,0%,100%,.2) !important;
    color: var(--text-color) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    flex-grow: 1;
}

html.light-mode #edd-discount {
    border: 1px solid rgba(0,0,0,0.1) !important;
}

/* Fix for the Quantity Box (Increase Cart Volume) */
input.edd-item-quantity {
    width: 60px !important;
    padding: 5px !important;
    border-radius: 6px !important;
    border: 1px solid var(--primary-color) !important;
    background: var(--nav-bg) !important;
    color: var(--text-color) !important;
    text-align: center;
    font-weight: 700;
}

/* Style the "Enter a discount code" link/button */
.edd_discount_link {
    background: transparent !important;
    border: none !important;
    color: var(--primary-color) !important;
    text-decoration: underline !important;
    cursor: pointer;
    font-weight: 600;
    padding: 0 !important;
}

/* Ensure the Apply button stays visible and themed */
.edd-apply-discount {
    margin-top: 0 !important;
    padding: 10px 20px !important;
}

/* General Checkout Table cleanup for Dark Mode */
.edd-blocks-cart__row {
    border-bottom: 1px solid hsla(0,0%,100%,.1) !important;
}
html.light-mode .edd-blocks-cart__row {
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}


/* --- PREMIUM CHECKOUT UI/UX --- */
.edd-checkout { background-color: var(--background-color); }

#edd_checkout_form_wrap {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid hsla(0,0%,100%,.1);
    box-shadow: var(--shadow);
}

/* Item Cart Table */
.edd-blocks-cart { border: none !important; }
.edd-blocks-cart__row {
    padding: 20px 0 !important;
    border-bottom: 1px solid hsla(0,0%,100%,.05) !important;
}
.edd_cart_header_row { font-weight: 800; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; opacity: 0.6; }

.edd_checkout_cart_item_title { font-weight: 700; font-size: 1.1rem; }
.edd_cart_item_price { font-weight: 700; color: var(--primary-color); }

/* Payment Method Tabs */
#edd_payment_mode_select {
    border: none; padding: 0; margin: 30px 0;
    display: flex; gap: 15px;
}
#edd_payment_mode_select legend { 
    font-weight: 800; font-size: 1.2rem; margin-bottom: 15px; display: block; 
}
#edd-payment-mode-wrap { display: flex; gap: 10px; width: 100%; }

.edd-gateway-option {
    flex: 1;
    background: var(--nav-bg) !important;
    border: 1px solid hsla(0,0%,100%,.1) !important;
    padding: 15px !important;
    border-radius: 12px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.edd-gateway-option-selected {
    border-color: var(--primary-color) !important;
    background: rgba(255, 116, 38, 0.1) !important;
}
.edd-gateway-option input { display: none; } /* Hide the ugly radio button */

/* Manual Payment Box Styling */
.manual-payment-box {
    background: rgba(255, 116, 38, 0.03) !important;
    border: 1px solid rgba(255, 116, 38, 0.2) !important;
    padding: 30px !important;
    border-radius: 15px !important;
}

/* Purchase Button */
#edd-purchase-button {
    width: 100%;
    padding: 20px !important;
    font-size: 1.25rem !important;
    margin-top: 20px !important;
    border-radius: 12px !important;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #edd_checkout_form_wrap { padding: 20px; }
    #edd-payment-mode-wrap { flex-direction: column; }
}


/* --- NAIRA CONVERTER UI --- */
#naira-converter-wrap {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

#naira-total-display {
    color: #2ecc71 !important; /* Professional Money Green */
    text-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

html.light-mode #naira-converter-wrap {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

@media (max-width: 600px) {
    #naira-converter-wrap {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .naira-amount { text-align: center !important; }
}

/* --- RECEIPT DOWNLOAD BUTTON --- */
.edd_download_file_link {
    display: inline-block !important;
    background: var(--primary-color) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    margin-top: 10px !important;
    text-decoration: none !important;
    transition: transform 0.2s ease !important;
}

.edd_download_file_link:hover {
    transform: scale(1.05);
    background: var(--accent-color) !important;
}


/* ==========================================================================
   EDD RECEIPT PAGE UI/UX OVERHAUL
   ========================================================================== */

/* 1. Page Title & Success Message */
.store-content-area h1.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 15px !important;
}

/* Add a celebratory success message */
.wp-block-edd-receipt::before {
    content: "🎉 Thank you for your purchase!";
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2ecc71;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px dashed #e2e8f0;
}

/* 2. The Main Receipt Card */
.wp-block-edd-receipt {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    padding: 50px;
    max-width: 850px;
    margin: 0 auto 80px;
}

/* 3. Order Meta Data Grid */
.edd-blocks-receipt__totals {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background: #f8fafc;
    padding: 25px 30px !important;
    border-radius: 12px;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 50px !important;
}

.edd-blocks-receipt__totals .edd-blocks__row {
    display: flex;
    flex-direction: column;
    border: none !important;
    padding: 0 !important;
}

.edd-blocks-receipt__totals .edd-blocks__row-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 700;
}

.edd-blocks-receipt__totals .edd-blocks__row-value {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 800;
}

/* Status colors */
.edd_receipt_payment_status.complete { color: #10b981; }
.edd_receipt_payment_status.pending { color: #f59e0b; }

/* 4. Products Section */
.wp-block-edd-receipt h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.wp-block-edd-receipt h3::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: #e2e8f0;
    margin-left: 20px;
}

.edd-blocks-receipt__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 0 !important;
    border-top: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.edd-blocks-receipt__item-details .edd-blocks__row-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.edd-blocks-receipt__item-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

/* 5. Transform Download Link into a Button */
.edd_purchase_receipt_files {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.edd_download_file_link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #0ea5e9; /* Modern Blue */
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
}

.edd_download_file_link:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.edd_download_file_link::before {
    content: '\f019'; /* FontAwesome Download Icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Quantity Label Fix */
.edd-blocks-receipt__item-quantity {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 15px;
}

/* 6. Refine the Custom License Key Boxes */
.expert-license-box {
    background: #f0fdf4 !important; /* Softer green background */
    border-color: #bbf7d0 !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.05);
    transition: transform 0.2s ease;
}

.expert-license-box:hover {
    transform: translateY(-2px);
}

.expert-license-box input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.expert-license-box input:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .wp-block-edd-receipt {
        padding: 30px 20px;
    }
    .edd-blocks-receipt__totals {
        grid-template-columns: 1fr 1fr;
    }
    .edd-blocks-receipt__item {
        flex-direction: column;
    }
    .edd-blocks-receipt__item-price {
        margin-top: 15px;
    }
}