/*
Theme Name: Kids Music Games
Theme URI: https://example.com
Author: Your Company
Author URI: https://example.com
Description: Custom WordPress theme for Kids Music Games with Easy Digital Downloads integration. Minimal structure ready for HTML integration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kids-music-games
Tags: kids, music, games, education, e-commerce, easy-digital-downloads
*/

/* ==========================================================================
   Kids Music Games Theme - Base Styles
   Ready for your HTML developer's styles
   ========================================================================== */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header */
.site-header {
    background: #333;
    color: #fff;
    padding: 20px 0;
}

.site-header .site-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 24px;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    position: relative;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    display: block;
}

.main-navigation a:hover {
    background: #555;
}

/* Dropdown Submenu Styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
}

.main-navigation ul li:hover > ul {
    display: block;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    white-space: nowrap;
}

.main-navigation ul ul a:hover {
    background: #555;
}

/* Third level dropdown (if needed) */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
}

/* Dropdown indicator (arrow) */
.main-navigation .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 12px;
    margin-left: 5px;
}

.main-navigation ul ul .menu-item-has-children > a::after {
    content: ' ▸';
    float: right;
}

/* EDD Cart Link */
.edd-cart-link {
    margin-left: auto;
}

.edd-cart-link a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    background: #0073aa;
    border-radius: 4px;
    display: inline-block;
}

.edd-cart-link a:hover {
    background: #005a87;
}

.edd-cart-quantity,.headerNav .edd-cart-quantity {
    background: var(--surfaceBase);
    border-radius: 50%;
    color: var(--textLink);
    display: inline-grid;
    font-size: 11px;
    font-weight: 700;
    height: 18px;
    width: 18px;
    place-items: center;
    line-height: 1;
    margin: 0;
}

.headerNav .navLink--cart .navIconWrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.headerNav .navLink--cart .edd-cart-quantity {
    position: absolute;
    top: -8px;
    right: 0px;
    z-index: 1;
}

/* Profile Link */
.profile-link {
    margin-left: 20px;
    position: relative;
}

.profile-link a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    background: #00a32a;
    border-radius: 4px;
    display: inline-block;
}

.profile-link a:hover {
    background: #008a20;
}

.profile-icon {
    font-size: 16px;
    margin-right: 5px;
}

.profile-menu-toggle {
    background: #00a32a;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .35);
    border-radius: 0 4px 4px 0;
    color: #fff;
    cursor: pointer;
    margin-left: -9px;
    padding: 8px 9px;
}

.profile-link .profile-account-link {
    border-radius: 4px 0 0 4px;
    padding-right: 10px;
}

.profile-menu-panel {
    background: #fff;
    border: 2px solid #b8e5ff;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(20, 50, 80, .22);
    color: #333;
    min-width: 255px;
    padding: 18px;
    position: absolute;
    right: 0;
    text-align: center;
    top: calc(100% + 13px);
    z-index: 10000;
}

.profile-menu-panel[hidden] { display: none; }
.profile-menu-avatar { color: #8c8c8c; font-size: 54px; line-height: 1; margin-bottom: 8px; }
.profile-menu-panel strong { color: #34314d; display: block; font-size: 17px; }
.profile-link .profile-menu-account { background: none; color: #078bec; display: inline-block; font-size: 13px; padding: 3px; }
.profile-menu-panel dl { font-size: 12px; margin: 13px 0 0; text-align: left; }
.profile-menu-panel dl div { border-top: 1px solid #e8eef2; padding: 7px 0; }
.profile-menu-panel dt { color: #78818a; float: left; font-weight: 600; }
.profile-menu-panel dd { color: #30314d; margin-left: 82px; overflow-wrap: anywhere; }

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* Content */
.site-content {
    padding: 40px 0;
    min-height: 400px;
}

/* Customer account settings ------------------------------------------------ */
.site-content:has(.kmg-account-page) { padding-top: 0; }
.kmg-account-hero { background: linear-gradient(135deg, #0c91f0, #0784e7); color: #fff; padding: 52px 0 70px; }
.kmg-account-hero h1 { font-size: 42px; line-height: 1.1; margin: 0 0 5px; }
.kmg-account-hero p { font-weight: 600; line-height: 1.35; margin: 0; max-width: 390px; }
.kmg-account-content { min-height: 370px; padding-bottom: 50px; padding-top: 40px; }
.kmg-account-actions { margin: 0 auto; max-width: 800px; }
.kmg-account-action { align-items: center; background: #eef8ff; border: 0; border-bottom: 3px solid #a9dfff; border-radius: 20px; color: #34314d; cursor: pointer; display: grid; font: inherit; gap: 16px; grid-template-columns: 42px minmax(0, 1fr) auto; margin: 15px 0; padding: 16px 30px; text-align: left; text-decoration: none; width: 100%; }
.kmg-account-action:hover { background: #e1f3ff; color: #078bec; }
.kmg-account-action > span:first-child { color: #777; font-size: 31px; text-align: center; }
.kmg-account-action strong, .kmg-account-action small { display: block; }
.kmg-account-action small { color: #71808c; font-size: 13px; line-height: 1.25; margin-top: 3px; }
.kmg-account-action b { font-size: 38px; font-weight: 400; line-height: .6; }
.kmg-account-card { background: #eef8ff; border-bottom: 3px solid #a9dfff; border-radius: 20px; margin: 0 auto; max-width: 420px; padding: 32px; }
.kmg-account-card h2 { color: #078bec; font-size: 22px; margin: 0 0 20px; }
.kmg-account-card label { color: #34314d; display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.kmg-account-card p { margin: 0 0 16px; }
.kmg-account-card input { border: 1px solid #b9c2c9; border-radius: 999px; font: inherit; padding: 9px 14px; width: 100%; }
.kmg-account-card input:focus { border-color: #078bec; outline: 2px solid rgba(7, 139, 236, .15); }
.kmg-account-card input:disabled { background: #f5f7f8; color: #687580; }
.kmg-account-card small { color: #6d7780; display: block; font-size: 11px; margin-top: 4px; }
.kmg-account-button, .kmg-account-cancel { background: #078bec; border: 0; border-radius: 999px; color: #fff; cursor: pointer; display: block; font-weight: 700; padding: 11px 18px; text-align: center; text-decoration: none; width: 100%; }
a.kmg-account-button{
    font-size: var(--textButtonMedium);
    text-decoration: none !important;
    font-family: var(--secondary-font);
}
.kmg-account-cancel { background: #fff; border: 1px solid #078bec; color: #078bec; margin-top: 10px; }
.kmg-password-rules {border-radius: 10px; color: #34314d; font-size: 12px; margin: 18px 0; padding: 13px 16px; }
.kmg-password-rules ul { margin: 7px 0 0 18px; }
.kmg-password-rules li { margin: 3px 0; }
.kmg-password-rules li::marker { color: #75838d; }
.kmg-password-rules li.is-valid { color: #208a43; }
.kmg-password-rules li.is-valid::marker { color: #20a34a; }
.kmg-account-notice { border-radius: 8px; margin: 0 auto 20px; max-width: 650px; padding: 12px 16px; }
.kmg-account-notice-success { background: #e5f7e9; color: #176a30; }
.kmg-account-notice-error { background: #fff0f0; color: #ad2020; }
.kmg-logout-modal { align-items: center; background: rgba(20, 33, 50, .55); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 10001; }
.kmg-logout-modal[hidden] { display: none; }
.kmg-logout-dialog { background: #f1f9ff; border-bottom: 3px solid #a9dfff; border-radius: 20px; max-width: 420px; padding: 30px; text-align: center; width: 100%; }
.kmg-logout-icon { background: #cceaff; border-radius: 50%; display: grid; height: 100px; margin: 0 auto 18px; place-items: center; width: 100px; }
.kmg-logout-icon img { display: block; height: 56px; object-fit: contain; width: 56px; }
.kmg-logout-dialog h2 { color: #34314d; font-size: 21px; margin: 0 0 7px; }
.kmg-logout-dialog p { color: #687580; font-size: 14px; margin: 0 0 22px; }
.kmg-logout-dialog > div:last-child { display: flex; gap: 12px; }
.kmg-logout-dialog .kmg-account-button, .kmg-logout-cancel { flex: 1; margin: 0; }
.kmg-logout-cancel { background: #fff; border: 1px solid #078bec; border-radius: 999px; color: #078bec; cursor: pointer; font: inherit; padding: 10px; }

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px 0;
    margin-top: 60px;
    border-top: 4px solid #3498db;
}

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

.footer-content {
    text-align: center;
    margin-bottom: 20px;
}

.footer-content p {
    margin: 10px 0;
    font-size: 14px;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
    padding: 0;
    flex-wrap: wrap;
}

.footer-navigation a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: #fff;
}

/* Easy Digital Downloads Support */
.edd_downloads_list {
    display: grid;
    /* Fallback responsive sizing; the column modifier classes below
       take precedence and honor the actual requested column count */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
    list-style: none;
    padding: 0;
}

.edd_downloads_list.edd_download_columns_1 {
    grid-template-columns: repeat(1, 1fr);
}

.edd_downloads_list.edd_download_columns_2 {
    grid-template-columns: repeat(2, 1fr);
}

.edd_downloads_list.edd_download_columns_3 {
    grid-template-columns: repeat(3, 1fr);
}

.edd_downloads_list.edd_download_columns_4 {
    grid-template-columns: repeat(4, 1fr);
}

.edd_downloads_list.edd_download_columns_5 {
    grid-template-columns: repeat(5, 1fr);
}

.edd_download {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.edd_download:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Product hover actions: temporary theme implementation until final design. */
.kmg-product-overlay {
    align-items: center;
    background: rgba(38, 40, 43, .88);
    border-radius: 8px;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 24px;
    pointer-events: none;
    position: absolute;
    transition: opacity .2s ease;
    z-index: 5;
}

.edd_download:hover .kmg-product-overlay,
.edd_download:focus-within .kmg-product-overlay {
    opacity: 1;
    pointer-events: auto;
}

.kmg-product-overlay-inner { max-width: 265px; text-align: center; width: 100%; }
.kmg-overlay-price { color: #fff; display: block; font-size: 28px; margin-bottom: 14px; }
.kmg-overlay-button,
.kmg-product-overlay .edd-submit.button {
    background: #078bec;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: block;
    font: inherit;
    font-weight: 700;
    margin: 10px 0;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    width: 100%;
}
.kmg-product-overlay .edd_purchase_submit_wrapper { margin: 0; }
.kmg-product-overlay .edd-no-js { display: none !important; }
.kmg-product-overlay .edd-submit.button { background: #f653a8; }
.kmg-overlay-owned { background: #4f9d63; }
.kmg-overlay-button:hover { background: #006fc4; color: #fff; }
.kmg-product-overlay .edd-submit.button:hover { background: #d93d8e; }
.kmg-overlay-button.is-disabled { background: #78828a; cursor: not-allowed; opacity: .75; }

/* Tell a Friend modal */
.kmg-share-modal { align-items: center; background: rgba(22, 30, 39, .62); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 10002; }
.kmg-share-modal[hidden] { display: none; }
.kmg-share-dialog { background: #eef8ff; border-bottom: 5px solid #87c9ee; border-radius: 20px; box-shadow: 0 18px 44px rgba(0,0,0,.28); max-height: calc(100vh - 40px); max-width: 660px; overflow-y: auto; padding: 38px 60px; position: relative; width: 100%; }
.kmg-share-dialog h2 { color: #086fe5; font-size: 32px; margin: 0 0 16px; }
.kmg-share-intro { color: #373149; font-weight: 600; line-height: 1.45; }
.kmg-share-intro p { margin: 9px 0; }
.kmg-share-dialog form { margin-top: 20px; }
.kmg-share-dialog label { color: #34314d; display: block; font-weight: 700; margin-bottom: 5px; }
.kmg-share-dialog input, .kmg-share-dialog textarea { border: 1px solid #b7c4cc; border-radius: 8px; font: inherit; padding: 9px 11px; width: 100%; }
.kmg-share-dialog textarea { resize: vertical; }
.kmg-share-dialog form > p { margin: 12px 0; }
.kmg-share-send { background: #078bec; border: 0; border-radius: 999px; color: #fff; cursor: pointer; font: inherit; font-weight: 700; padding: 11px 22px; width: 100%; }
.kmg-share-close { background: transparent; border: 0; color: #34314d; cursor: pointer; font-size: 30px; line-height: 1; position: absolute; right: 18px; top: 14px; }
.kmg-share-status { font-weight: 700; min-height: 1.5em; }
.kmg-share-status.is-error { color: #aa2020; }
.kmg-share-status.is-success { color: #16743a; }
.kmg-share-honeypot { height: 0; left: -10000px; overflow: hidden; position: absolute; width: 0; }

/* Tell a Friend result modal */
.kmg-share-toast { background: #16743a; border-radius: 10px; bottom: 24px; box-shadow: 0 8px 24px rgba(22, 30, 39, .24); color: #fff; font-weight: 700; left: 50%; max-width: calc(100% - 40px); padding: 14px 22px; position: fixed; text-align: center; transform: translateX(-50%); z-index: 10003; }
.kmg-share-toast.is-error { background: #aa2020; }
.kmg-share-toast[hidden] { display: none; }

/* Fixed-ratio image container so portrait box art and landscape
   screenshots display consistently instead of skewing card heights */
.edd_download_image {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 5px;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
}

.edd_download_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.edd_download_title {
    font-size: 18px;
    margin: 10px 0;
    color: #333;
}

.edd_download_title a {
    color: #333;
    text-decoration: none;
}

.edd_download_title a:hover {
    color: #0073aa;
}

.edd_download_excerpt {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    line-height: 1.5;
    /* Absorbs leftover space so price/button sit at a consistent
       baseline whether the excerpt is short, long, or empty */
    flex-grow: 1;
}

/* .edd_price {
    font-size: 22px;
    font-weight: bold;
    color: #0073aa;
    margin: 15px 0;
    display: block;
} */

.edd-add-to-cart {
    margin-top: auto;
    padding-top: 15px;
}

.edd-submit.button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.edd-submit.button:hover {
    background: #005a87;
}

/* Cart review page ------------------------------------------------------- */
.site-content:has(.kmg-cart-page) {
    padding-top: 0;
}

.kmg-cart-hero {
    background: linear-gradient(135deg, #087de8, #12a4f4);
    color: #fff;
    padding: 55px 0 70px;
}

.kmg-cart-hero h1 {
    margin: 0 0 5px;
    font-size: 42px;
    line-height: 1.15;
}

.kmg-cart-hero p {
    margin: 0;
    max-width: 290px;
    font-weight: 600;
}

.kmg-cart-container {
    padding-top: 42px;
    padding-bottom: 20px;
}

.kmg-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr);
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
}

.kmg-cart-panel,
.kmg-cart-empty {
    background: #f0f8ff;
    border: 1px solid #cce8fb;
    border-bottom: 3px solid #8fd7ff;
    border-radius: 20px;
    padding: 28px;
}

.kmg-cart-panel h2,
.kmg-cart-empty h2 {
    color: #30314d;
    font-size: 23px;
    margin: 0 0 20px;
}

.kmg-cart-item {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #c8dce9;
}

.kmg-cart-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.kmg-cart-item-image {
    width: 78px;
    height: 78px;
    overflow: hidden;
    background: #dbeef9;
    display: grid;
    place-items: center;
    border-radius: 6px;
    font-size: 30px;
}

.kmg-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kmg-cart-item h3 {
    color: #30314d;
    font-size: 16px;
    line-height: 1.25;
    margin: 2px 0 6px;
}

.kmg-cart-item p,
.kmg-cart-note {
    color: #607080;
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 9px;
}

.kmg-cart-remove,
.kmg-cart-back-link {
    color: #e34c5c;
    font-size: 13px;
    text-decoration: none;
}

.kmg-cart-back-link {
    color: #087de8;
    display: inline-block;
    margin-top: 22px;
}

.kmg-cart-item-price {
    color: #30314d;
    font-weight: 700;
    white-space: nowrap;
}

.kmg-summary-lines > div,
.kmg-summary-total {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.kmg-summary-lines > div {
    color: #526170;
    font-size: 14px;
    margin: 10px 0;
}

.kmg-summary-total {
    border-top: 1px solid #b7cedd;
    color: #30314d;
    margin-top: 26px;
    padding-top: 18px;
}

.kmg-summary-total strong {
    color: #087de8;
}

.kmg-cart-button {
    display: block;
    width: 100%;
    background: #078bec;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    margin-top: 26px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
}

.kmg-cart-button:hover {
    background: #006fc4;
    color: #fff;
}

.kmg-cart-empty {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.kmg-cart-empty .kmg-cart-button {
    margin: 20px auto 0;
    max-width: 260px;
}

/* Products Page Title */
.page-title,
.entry-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
    font-weight: bold;
}

/* User Profile Dashboard */
.user-profile-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.profile-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.profile-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Purchases List */
.purchase-item {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.purchase-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.purchase-status.complete,
.purchase-status.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.purchase-product {
    padding: 10px 0;
}

.view-order-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.view-order-button:hover {
    background: #005a87;
}

/* License Keys */
.license-item {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background: #f9f9f9;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.license-header h3 {
    margin: 0;
    font-size: 18px;
}

.license-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.license-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.license-key-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
}

.license-key {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    letter-spacing: 1px;
    flex-grow: 1;
}

.copy-license-btn {
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-license-btn:hover {
    background: #005a87;
}

.license-activation-info {
    margin: 15px 0;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 3px;
}

.license-activation-info p {
    margin: 5px 0;
}

.not-activated {
    color: #999;
    font-style: italic;
}

.license-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Account Actions */
.account-actions {
    text-align: center;
}

.logout-button {
    display: inline-block;
    padding: 10px 30px;
    background: #d32f2f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.logout-button:hover {
    background: #c62828;
}

/* Login/Register Forms */
.login-register-forms {
    max-width: 500px;
    margin: 40px auto;
}

.auth-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
}

.auth-tab.active {
    background: #0073aa;
    color: #fff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.auth-form input[type="submit"],
.auth-form .button {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.auth-form input[type="submit"]:hover,
.auth-form .button:hover {
    background: #005a87;
}

.lost-password,
.note {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.kmg-auth-notice {
    background: #fff0f0;
    border-radius: 4px;
    color: #ad2020;
    font-size: 14px;
    margin: 0 0 18px;
    padding: 10px 12px;
}

.no-purchases,
.no-licenses {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.browse-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
}


/* Responsive */
@media (max-width: 900px) {
    .edd_downloads_list.edd_download_columns_3,
    .edd_downloads_list.edd_download_columns_4,
    .edd_downloads_list.edd_download_columns_5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header .site-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-navigation {
        flex-direction: column;
        width: 100%;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .main-navigation ul ul {
        position: static;
        display: none;
        box-shadow: none;
        background: #444;
        padding-left: 20px;
    }
    
    .main-navigation ul li:hover > ul,
    .main-navigation ul li.focus > ul {
        display: block;
    }
    
    .edd-cart-link {
        margin-left: 0;
        text-align: center;
    }

    .kmg-cart-hero {
        padding: 40px 0 50px;
    }

    .kmg-cart-hero h1 {
        font-size: 34px;
    }

    .kmg-cart-layout {
        grid-template-columns: 1fr;
    }
    
    /* Products Grid - Mobile */
    .edd_downloads_list,
    .edd_downloads_list.edd_download_columns_1,
    .edd_downloads_list.edd_download_columns_2,
    .edd_downloads_list.edd_download_columns_3,
    .edd_downloads_list.edd_download_columns_4,
    .edd_downloads_list.edd_download_columns_5 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Footer - Mobile */
    .footer-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .page-title,
    .entry-title {
        font-size: 24px;
    }
    
    /* .edd_price {
        font-size: 18px;
    } */

    .kmg-cart-panel {
        border-radius: 14px;
        padding: 20px;
    }

    .kmg-cart-item {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 12px;
    }

    .kmg-cart-item-image {
        height: 60px;
        width: 60px;
    }

    .kmg-cart-item-price {
        grid-column: 2;
    }
}

/* ==========================================================================
   WEB GAME PLAY BUTTON STYLES
   ========================================================================== */

/* Play Game Button - Primary Style */
.kmg-play-game-button {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Small Button Variant */
.kmg-btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

/* Download Button */
.kmg-download-button {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kmg-download-button.kmg-btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

.kmg-play-game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.kmg-play-game-button:hover::before {
    left: 100%;
}

.kmg-play-game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white !important;
}

.kmg-download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.6);
    color: white !important;
}

.kmg-play-game-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.kmg-download-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(17, 153, 142, 0.4);
}

/* Purchased Actions Container */
.kmg-purchased-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.purchase-product-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.product-download-files {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Purchased Badge */
.purchased-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}

/* Profile Page - Purchase Product Styling */
.purchase-product {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
}

.purchase-product-thumb {
    flex-shrink: 0;
}

.purchase-product-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.purchase-product-info {
    flex: 1;
}

.purchase-product-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.purchase-product-info .purchase-price {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.purchase-product-info .kmg-play-game-button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 14px;
}

/* Product Archive - Buttons in Grid */
.edd_download_buy_button .kmg-play-game-button,
.edd_download_buy_button .kmg-download-button {
    flex: 1;
    min-width: 120px;
}

.edd_download_buy_button .kmg-purchased-actions {
    width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .kmg-play-game-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .kmg-download-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .kmg-btn-small {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .purchase-product {
        flex-direction: column;
        text-align: center;
    }
    
    .purchase-product-thumb {
        margin: 0 auto;
    }
    
    .purchase-product-actions,
    .kmg-purchased-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .purchase-product-actions a,
    .kmg-purchased-actions a {
        width: 100%;
    }
}

/* Loading Animation for Game Button */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.kmg-play-game-button.loading {
    animation: pulse 1.5s ease-in-out infinite;
    pointer-events: none;
}

/* Game Access Denied Message */
.kmg-game-access-denied {
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
    margin: 15px 0;
}

.kmg-game-access-denied strong {
    display: block;
    margin-bottom: 5px;
}

/* ==========================================================================
   SINGLE PRODUCT PAGE STYLES
   ========================================================================== */

.single-download {
    margin-bottom: 40px;
}

.single-download .entry-header {
    margin-bottom: 30px;
}

.single-download .entry-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.download-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.download-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.download-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-price h2 {
    color: #0073aa;
    font-size: 36px;
    margin: 0;
}

.download-purchase-area {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.purchased-notice {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
    margin-bottom: 20px;
    font-weight: bold;
}

.purchased-actions-single {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.purchased-actions-single .kmg-play-game-button,
.purchased-actions-single .kmg-download-button {
    width: 100%;
    text-align: center;
    padding: 15px 30px;
    font-size: 18px;
}

.download-files-info {
    margin: 30px 0;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.download-files-info h3 {
    margin-top: 0;
    color: #0073aa;
}

.download-files-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.download-files-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

.download-files-list li:last-child {
    border-bottom: none;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.download-categories,
.download-tags {
    margin-bottom: 10px;
    line-height: 1.8;
}

.download-categories a,
.download-tags a {
    color: #0073aa;
    text-decoration: none;
    padding: 3px 8px;
    background: #e7f3ff;
    border-radius: 3px;
    margin-right: 5px;
}

.download-categories a:hover,
.download-tags a:hover {
    background: #0073aa;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .download-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .single-download .entry-title {
        font-size: 24px;
    }
    
    .download-price h2 {
        font-size: 28px;
    }
    
    .purchased-actions-single .kmg-play-game-button,
    .purchased-actions-single .kmg-download-button {
        padding: 12px 24px;
        font-size: 16px;
    }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 60px;
}

/* Footer Widgets - 2 Columns */
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column h3,
.footer-widget-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: bold;
}

.footer-column p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-column a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #fff;
}

/* Read More Link */
.footer-column .read-more-link {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-column .read-more-link:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-column .read-more-link::after {
    content: ' →';
}

/* Quick Links Menu */
.footer-quick-links,
.footer-quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-quick-links li {
    margin-bottom: 10px;
}

.footer-quick-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.footer-quick-links a:hover {
    color: #3498db;
    padding-left: 5px;
}

/* Footer Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
}

.site-info {
    flex: 1;
}

.site-info p {
    margin: 0;
    color: #bdc3c7;
}

.footer-bottom-navigation {
    flex: 1;
    text-align: right;
}

.footer-bottom-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-bottom-menu li {
    display: inline-block;
}

.footer-bottom-menu a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom-menu a:hover {
    color: #3498db;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 20px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-navigation {
        text-align: center;
    }
    
    .footer-bottom-menu {
        justify-content: center;
    }
}

/* ==========================================================================
   Custom Add to Cart Form Styling
   ========================================================================== */

/* Make the form inline and remove default form styling */
.edd_download_purchase_form.kmg-inline-form {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* Style the button to match other primary buttons */
.edd_download_purchase_form.kmg-inline-form .btn.btn-primary {
    width: auto !important;
    display: inline-block !important;
    margin: 0 !important;
}

/* Ensure no form styling interferes */
.gameOverview form.edd_download_purchase_form {
    display: inline-block;
    margin: 0;
    vertical-align: top;
}

/* Sampler fallback popup for downloads without a configured sampler URL. */
.kmg-sampler-coming-soon-modal .kmg-sampler-coming-soon-dialog {
    max-width: 420px;
    padding: 32px 42px;
    text-align: center;
}

.kmg-sampler-coming-soon-modal .kmg-sampler-coming-soon-message {
    font-size: 18px;
    margin: 0 0 22px;
}

.kmg-sampler-coming-soon-modal .kmg-sampler-coming-soon-close.btn {
    display: flex;
    margin: 0 auto;
    width: fit-content;
}