/* ===== Garagekramer App UI ===== */
.gk-app,
body.gk-app{
  /* Kramer rood */
  --brand-red: #aa1a2d;

  /* (optioneel) lichte UI achtergrondkleur voor elementen */
  --brand-bg: #f6f7fb;
  --text: #111318;

  /* Achtergrond: 3 verticale banen (rood / wit / rood) eerlijk verdeeld */
  background: linear-gradient(
    90deg,
    #aa1a2d 0%,
    #aa1a2d 33.3333%,
    #ffffff 33.3333%,
    #ffffff 66.6666%,
    #aa1a2d 66.6666%,
    #aa1a2d 100%
  ) fixed !important;

  color: var(--text);
  min-height: 100vh;
}

/* Verberg theme onderdelen alleen op GK pagina's */
body.gk-app header,
body.gk-app nav,
body.gk-app footer,
body.gk-app .site-footer,
body.gk-app .footer-widgets,
body.gk-app .wp-block-site-title,
body.gk-app .wp-block-navigation,
body.gk-app .wp-block-site-tagline{
  display: none !important;
}

/* Pagina titel weg binnen theme (alle bekende theme-varianten, ook blockthema's) */
body.gk-app .entry-title,
body.gk-app .wp-block-post-title,
body.gk-app .page-title,
body.gk-app .entry-header,
body.gk-app .page-header,
body.gk-app h1.has-x-large-font-size { display: none !important; }

/* Theme content vollebreedte, geen extra padding/marges rond de app */
body.gk-app .wp-site-blocks,
body.gk-app main,
body.gk-app .entry-content,
body.gk-app .wp-block-post-content {
  max-width: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ✅ Blocktheme "constrained layout" opheffen: die dwingt alle content in een smalle kolom */
body.gk-app .is-layout-constrained > *,
body.gk-app .entry-content > *,
body.gk-app .wp-block-post-content > *{
  max-width: none !important;
}

body.gk-app .gk-wrap{
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Container */
.gk-wrap{
  padding: 32px 16px;
}

.gk-card{
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  overflow: hidden;
}

/* ✅ Brede schermen (laptop/pc): kaart mag veel breder, tabellen passen dan zonder schuiven */
@media (min-width: 1280px){
  .gk-card{ max-width: min(1680px, 95vw); }
}

/* Login juist compact en gecentreerd */
body.gk-login-page .gk-card{ max-width: 640px !important; }

/* Topbar: logo links + titel midden + logo rechts */
.gk-topbar{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.gk-topbar__left{ justify-self: start; }
.gk-topbar__center{ justify-self: center; text-align: center; }
.gk-topbar__right{ justify-self: end; }

.gk-title{
  font-size: 18px;
  font-weight: 600;
}

.gk-logo{
  max-height: 64px;
  width: auto;
  display: block;
}

.gk-logo-placeholder{
  width: 140px;
  height: 40px;
  opacity: 0;
}

.gk-body{
  padding: 22px;
}

.gk-footer{
  padding: 14px 22px;
  border-top: 1px solid rgba(0,0,0,.08);
  font-size: 14px;
}

.gk-footer a{ color: var(--brand-red); text-decoration: none; }
.gk-footer a:hover{ text-decoration: underline; }

/* ===== Strakke typografie (onafhankelijk van theme) ===== */
.gk-card{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1d23;
}

.gk-body h2{
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  margin: 28px 0 14px !important;
  color: #1a1d23 !important;
}
.gk-body h2:first-of-type{ margin-top: 4px !important; }

.gk-body p{ margin: 0 0 12px; font-size: 15px; }
.gk-body hr{
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: 26px 0;
}

.gk-title{ font-size: 17px !important; font-weight: 700 !important; }

/* UI bits */
.gk-muted{ opacity: .75; font-size: 13px; line-height: 1.45; }

.gk-alert{
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 14px;
}
.gk-alert--ok{ background: rgba(0, 160, 0, .08); border: 1px solid rgba(0, 160, 0, .18); }
.gk-alert--error{ background: rgba(220, 0, 0, .08); border: 1px solid rgba(220, 0, 0, .18); }

.gk-nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Forms */
.gk-form label{
  display: block;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #3a3f47;
  margin: 0 0 6px !important;
}

.gk-form input,
.gk-form select,
.gk-form textarea{
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px !important;
  line-height: 1.4;
  color: #1a1d23;
  background: #fff;
  border: 1px solid rgba(0,0,0,.16);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.gk-form input::placeholder,
.gk-form textarea::placeholder{ color: #9aa0a8; }

.gk-form input:focus,
.gk-form select:focus,
.gk-form textarea:focus{
  border-color: var(--brand-red, #aa1a2d);
  box-shadow: 0 0 0 3px rgba(170,26,45,.12);
}

.gk-form textarea{ resize: vertical; min-height: 92px; }

.gk-form--grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start; /* ✅ velden lijnen bovenaan uit, geen overlap door hulpteksten */
}

.gk-form--grid > div{ min-width: 0; } /* ✅ voorkomt uitlopen buiten de kolom */

.gk-col-2{ grid-column: 1 / -1; }

/* Buttons */
.gk-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.gk-btn--primary{
  background: var(--brand-red);
  color: #fff;
}

.gk-btn--ghost{
  background: rgba(0,0,0,.06);
  color: #111;
}

.gk-btn--danger{
  background: rgba(220,0,0,.9);
  color: #fff;
}

.gk-btn--small{
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.08);
  color: #111;
}

.gk-btn:hover{ opacity: .92; }

/* Tables */
.gk-table-wrap{ overflow-x: auto; }

.gk-table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.gk-table th{
  font-size: 13px;
  font-weight: 700;
  color: #3a3f47;
  white-space: nowrap;
}

.gk-table th,
.gk-table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  text-align: left;
  vertical-align: top;
}

.gk-table tbody tr:hover{ background: rgba(0,0,0,.02); }

.gk-filters{
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0 14px;
}

/* ===== Fotosysteem ===== */
.gk-fotogrid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.gk-fotogrid img{
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  display: block;
  background: #f2f3f5;
}
.gk-fotogrid a:hover img{ box-shadow: 0 4px 14px rgba(0,0,0,.18); }

.gk-upload-row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Tabellen: minder/geen horizontaal scrollen ===== */
/* Desktop: tekst mag teruglopen, compactere cellen */
.gk-table th{ white-space: normal; }
.gk-table td{ white-space: normal; word-break: break-word; }

@media (min-width: 861px){
  .gk-table th,
  .gk-table td{ padding: 8px 8px; font-size: 13.5px; }
}

/* Mobiel: elke rij wordt een nette kaart, geen zijwaarts schuiven */
@media (max-width: 860px){
  .gk-table-wrap{ overflow-x: visible; }

  .gk-table thead{ display: none; }
  .gk-table,
  .gk-table tbody,
  .gk-table tr,
  .gk-table td{ display: block; width: 100%; box-sizing: border-box; }

  .gk-table tr{
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 4px 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
  }

  .gk-table td{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px dashed rgba(0,0,0,.07);
    text-align: right;
    font-size: 14px;
  }
  .gk-table td:last-child{ border-bottom: 0; }

  .gk-table td::before{
    content: attr(data-label);
    font-weight: 700;
    color: #3a3f47;
    text-align: left;
    flex: 0 0 auto;
  }
  .gk-table td:not([data-label])::before{ content: none; }
}

@media (max-width: 860px){
  .gk-topbar{ grid-template-columns: 1fr; }
  .gk-topbar__left, .gk-topbar__center, .gk-topbar__right{ justify-self: center; }
  .gk-form--grid{ grid-template-columns: 1fr; }
  .gk-filters{ grid-template-columns: 1fr; }
}