:root{
  --km-dark:#3f455f;
  --km-main:#4b526f;
  --km-soft:#949bb7;
  --km-bg1:#d8dceb;
  --km-bg2:#c7ccdf;
  --km-white:rgba(255,255,255,.32);
  --km-border:rgba(75,82,111,.16);
  --km-danger:#8b4f59;
}

*{
  box-sizing:border-box;
}

html{
  min-height:100%;
}

body{
  min-height:100vh;
  margin:0;
  padding:34px 18px 60px;

  font-family:'Jura',sans-serif;
  color:var(--km-main);

  background:
    linear-gradient(
      rgba(62,65,71,.47),
      rgba(62,65,71,.47)
    ),
    url("https://api.krakkemat.be/media/algemeen/krakkemat-achtergrond.jpg")
    center center / cover fixed no-repeat;

  background-color:#3e4147;
}

button,
input,
select{
  font:inherit;
}

button{
  -webkit-tap-highlight-color:transparent;
}


/* ==================================================
   HOOFDLAYOUT
================================================== */

.km-blog-admin{
  width:100%;
  max-width:1080px;
  margin:0 auto;
}

/* ==================================================
   HEADER
================================================== */

.km-admin-head{
  position:relative;

  margin-bottom:28px;
  padding:28px 28px 30px;

  text-align:center;

  border:1px solid rgba(75,82,111,.10);
  border-radius:22px;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255,255,255,.55),
      transparent 48%
    ),
    linear-gradient(
      135deg,
      rgba(216,220,235,.78),
      rgba(199,204,223,.72)
    );

  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.55),
    0 10px 24px rgba(63,69,95,.08);
}

.km-back-link{
  position:absolute;

  top:22px;
  left:22px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:42px;

  padding:0 18px;

  border:1px solid rgba(75,82,111,.16);
  border-radius:999px;

  font-size:14px;
  font-weight:700;

  color:var(--km-main);

  text-decoration:none;

  background:rgba(255,255,255,.30);

  transition:
    background .15s ease,
    transform .15s ease;
}

.km-back-link:hover{
  background:rgba(255,255,255,.48);
  transform:translateY(-1px);
}

.km-admin-brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin:0 0 10px;

  text-decoration:none;
}

.km-admin-logo{
  display:block;

  width:72px;
  height:72px;

  object-fit:contain;

  opacity:.94;

  transition:
    transform .15s ease,
    opacity .15s ease;
}

.km-admin-brand:hover .km-admin-logo{
  transform:translateY(-1px);
  opacity:1;
}

.km-admin-head h1{
  margin:0;

  font-size:34px;
  line-height:1.1;

  font-weight:700;
  letter-spacing:.05em;

  color:var(--km-dark);
}

.km-admin-head p{
  margin:10px 0 0;

  font-size:14px;
  line-height:1.5;

  font-weight:500;

  color:var(--km-main);
}

.km-admin-divider{
  width:130px;
  height:1px;

  margin:20px auto 0;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(75,82,111,.30),
      transparent
    );
}
/* ==================================================
   PANELEN
================================================== */

.km-panel{
  margin-bottom:26px;
  padding:26px;
  border-radius:24px;
  background:linear-gradient(135deg,var(--km-bg1),var(--km-bg2));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    0 16px 36px rgba(63,69,95,.10);
}

.km-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.km-panel-head h2{
  margin:0;
  font-size:21px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--km-dark);
}

.km-panel-description{
  margin:6px 0 0;
  font-size:14px;
}

.km-subsection{
  margin-top:20px;
  padding:22px;
  border-radius:17px;
  background:rgba(255,255,255,.22);
  border:1px solid var(--km-border);
}

.km-subsection:first-child{
  margin-top:0;
}

.km-subsection h3{
  margin:0 0 17px;
  font-size:18px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--km-main);
}

.km-help{
  margin:-7px 0 18px;
  font-size:13px;
  line-height:1.5;
  opacity:.82;
}


/* ==================================================
   FORMULIER
================================================== */

.km-title-date-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 190px;
  gap:14px;
  margin-bottom:14px;
}

.km-publish-field{
  max-width:420px;
  margin-top:14px;
}

.km-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.km-full{
  grid-column:1/-1;
}

.km-field{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.km-field label{
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  color:var(--km-dark);
}

.km-field-help{
  margin:0 3px;
  font-size:12px;
  opacity:.72;
}

.km-extra-photo-card .km-field-help{
  margin:0 3px 18px;
}

.km-blog-admin input,
.km-blog-admin select{
  width:100%;
  min-height:47px;
  padding:11px 14px;
  border:1px solid rgba(75,82,111,.20);
  border-radius:14px;
  outline:none;
  color:var(--km-dark);
  background:rgba(255,255,255,.38);
  transition:
    border-color .16s ease,
    background .16s ease;
}

.km-blog-admin input:focus,
.km-blog-admin select:focus{
  border-color:rgba(75,82,111,.48);
  background:rgba(255,255,255,.52);
}

.km-blog-admin input::placeholder{
  color:rgba(63,69,95,.50);
}

.km-blog-admin select{
  cursor:pointer;
}

.km-blog-admin input[type="file"]{
  padding:9px;
  cursor:pointer;
}

.km-blog-admin input[type="file"]::file-selector-button{
  margin-right:12px;
  padding:8px 13px;
  border:0;
  border-radius:10px;
  font-family:'Jura',sans-serif;
  font-weight:700;
  color:var(--km-bg1);
  background:var(--km-main);
  cursor:pointer;
}


/* ==================================================
   AFBEELDINGEN
================================================== */

.km-upload-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px;
  gap:20px;
  align-items:start;
  margin-bottom:16px;
}

.km-image-preview-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:150px;
  padding:10px;
  border-radius:16px;
  background:rgba(255,255,255,.24);
  border:1px solid var(--km-border);
}

.km-image-preview{
  display:block;
  max-width:100%;
  max-height:210px;
  object-fit:contain;
  border-radius:12px;
}

.km-extra-photo-card{
  padding:18px;
  border-radius:16px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(75,82,111,.12);
}

.km-extra-photo-card .km-image-preview-wrap{
  max-width:360px;
  margin:16px auto;
}


/* ==================================================
   EDITOR
================================================== */

.km-toolbar{
  position:sticky;
  top:10px;
  z-index:100;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:11px;
  padding:10px;
  border:1px solid rgba(75,82,111,.16);
  border-radius:14px;
  background:rgba(255,255,255,.88);
  box-shadow:0 7px 18px rgba(63,69,95,.10);
  backdrop-filter:blur(8px);
}

.km-toolbar-group{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.km-toolbar-row{
  flex:0 0 100%;
}

.km-frame-picker{
  display:block;
}

.km-frame-select{
  min-height:0 !important;
  width:auto !important;
  padding:9px 34px 9px 13px !important;
}

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

.km-editor{
  min-height:340px;
  padding:20px;
  border:1px solid rgba(75,82,111,.20);
  border-radius:16px;
  outline:none;
  overflow-wrap:anywhere;
  line-height:1.65;
  color:var(--km-dark);
  background:rgba(255,255,255,.40);
}

.km-editor:focus{
  border-color:rgba(75,82,111,.48);
  background:rgba(255,255,255,.52);
}

.km-editor:empty::before{
  content:attr(data-placeholder);
  color:rgba(63,69,95,.50);
  pointer-events:none;
}

.km-editor h3{
  margin:26px 0 12px;
  font-size:23px;
  text-transform:none;
  letter-spacing:normal;
  color:var(--km-main);
}

.km-editor figure.km-blog-photo{
  position:relative;
  max-width:100%;
  margin:14px auto;
  border-radius:16px;
overflow:visible !important;
  text-align:center;
}

.km-editor figure.km-blog-photo img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:none;
  margin:0 auto;
  object-fit:contain;
  border-radius:16px;
}

.km-photo-resize{
  display:none;

  position:absolute;
  top:calc(100% + 10px);
  left:50%;
  z-index:20;

  width:320px !important;
  min-width:320px;
  max-width:none;

  margin:0;
  padding:8px 10px;

  transform:translateX(-50%);

  align-items:center;
  justify-content:center;
  gap:10px;

  border:1px solid rgba(75,82,111,.16);
  border-radius:10px;

  box-sizing:border-box;

  font-size:12px;
  font-weight:700;
  color:var(--km-main);

  background:rgba(255,255,255,.94);
  box-shadow:0 6px 14px rgba(63,69,95,.12);
}

.km-editor figure.km-photo-selected{
  margin-bottom:82px;
}

.km-editor figure.km-photo-selected .km-photo-resize{
  display:flex;
}

.km-photo-resize label{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:9px;
  white-space:nowrap;
}

.km-blog-admin .km-photo-size-range{
  flex:0 0 150px;

  width:150px !important;
  min-width:150px;
  max-width:150px;

  min-height:0;
  padding:0;

  accent-color:var(--km-main);
  cursor:pointer;
}

.km-photo-size-value{
  flex:0 0 42px;

  width:42px;
  min-width:42px;

  text-align:right;
}

.km-editor figcaption{
  margin-top:8px;
  font-weight:700;
  color:var(--km-main);
}

.km-editor hr{
  margin:26px 0;
  border:0;
  border-top:1px solid rgba(75,82,111,.28);
}

.km-editor a{
  color:var(--km-main);
  font-weight:700;
}

.km-info-box,
.km-preview-post-content .km-info-box{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:14px;
  margin:20px 0;
  padding:17px 18px;
  border:1px solid rgba(75,82,111,.20);
  border-left:5px solid var(--km-main);
  border-radius:14px;
  text-align:left;
  background:rgba(255,255,255,.48);
}

.km-info-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  min-height:36px;
}

.km-info-icon img{
  display:block;
  width:30px;
  height:30px;
  object-fit:contain;
}

.km-info-content > strong{
  display:block;
  margin-bottom:5px;
  color:var(--km-main);
}

.km-info-important{ border-left-color:#d89b22; background:rgba(255,231,170,.50); }
.km-info-warning{ border-left-color:#c55353; background:rgba(255,218,218,.48); }
.km-info-tip{ border-left-color:#d6aa20; background:rgba(255,244,182,.52); }
.km-info-info{ border-left-color:#4b79a8; background:rgba(218,235,251,.52); }
.km-info-chess{ border-left-color:#4b526f; background:rgba(75,82,111,.10); }

.km-frame-color-blue{ border-left-color:#4b79a8; background:rgba(218,235,251,.56); }
.km-frame-color-yellow{ border-left-color:#d6aa20; background:rgba(255,244,182,.58); }
.km-frame-color-green{ border-left-color:#4f8b68; background:rgba(218,241,226,.58); }
.km-frame-color-red{ border-left-color:#c55353; background:rgba(255,218,218,.54); }
.km-frame-color-gray{ border-left-color:#4b526f; background:rgba(75,82,111,.10); }

.km-preview-scheduled{
  margin-top:20px;
  padding:10px 13px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
  color:var(--km-main);
  background:rgba(255,255,255,.36);
}

.km-editor strong,
.km-editor b{
  font-weight:900;
}


/* Verwijderknop bij foto/partij in editor */

.km-remove-editor-photo,
.km-remove-editor-game{
  position:absolute;
  top:7px;
  right:7px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:29px;
  height:29px;
  padding:0;
  border:0;
  border-radius:50%;
  color:white;
  background:var(--km-main);
  cursor:pointer;
  font-weight:700;
}


/* Partij-placeholder in editor */

.km-editor-game{
  position:relative;
  max-width:520px;
  margin:22px auto;
  padding:20px;
  border-radius:16px;
  text-align:center;
  background:rgba(255,255,255,.30);
  border:1px solid var(--km-border);
}

.km-editor-game-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  margin:0 auto 10px;
  border-radius:50%;
  font-size:27px;
  font-weight:800;
  color:var(--km-bg1);
  background:var(--km-main);
}

.km-editor-game strong{
  display:block;
  margin-bottom:3px;
}


/* ==================================================
   KNOPPEN
================================================== */

.km-tool,
.km-button-primary,
.km-button-secondary,
.km-button-danger{
  min-height:40px;
  padding:9px 15px;
  border-radius:14px;
  border:1px solid rgba(75,82,111,.18);
  font-family:'Jura',sans-serif;
  font-weight:700;
  cursor:pointer;
  transition:
    transform .16s ease,
    opacity .16s ease;
}

.km-tool,
.km-button-primary{
  color:var(--km-bg1);
  background:var(--km-main);
}

.km-button-secondary{
  color:var(--km-dark);
  background:rgba(255,255,255,.32);
}

.km-button-danger{
  color:white;
  background:var(--km-danger);
}

.km-tool:hover,
.km-button-primary:hover,
.km-button-secondary:hover,
.km-button-danger:hover{
  transform:translateY(-1px);
}

.km-tool:disabled,
.km-button-primary:disabled,
.km-button-secondary:disabled,
.km-button-danger:disabled{
  cursor:not-allowed;
  opacity:.55;
  transform:none;
}

.km-inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:15px;
}

.km-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:24px;
}


/* ==================================================
   MELDINGEN
================================================== */

.km-message{
  margin-top:18px;
  padding:13px 16px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
  text-align:center;
  background:rgba(255,255,255,.28);
  border:1px solid var(--km-border);
}

.km-message.success{
  background:rgba(255,255,255,.42);
}

.km-message.error{
  border-color:rgba(139,79,89,.38);
}

.km-loading,
.km-empty{
  padding:30px 18px;
  text-align:center;
  font-weight:700;
  opacity:.75;
}

.km-hidden{
  display:none !important;
}


/* ==================================================
   PREVIEW
================================================== */

.km-preview-grid{
  display:grid;
  grid-template-columns:330px minmax(0,1fr);
  gap:24px;
  align-items:start;
}

.km-preview-label{
  margin:0 0 12px;
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--km-main);
}


/* Blogtegel */

.km-blog-card{
  display:block;
  overflow:hidden;
  border-radius:18px;
  color:var(--km-dark);
  background:rgba(255,255,255,.30);
  border:1px solid var(--km-border);
  text-decoration:none;
}

.km-blog-card-image{
  display:block;
  width:100%;
  height:185px;
  object-fit:cover;
  background:rgba(255,255,255,.25);
}

.km-blog-card-content{
  padding:18px;
}

.km-blog-card-meta{
  margin-bottom:8px;
  font-size:12px;
  font-weight:600;
  opacity:.78;
}

.km-blog-card-title{
  margin:0 0 10px;
  font-size:20px;
  line-height:1.2;
  text-transform:uppercase;
  color:var(--km-dark);
}

.km-blog-card-text{
  margin:0 0 13px;
  font-size:14px;
  line-height:1.5;
}

.km-blog-card-more{
  font-size:13px;
  font-weight:800;
  color:var(--km-main);
}


/* Artikelpreview */

.km-preview-post{
  padding:25px;
  border-radius:20px;
  color:var(--km-dark);
  background:rgba(255,255,255,.28);
  border:1px solid var(--km-border);
}

.km-preview-post-header{
  margin-bottom:22px;
  text-align:center;
}

.km-preview-post-meta{
  margin-bottom:12px;
  font-size:13px;
  opacity:.80;
}

.km-preview-post-title{
  margin:0;
  font-size:32px;
  line-height:1.15;
  text-transform:uppercase;
  color:var(--km-dark);
}

.km-preview-post-content{
  font-size:16px;
  line-height:1.65;
  text-align:center;
}

.km-preview-post-content h3{
  margin:27px 0 12px;
  font-size:23px;
  color:var(--km-main);
}

.km-preview-post-content figure{
  max-width:100%;
  margin:14px auto;
  border-radius:16px;
  overflow:hidden;
  text-align:center;
}

.km-preview-post-content figure img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:none;
  margin:0 auto;
  object-fit:contain;
  border-radius:16px;
}

.km-preview-post-content figcaption{
  margin-top:8px;
  font-weight:700;
  color:var(--km-main);
}


/* ==================================================
   BESTAANDE ARTIKELS
================================================== */

.km-articles-list{
  display:grid;
  gap:14px;
}

.km-article-card{
  display:grid;
  grid-template-columns:150px minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  padding:15px;
  border-radius:17px;
  background:rgba(255,255,255,.24);
  border:1px solid var(--km-border);
}

.km-article-card-image{
  width:150px;
  height:100px;
  object-fit:cover;
  border-radius:13px;
  background:rgba(255,255,255,.24);
}

.km-article-card-info{
  min-width:0;
}

.km-article-card-meta{
  margin-bottom:5px;
  font-size:12px;
  opacity:.76;
}

.km-article-status{
  display:inline-flex;
  margin:2px 0 8px;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.km-article-status-scheduled{
  color:var(--km-main);
  background:rgba(239,226,177,.72);
  border:1px solid rgba(75,82,111,.18);
}

.km-article-card-title{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.25;
  color:var(--km-dark);
}

.km-article-card-excerpt{
  display:-webkit-box;
  margin:0;
  overflow:hidden;
  font-size:13px;
  line-height:1.45;
  opacity:.86;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

.km-article-card-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
}


/* ==================================================
   OVERLAY
================================================== */

.km-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(32,36,52,.66);
}

.km-dialog{
  width:100%;
  max-width:460px;
  padding:26px;
  border-radius:22px;
  color:var(--km-dark);
  background:linear-gradient(135deg,var(--km-bg1),var(--km-bg2));
  box-shadow:0 24px 60px rgba(0,0,0,.24);
}

.km-dialog h2{
  margin:0 0 13px;
  font-size:22px;
}

.km-dialog p{
  line-height:1.5;
}

.km-dialog-warning{
  font-size:13px;
  font-weight:700;
  opacity:.78;
}

.km-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px;
}


/* ==================================================
   MOBIEL
================================================== */

@media(max-width:760px){

body{
  padding:16px 10px 40px;
  background-attachment:scroll;
}

  .km-admin-head{
  padding:
    74px 18px
    26px;
}

.km-back-link{
  left:18px;
  top:18px;
}

.km-admin-logo{
  width:64px;
  height:64px;
}

.km-admin-head h1{
  font-size:30px;
}

  .km-panel{
    padding:17px;
    border-radius:20px;
  }

  .km-subsection{
    padding:16px;
  }

  .km-title-date-grid,
  .km-grid,
  .km-upload-grid,
  .km-preview-grid{
    grid-template-columns:1fr;
  }

  .km-image-preview-wrap{
    min-height:auto;
  }

  .km-editor{
    min-height:300px;
    padding:16px;
  }

  .km-form-actions{
    flex-direction:column-reverse;
  }

  .km-form-actions button{
    width:100%;
  }

  .km-panel-head{
    align-items:flex-start;
  }

  .km-article-card{
    grid-template-columns:90px minmax(0,1fr);
    gap:12px;
  }

  .km-article-card-image{
    width:90px;
    height:90px;
  }

  .km-article-card-actions{
    grid-column:1/-1;
    flex-direction:row;
  }

  .km-article-card-actions button{
    flex:1;
  }

  .km-preview-post{
    padding:18px;
  }

  .km-preview-post-title{
    font-size:27px;
  }

  .km-dialog-actions{
    flex-direction:column-reverse;
  }

  .km-dialog-actions button{
    width:100%;
  }

}
