/*
Theme Name: Canvas CLO
Theme URI: https://example.com
Description: A minimal, clean theme built to showcase the Canvas CLO Tools plugin. Removes sidebar and default chrome, providing a full-width canvas for the plugin's ledger-style interface.
Version: 1.0.0
Author: Ahmad
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: canvas-clo
*/

/* ===========================================================================================
   Canvas CLO Theme — Minimal, clean foundation for the Canvas CLO Tools plugin.

   This theme removes WordPress's default chrome (sidebars, default menus, theme headers) and
   provides a neutral, full-width canvas. All typography, color, and layout direction comes
   from the plugin's own app.css—this file only handles page structure and WordPress-specific
   resets that the plugin expects not to fight against.
   ============================================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Root & Basic Resets ---------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #26293A;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove WordPress admin bar margin from body if logged in */
body.admin-bar {
  padding-top: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  color: #1E2A44;
  letter-spacing: -0.01em;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: #8C6620;
  text-decoration: none;
  transition: color 0.12s ease;
}

a:hover {
  color: #A97D2A;
  text-decoration: underline;
}

/* ---- Container & Layout ----------------------------------------------------------------- */

.wp-site-blocks {
  display: block;
}

.wp-block-group,
.wp-block-columns {
  width: 100%;
}

/* ---- Main Content Area ------------------------------------------------------------------ */

main,
#main {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
}

.site-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

.entry-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ---- Hide Default WordPress Elements ---------------------------------------------------- */

/* Remove sidebar completely */
.sidebar,
.widget-area,
aside[role="complementary"],
.wp-sidebar {
  display: none !important;
}

/* Hide default navigation menus (plugin provides its own) */
.site-header nav,
nav.site-navigation,
.wp-block-navigation,
.navbar {
  display: none;
}

/* Hide default page/post titles—the plugin's own header takes precedence */
.page-header,
.post-header,
.entry-header .entry-title,
.wp-block-post-title {
  display: none;
}

/* Style site header with branding */
.site-header {
  background: #FFFFFF;
  border-bottom: 3px solid #A97D2A;
  padding: 20px 28px;
  margin-bottom: 28px;
}

.site-branding {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo {
  max-width: 60px;
  height: auto;
}

.site-title-wrap {
  flex: 1;
}

.site-title {
  margin: 0 0 4px;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  color: #1E2A44;
  letter-spacing: -0.01em;
}

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

.site-title a:hover {
  color: #A97D2A;
}

.site-tagline {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #6E6A5C;
  font-weight: 500;
}

/* Hide footer if it exists—plugin controls its own space */
footer,
.site-footer,
.wp-block-template-part.is-type-jumbotron {
  display: none;
}

/* ---- Content Blocks & Spacing ----------------------------------------------------------- */

.wp-block-group[data-align="full"] {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Page layout: full width, no sidebar interference */
body.page .site-main,
body.page main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Remove default post/page margins that WordPress adds */
.post,
.page,
article {
  margin: 0;
  padding: 0;
}

/* ---- Login/Admin Redirects -------------------------------------------------------------- */

body.logged-in {
  /* Ensure admin bar doesn't push content down */
  margin-top: 0;
}

html.wp-toolbar {
  padding-top: 0;
}

#wpadminbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 99999;
}

/* ---- Responsive & Mobile ---------------------------------------------------------------- */

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Utility Classes -------------------------------------------------------------------- */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
