/* ========================================
   GALICIA GEN GLOBAL UI SYSTEM (SCOPED)
   Safe for child theme
   Applies ONLY inside .gg-ui wrapper
   ======================================== */


/* ========================================
   CSS VARIABLES (brand tokens)
   ======================================== */

:root{
  --gg-primary: #4A2A1A;
  --gg-primary-dark: #3B2A22;
  --gg-accent: #A47C48;

  --gg-bg-main: #FAFAF8;
  --gg-bg-card: #FFFFFF;
  --gg-bg-soft: #F3F1EC;

  --gg-border: #E6E2DA;

  --gg-text-main: #1F1F1F;
  --gg-text-secondary: #6A6A6A;
}


/* ========================================
   PAGE FOUNDATION (ONLY GG PAGES)
   ======================================== */

.gg-ui{
  background: var(--gg-bg-main);
  color: var(--gg-text-main);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}


/* ========================================
   HEADINGS — FRAUNCES
   ======================================== */

.gg-ui h1,
.gg-ui h2,
.gg-ui h3,
.gg-ui h4{
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--gg-primary-dark);
}

.gg-ui h1{ font-size: 36px; }
.gg-ui h2{ font-size: 28px; }
.gg-ui h3{ font-size: 22px; }
.gg-ui h4{ font-size: 18px; }


/* ========================================
   LINKS
   ======================================== */

.gg-ui a{
  color: var(--gg-primary);
  text-decoration: none;
}

.gg-ui a:hover{
  color: var(--gg-accent);
  text-decoration: underline;
}


/* ========================================
   BUTTON SYSTEM
   ======================================== */

.gg-ui .gg-button{
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px;
  padding: 12px 20px;

  background: var(--gg-primary);
  color: #fff;

  border: none;
  border-radius: 6px;
  cursor: pointer;

  transition: background 0.15s ease;
}

.gg-ui .gg-button:hover{
  background: var(--gg-primary-dark);
  color: #fff;
}

.gg-ui .gg-button-secondary{
  background: transparent;
  border: 1px solid var(--gg-primary);
  color: var(--gg-primary);
}

.gg-ui .gg-button-secondary:hover{
  background: var(--gg-primary);
  color: #fff;
}


/* ========================================
   INPUT / FORM SYSTEM
   ======================================== */

.gg-ui input,
.gg-ui select,
.gg-ui textarea{
  font-family: 'Inter', sans-serif;
  font-size: 14px;

  padding: 8px 10px;
  border: 1px solid var(--gg-border);
  border-radius: 4px;
  background: #fff;

  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.gg-ui input:focus,
.gg-ui select:focus,
.gg-ui textarea:focus{
  outline: none;
  border-color: var(--gg-primary);
  box-shadow: 0 0 0 2px rgba(74,42,26,0.15);
}


/* ========================================
   CARD SYSTEM
   ======================================== */

.gg-ui .gg-card{
  background: var(--gg-bg-card);
  border: 1px solid var(--gg-border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}


/* ========================================
   TABLE SYSTEM
   ======================================== */

.gg-ui .gg-table{
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.gg-ui .gg-table th{
  background: var(--gg-bg-soft);
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--gg-primary-dark);

  padding: 8px;
  border: 1px solid var(--gg-border);
  text-align: left;
}

.gg-ui .gg-table td{
  padding: 7px;
  border: 1px solid var(--gg-border);
}

.gg-ui .gg-table tr:nth-child(even){
  background: var(--gg-bg-main);
}

.gg-ui .gg-table tr:hover{
  background: var(--gg-bg-soft);
}


/* ========================================
   PAGINATION
   ======================================== */

.gg-ui .gg-pagination a,
.gg-ui .gg-pagination span{
  display: inline-block;
  padding: 6px 10px;
  margin-right: 4px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.gg-ui .gg-pagination a{
  color: var(--gg-primary);
}

.gg-ui .gg-pagination a:hover{
  background: var(--gg-bg-soft);
}

.gg-ui .gg-pagination .active{
  background: var(--gg-primary);
  color: #fff;
}


/* ========================================
   FORM GRID LAYOUT
   ======================================== */

.gg-ui .gg-form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 30px;
  max-width: 900px;
}

@media (max-width: 700px){
  .gg-ui .gg-form-grid{
    grid-template-columns: 1fr;
  }
}


/* ========================================
   MUTED TEXT
   ======================================== */

.gg-ui .gg-muted{
  color: var(--gg-text-secondary);
}


/* ========================================
   PANEL SOFT (archive panels etc)
   ======================================== */

.gg-ui .gg-panel-soft{
  background: var(--gg-bg-soft);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--gg-border);
}


/* ========================================
   RESULTS FOOTER
   ======================================== */

.gg-ui .gg-results-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--gg-text-secondary);
}


/* ========================================
   LAST UPDATED
   ======================================== */

.gg-ui .gg-last-updated{
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--gg-border);
  font-size: 13px;
  color: var(--gg-text-secondary);
}