/*
Theme Name: AvidlÄ“ Lite
Theme URI: https://avidle.com/
Author: RandomlyJiva
Author URI: https://randomlyjiva.com
Description: Lightweight companion theme providing a stable visual shell for AvidlÄ“ Reader Core.
Version: 1.5.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: avidle-lite
*/

:root {
	--avidle-purple: #3C096C;
	--avidle-purple-dark: #3C096C;
	--avidle-lavender: #74777C;
	--avidle-bg: #74777C;
	--avidle-surface: #F5ECFE;
	--avidle-text: #74777C;
	--avidle-muted: #74777C;
	--avidle-border: #74777C;
	--avidle-focus: #A172FD;
	--avidle-radius: 16px;
	--avidle-content-width: 1180px;
}
html { box-sizing: border-box; overflow-x: hidden; }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
body:not(.avidle-public) { background: var(--avidle-bg); color: var(--avidle-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.65; }
body:not(.avidle-public) h1, body:not(.avidle-public) h2, body:not(.avidle-public) h3, body:not(.avidle-public) h4, body:not(.avidle-public) h5, body:not(.avidle-public) h6 { margin: 0 0 .55em; color: var(--avidle-text); font-family: Georgia, "Times New Roman", serif; line-height: 1.16; }
body:not(.avidle-public) h1 { font-size: clamp(2.25rem, 5vw, 4.6rem); }
body:not(.avidle-public) h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
body:not(.avidle-public) h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
body:not(.avidle-public) p, body:not(.avidle-public) ul, body:not(.avidle-public) ol { margin: 0 0 1.3em; }
body:not(.avidle-public) a { color: var(--avidle-purple-dark); text-decoration-thickness: .08em; text-underline-offset: .17em; }
body:not(.avidle-public) a:hover { color: var(--avidle-purple); }
.avidle-theme-skip-link { position: fixed; z-index: 100000; top: -100px; left: 16px; padding: 10px 15px; border-radius: 9px; background: var(--avidle-surface); color: var(--avidle-text); }
.avidle-theme-skip-link:focus { top: 12px; }
.avidle-theme-shell { width: min(var(--avidle-content-width), calc(100% - 40px)); margin-inline: auto; }
.avidle-theme-header { border-bottom: 1px solid var(--avidle-border); background: rgba(32,33,36,.94); backdrop-filter: blur(12px); }
.avidle-theme-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.avidle-theme-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--avidle-purple) !important; font: 700 1.65rem/1 Georgia, serif; text-decoration: none; }
.avidle-theme-brand img { max-height: 46px; width: auto; }
.avidle-theme-nav { display: flex; align-items: center; gap: 20px; }
.avidle-theme-nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; text-decoration: none; }
.avidle-account-placeholder { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 13px; border: 1px solid var(--avidle-border); border-radius: 8px; color: var(--avidle-muted); font-size: .82rem; }
.avidle-theme-main { min-height: 65vh; padding-block: clamp(35px, 6vw, 75px); }
.avidle-standard-content { padding: clamp(24px, 4vw, 52px); border: 1px solid var(--avidle-border); border-radius: var(--avidle-radius); background: var(--avidle-surface); box-shadow: 0 18px 48px rgba(32,33,36,.08); }
.avidle-entry + .avidle-entry { margin-top: 42px; padding-top: 42px; border-top: 1px solid var(--avidle-border); }
.avidle-entry__meta { color: var(--avidle-muted); font-size: .9rem; }
.avidle-entry__title a { color: inherit !important; text-decoration: none; }
.avidle-pagination { margin-top: 38px; }
body:not(.avidle-public) button, body:not(.avidle-public) input[type="button"], body:not(.avidle-public) input[type="submit"], body:not(.avidle-public) .button, body:not(.avidle-public) .wp-element-button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--avidle-purple); border-radius: 8px; background: var(--avidle-purple); color: #F5ECFE; font: inherit; font-weight: 750; cursor: pointer; }
body:not(.avidle-public) input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]), body:not(.avidle-public) select, body:not(.avidle-public) textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--avidle-border); border-radius: 10px; background: var(--avidle-surface); color: var(--avidle-text); font: inherit; }
body:not(.avidle-public) textarea { min-height: 130px; resize: vertical; }
body:not(.avidle-public) label { font-weight: 700; }
:where(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 3px solid var(--avidle-focus); outline-offset: 3px; }
.avidle-theme-footer { padding-block: 30px; border-top: 1px solid var(--avidle-border); background: var(--avidle-surface); color: var(--avidle-muted); }
.avidle-theme-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.avidle-theme-footer strong { color: var(--avidle-purple); font-family: Georgia, serif; font-size: 1.2rem; }
.avidle-theme-footer p { margin: 0; }
.woocommerce .woocommerce-notices-wrapper > *, .woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error { margin-bottom: 20px; padding: 16px 18px; border: 1px solid var(--avidle-border); border-top: 4px solid var(--avidle-purple); border-radius: 10px; background: var(--avidle-surface); color: var(--avidle-text); }
.woocommerce table.shop_table { width: 100%; border: 1px solid var(--avidle-border); border-collapse: collapse; background: var(--avidle-surface); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 13px; border-bottom: 1px solid var(--avidle-border); text-align: left; }
.woocommerce form .form-row { margin-bottom: 16px; }
.woocommerce .quantity .qty { width: 5.5rem !important; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { padding: 0; list-style: none; }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: 10px 12px; border-bottom: 1px solid var(--avidle-border); }

@media (max-width: 720px) { .avidle-theme-shell { width: min(var(--avidle-content-width), calc(100% - 24px)); } .avidle-theme-header__inner { min-height: 64px; flex-wrap: wrap; padding-block: 9px; } .avidle-theme-nav { gap: 10px; } .avidle-account-placeholder { display: none; } .avidle-standard-content { padding: 22px 17px; border-radius: 14px; } .avidle-theme-footer__inner { display: block; } .avidle-theme-footer p + p { margin-top: 5px; } .woocommerce table.shop_table { display: table; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { scroll-behavior: auto !important; } }
.avidle-theme-mobile-nav { display: none; }
@media (max-width: 720px) { body:not(.avidle-public) { padding-bottom: 80px; } .avidle-theme-nav a:not(:first-child) { display: none; } .avidle-theme-mobile-nav { position: fixed; z-index: 90; right: 8px; bottom: 8px; left: 8px; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px; border-radius: 17px; background: rgba(32,33,36,.96); box-shadow: 0 12px 38px rgba(32,33,36,.34); } .avidle-theme-mobile-nav a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #F5ECFE !important; font-size: .68rem; text-decoration: none; } }
/* Phase 4: standard WooCommerce pages, including block checkout. */
.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.woocommerce form select,.wc-block-components-text-input input{background:var(--avidle-surface);color:var(--avidle-text);border:1px solid #74777C;border-radius:6px;min-height:44px;padding:.7rem;max-width:100%}
.woocommerce form label,.woocommerce-checkout label{color:var(--avidle-text);line-height:1.5}.woocommerce-error,.woocommerce-info,.woocommerce-message{background:var(--avidle-surface);color:var(--avidle-text);line-height:1.6;padding:1.2rem 1.2rem 1.2rem 3rem}
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.wc-block-components-button{background:#74777C;color:#F5ECFE;border-radius:6px;min-height:44px;line-height:1.4;padding:.75rem 1rem;white-space:normal}
.woocommerce a.button:hover,.woocommerce button.button:hover{background:#74777C;color:#F5ECFE}.woocommerce :focus-visible,.wc-block-components-button:focus-visible{outline:3px solid #74777C;outline-offset:3px}
.woocommerce table.shop_table{border-collapse:collapse;width:100%;color:var(--avidle-text)}.woocommerce table.shop_table td,.woocommerce table.shop_table th{padding:.8rem;border-bottom:1px solid #74777C}.woocommerce-checkout #payment{background:var(--avidle-surface);color:var(--avidle-text)}.woocommerce-checkout #payment div.payment_box{background:var(--avidle-lavender);color:var(--avidle-text)}
.woocommerce-account .woocommerce-MyAccount-navigation a{display:block;padding:.7rem}.woocommerce-account .woocommerce-MyAccount-content{overflow-wrap:anywhere}.woocommerce .quantity .qty{min-height:44px}.woocommerce-order-overview{display:flex;flex-wrap:wrap;gap:1rem}.woocommerce-order-overview li{float:none!important}
@media(max-width:700px){.woocommerce .col2-set .col-1,.woocommerce .col2-set .col-2,.woocommerce-account .woocommerce-MyAccount-navigation,.woocommerce-account .woocommerce-MyAccount-content{width:100%;float:none}.woocommerce table.shop_table{font-size:.9rem}.woocommerce .coupon{display:flex;flex-wrap:wrap;gap:.5rem}.woocommerce ul.order_details li{margin:0;padding:.5rem;border:0}.wc-block-checkout,.wc-block-cart{padding-inline:.5rem}}

.woocommerce .woocommerce-notices-wrapper > *,.woocommerce .woocommerce-message,.woocommerce .woocommerce-info,.woocommerce .woocommerce-error{padding-left:3rem}
.select2-container--default .select2-selection--single,.select2-dropdown,.select2-search__field{background:var(--avidle-surface);color:var(--avidle-text)}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--avidle-text)}


body.woocommerce-checkout textarea{background:var(--avidle-surface);color:var(--avidle-text);border:1px solid var(--avidle-border);width:100%;padding:.7rem;min-height:130px}
@media(max-width:700px){.woocommerce table.shop_table_responsive tbody,.woocommerce table.shop_table_responsive tr{width:100%}.woocommerce table.shop_table_responsive td{min-height:48px}}

/* UI consolidation: use brand accents on neutral surfaces. */
:root{--avidle-brand-lavender:#A172FD;--avidle-link:#3C096C}
.avidle-theme-header{background:var(--avidle-surface)}
.avidle-theme-brand{max-width:min(320px,45%);line-height:1.15;overflow-wrap:anywhere;color:var(--avidle-link)!important}
.avidle-theme-brand img{max-height:48px;max-width:100%;object-fit:contain}
body:not(.avidle-public) a{color:var(--avidle-link)}
body:not(.avidle-public) :is(button,input[type=button],input[type=submit],.button,.wp-element-button){border-radius:8px}
body:not(.avidle-public) :is(.woocommerce,.wc-block-cart,.wc-block-checkout) :is(.button,.wc-block-components-button){background:#3C096C;color:#F5ECFE}
body:not(.avidle-public) :is(.woocommerce-message,.woocommerce-info,.woocommerce-error){border-radius:8px;background:var(--avidle-surface);color:var(--avidle-text)}
body:not(.avidle-public) .woocommerce form .form-row{margin-bottom:18px}
/* Match the generic input selector's specificity so its padding cannot mask the
   WooCommerce Blocks label/value slots. Native associations and validation stay intact. */
body:not(.avidle-public) .wc-block-components-text-input input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]){
 height:64px;min-height:64px;padding:27px 14px 9px;line-height:26px;font-size:16px;font-weight:400;
 border-radius:6px;background:var(--avidle-surface);color:var(--avidle-text);box-sizing:border-box;
}
body:not(.avidle-public) .wc-block-components-text-input.wc-block-components-text-input label,
body:not(.avidle-public) .wc-block-components-form .wc-block-components-text-input label{
 top:8px;left:14px;right:14px;max-width:calc(100% - 28px);margin:0;transform:none;transform-origin:top left;
 font-size:12px;font-weight:600;line-height:16px;color:var(--avidle-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;
}
body:not(.avidle-public) .wc-block-components-text-input input:is(:autofill,:-webkit-autofill){
 -webkit-text-fill-color:var(--avidle-text);caret-color:var(--avidle-text);box-shadow:inset 0 0 0 1000px var(--avidle-surface);
}
body:not(.avidle-public) .wc-block-components-text-input:focus-within{outline:2px solid var(--avidle-focus);outline-offset:3px;border-radius:6px}

@media(max-width:720px){.avidle-theme-brand{max-width:72%;font-size:1.4rem}.avidle-theme-header__inner{gap:16px}.avidle-standard-content{padding:24px 18px}}
/* WooCommerce Blocks country/state controls use the same two-line field layout. */
body:not(.avidle-public) .wc-blocks-components-select .wc-blocks-components-select__container{background:var(--avidle-surface);color:var(--avidle-text);height:64px;border-radius:6px}
body:not(.avidle-public) .wc-blocks-components-select .wc-blocks-components-select__select{height:64px;min-height:64px;padding:27px 38px 9px 14px;line-height:26px;background:var(--avidle-surface);color:var(--avidle-text);border:1px solid var(--avidle-border);border-radius:6px}
body:not(.avidle-public) .wc-blocks-components-select .wc-blocks-components-select__label{top:8px;left:14px;margin:0;font-size:12px;font-weight:600;line-height:16px;color:var(--avidle-muted);transform:none}
body:not(.avidle-public) .wc-blocks-components-select .wc-blocks-components-select__expand{fill:var(--avidle-text)}
body:not(.avidle-public) .wc-block-components-text-input input[aria-invalid=true]{border-color:#74777C}


/* Approved site palette. Reader reading themes remain independent. */
:root{--avidle-purple:#3C096C;--avidle-purple-dark:#3C096C;--avidle-brand-lavender:#A172FD;--avidle-action:#3C096C;--avidle-lavender:#F5ECFE;--avidle-text:#202124;--avidle-muted:#202124;--avidle-border:#74777C;--avidle-surface:#F5ECFE;--avidle-bg:#F5ECFE;--avidle-focus:#3C096C;--avidle-action-text:#F5ECFE;--avidle-link:#3C096C;color-scheme:light}
:root[data-site-mode=dark]{--avidle-purple:#A172FD;--avidle-purple-dark:#3C096C;--avidle-brand-lavender:#A172FD;--avidle-action:#A172FD;--avidle-lavender:#202124;--avidle-text:#F5ECFE;--avidle-muted:#F5ECFE;--avidle-border:#74777C;--avidle-surface:#202124;--avidle-bg:#202124;--avidle-focus:#A172FD;--avidle-action-text:#202124;--avidle-link:#A172FD;color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-site-mode]){--avidle-purple:#A172FD;--avidle-purple-dark:#3C096C;--avidle-brand-lavender:#A172FD;--avidle-action:#A172FD;--avidle-lavender:#202124;--avidle-text:#F5ECFE;--avidle-muted:#F5ECFE;--avidle-border:#74777C;--avidle-surface:#202124;--avidle-bg:#202124;--avidle-focus:#A172FD;--avidle-action-text:#202124;--avidle-link:#A172FD;color-scheme:dark}}
:root{--mode-bg:var(--avidle-surface);--mode-text:var(--avidle-text);--mode-border:#74777C;--mode-focus:var(--avidle-focus)}

.avidle-mode-toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;min-height:44px;padding:6px;border:1px solid var(--mode-border);border-radius:10px 0 10px 0;background:var(--mode-bg);color:var(--mode-text);font:24px/1 system-ui;cursor:pointer}
.avidle-mode-toggle[hidden]{display:none}
.avidle-mode-toggle:focus-visible{outline:3px solid var(--mode-focus);outline-offset:3px}
.avidle-mode-toggle:hover{box-shadow:inset 0 0 0 1px currentColor}

.avidle-theme-nav{margin-left:auto}
.avidle-theme-header,.avidle-theme-mobile-nav{background:var(--avidle-surface);border:1px solid var(--avidle-border)}
body:not(.avidle-public) .avidle-theme-mobile-nav a{color:var(--avidle-text)!important}
body:not(.avidle-public) :is(button,input[type=button],input[type=submit],.button,.wp-element-button),body:not(.avidle-public) :is(.woocommerce,.wc-block-cart,.wc-block-checkout) :is(.button,.wc-block-components-button){background:var(--avidle-action);color:var(--avidle-action-text);border-color:var(--avidle-action);border-radius:14px 0 14px 0}
body:not(.avidle-public) :is(.button,.wp-element-button,.wc-block-components-button):hover{background:var(--avidle-action);color:var(--avidle-action-text);text-decoration:underline}
body:not(.avidle-public) button.avidle-mode-toggle{padding:6px;background:var(--avidle-surface);color:var(--avidle-text);border:1px solid var(--avidle-border);font:24px/1 system-ui}
body:not(.avidle-public) :is(input,select,textarea){accent-color:var(--avidle-action)}
body:not(.avidle-public) :is(.woocommerce,.wc-block-cart,.wc-block-checkout) :focus-visible{outline-color:var(--avidle-focus)}
body:not(.avidle-public) :is(.wc-block-components-validation-error,.wc-block-components-notice-banner,.woocommerce-error,.woocommerce-info,.woocommerce-message){background:var(--avidle-surface);color:var(--avidle-text);border-color:var(--avidle-border)}
body:not(.avidle-public) .wc-block-components-text-input input[aria-invalid=true]{border-color:var(--avidle-text);border-width:2px}
body:not(.avidle-public) .wc-block-components-validation-error p{color:var(--avidle-text)}
body:not(.avidle-public) :is(input,textarea)::placeholder{color:var(--avidle-text);opacity:1}
body:not(.avidle-public) :is(.woocommerce-message,.woocommerce-info,.woocommerce-error)::before{color:var(--avidle-link)}
body:not(.avidle-public) .woocommerce a.remove{color:var(--avidle-link)!important}
body:not(.avidle-public) .woocommerce a.remove:hover{background:var(--avidle-action);color:var(--avidle-action-text)!important}
body:not(.avidle-public) .wc-block-components-notice-banner>svg{background:var(--avidle-action);fill:var(--avidle-action-text)}
body:not(.avidle-public) .wc-block-components-order-summary-item__quantity{background:var(--avidle-surface);color:var(--avidle-text);border:1px solid var(--avidle-border)}
@media(max-width:720px){.avidle-theme-brand{max-width:calc(100% - 155px)}.avidle-theme-header__inner{gap:12px;flex-wrap:nowrap}}

.avidle-theme-footer__inner{flex-wrap:wrap}.avidle-theme-footer__inner span{display:block}@media(max-width:720px){.avidle-theme-footer__inner{display:flex;flex-direction:column;align-items:flex-start;gap:12px}}
