body{
  font-family: 'Poppins', sans-serif;
}
/* Default */
a,
a:link,
a:visited,
a:focus,
a:active
{
    text-decoration: none;
}

a:hover{
  color:red;
}

div#body.login div.wrapper{
  width: 450px;
}
div#body.userman div.wrapper{
  width: 500px;
}


div#body.event_edit div.wrapper{
    width: 500px;
}

div#body.log div.wrapper{
  width: 80%;
}

div#body.log table.log_list{
  width: 100%;
  font-size: 14px;
}

div#body.login div.wrapper input{
  margin-top: 10px;
  width: 120px;
}

div#page div.error{
  color: red;
  padding: 0 0 30px 0;
  width: 300px;
  font-weight: bold;
  text-align: center;
}

div#body.userman::before{
  display: none;
}

div#body.userman table.list{
  width:100%;
}
div#body.userman td.last_login{
  text-align: right;
}

.schedule_wrapper
{
    padding: 0px 20px 60px 0px;
    max-width: 1400px;
    margin: auto;

}

.disable-select{
  user-select:none;
 }
 
 table.list {
   border: 1px solid #ccc;
   border-collapse: collapse;
   margin: 0;
   padding: 0;
   width: 100%;
   table-layout: fixed;
 }
 
 table.list caption {
   font-size: 1.5em;
   margin: .5em 0 .75em;
 }
 
 table.list tr {
   background-color: #f8f8f8;
   border: 1px solid #ddd;
   padding: .35em;
 }
 
 table.list tr.disable-select:active, table#userlist tr.disable-select:hover {
   background-color: #e5e5e5;
 }
 
 table.list th,
 table.list td {
   padding: .425em;
   text-align: center;
 }
 
 table#loglist.list td{
    text-align: left;
 }
 table.list td#column-id{
   background-image: url(../images/icons/icon-profile.png);
   background-size: 25px;
   background-repeat: no-repeat;
   background-position-y: 5px;
   background-position-x: 5px;
 }
 
table.list th {
  font-size: .85em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

 

.grid-container
{
    display: grid;  
    grid-template-columns: .1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;  
    grid-template-rows: auto; 
    margin-top: 40px;
}

.col_overlay{
  display: grid;
  grid-auto-rows: 36px;
  grid-auto-columns: 50%;
  padding:30px 0 0 0;
  min-width: 110px;
}

.col_overlay.time_overlay{
  min-width: 10px;
}

.col_overlay.current {
    background: rgba(59, 130, 246, 0.05); /* very light blue */
    border: none;
}
.schedule_header.current {
    position: relative;
    color: #000;
    background: transparent;
}

.schedule_header.current::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 3px;
    border-radius: 2px;
    background: #3b82f6; /* accent color */
}

.schedule_header.current::before {
    content: "Idag";
    position: absolute;
    top: -18px;
    left: 8px;

    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
}

.edit_menu
{
    position: absolute;
    top: 0;
    right: 101%;
    overflow: hidden;
    width: 0;
    height: 100%;
    transition: width 300ms;
    border-radius: 5px;
    background-color: rgba(0,0,0,.2);
    z-index: 99;
}

.weeknav
{
    width: 100%;  margin: auto;
}

.weeknav td
{
    width: 25px;
}
.weeknr
{
    font-size: 40px;  padding-bottom: 3px;  text-align: center;
}
.button_add
{
    position: relative;  z-index: 96;     width: 40px;  height: 40px;
    display: inline-block;
    background-image: url(../images/icons/plus-icon.png);  background-repeat: no-repeat;  background-size: cover;
}

.nav-controls-wrapper { 
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px; background: rgba(255, 255, 255, 0); border-radius: 8px; margin-bottom: 20px; }
.week-navigation { 
  display: flex; align-items: center; gap: 15px; }
.week-navigation .nav { 
  width: 30px !important; }
.controls-section { 
  display: flex; align-items: center; gap: 15px; }

@media (max-width: 768px) {
    .nav-controls-wrapper { flex-direction: column; gap: 15px; padding: 10px; }
    .week-navigation { width: 100%; justify-content: center; }
    .controls-section { width: 100%; }
    .filter-container { flex: 1; }
    .filter-select { width: 100%; min-width: auto; }
}
.nav
{
    width: 100%;  height: 30px;  background-image: url(../images/icons/arrow.png);  background-repeat: no-repeat;  background-size: 20px 30px;
    display: inline-block;
}
.nav-left
{
    transform: scaleX(-1);
}

.infobox{
  background: #ffbf004d;
  border: solid 2px #e05d31;
  width: 45%;
  text-align: center;
  font-weight: bold;
  margin: auto;
  position: relative;
  left:3%;
  padding: 5 0 5 0;
}
.schedule_header a
{
    color: #000;
    font-weight: 300;
}

#weekEndBox {
  display: none;
}

#chkYes:checked ~ #weekEndBox {
  display: block;
}

.weekday
{
    font-size: 2vw;  font-weight: 100;     margin: 0;
    padding: 0 0 0 5px;  border-left: solid 2px #979797;
}

.weekdate
{
    font-size: 1.8vw;
    float: right;
    padding-right: 5px;
}
/* =========================
   EVENT BOX – MODERNIZED
   ========================= */

.event {
    position: relative;
    padding: 6px 6px 4px 6px;
    border-radius: 10px;
    overflow: hidden;

    /* softer modern look */
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    background-clip: padding-box;

    /* remove aggressive animation */
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

/* REMOVE old expansion behavior */
/* .event::after {
    content: "⋯";
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 0px 3px;
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.event.has-overflow::after {
    opacity: 1;
}

.event.has-overflow:hover {
    z-index: 100;
    height: 100px;
    min-width: 150px;
    box-shadow: -2px 2px 20px #424141;
    overflow: visible;
    padding-bottom: 50px;
}
.event.has-overflow:hover::after {
    opacity: 0;
} */

.event_title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    margin-bottom: 2px;
}

/* TIME: subtle secondary info */
.timestamp {
    font-size: 0.7rem;
    opacity: 0.75;
    line-height: 1.1;
}

.event_subtitle {
    font-size: 1.4vw;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    padding: 0 0 3px 0;
}
.event_menu
{
    z-index: 98;  overflow: hidden;
    width: 100%;   padding: 0;
}

.lokal{
  font-size: 1.2vw;
  height: 10px;
  display: none;
}
.lokal.visible{
  display:block;
}


.item
{
    height: 35px;  border-left: solid 2px #979797;
}

.row2, .row4, .row6, .row8, .row10, .row12, .row14, .row16, .row18, .row20, .row22, .row24, .row26, .row28 {
  border-top: solid 1px #8c888826;
}

.button_edit
{
    position: absolute; top:3px; width: 25px;  height: 25px;  margin: 0 0 5px 2px;

    background-image: url(../images/icons/edit.png);  background-repeat: no-repeat;  background-size: cover;
}
.button_delete
{
    position: absolute; bottom:0px; width: 20px;  height: 20px;  margin: 0 0 5px 5px;

    background-image: url(../images/icons/delete.png);  background-repeat: no-repeat;  background-size: cover;
}

.button_container
{
    position: absolute;  bottom: 0;  left: 0;  width: 100%;
}
.time
{
    font-size: 1.8vw;     margin-top: -10px;  padding-right: 5px;

    text-align: right;  color: #a6a6a7;
}

.vacant
{
    border-collapse: collapse;
}
.hdg {
    border-left: 3px solid #22c55e;   /* modern green */
    background-color: #f0fdf4;        /* very soft tint */
}
.hdg .event_title {
    color: #166534;                  /* deeper readable green */
}
.hkd {
    border-left: 3px solid #3b82f6;   /* clean blue */
    background-color: #eff6ff;
}
.hkd .event_title {
    color: #1e3a8a;
}
.tkd {
    border-left: 3px solid #ef4444;
    background-color: #fef2f2;
}
.tkd .event_title {
    color: #991b1b;
}

.oth {
    border-left: 3px solid #f59e0b;
    background-color: #fffbeb;
}
.oth .event_title {
    color: #92400e;
}

/* Notification */
.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 100ms;
  visibility: hidden;
  opacity: 0;
  z-index:98;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.modal {
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  position: relative;
  transition: all 100ms ease-in-out;
  z-index: 99;
}

.modal.menu_event{
  width: min(780px, 92vw);
  padding: 0;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.modal.message{
  width: 30%;
}
.modal.menu_event h2 {
  margin-top: 0;
  color: #1f2328;
  padding: 18px 24px;
  background: linear-gradient(135deg, #f1f3f6, #ffffff);
  border-bottom: 1px solid #e1e4e8;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

div.modal a.close{
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 34px;
  color: #2b2f33;
}

.modal-save-button{
  display: none;
  position: absolute;
  top: 12px;
  right: 64px;
  padding: 13px 19px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff4e50, #d62929);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.weekday.full{
  display:none;
}
/* .modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.modal .close:hover {
  color: #06D85F;
}
.modal .content {
  max-height: 55%;
  overflow: auto;
} */

.modal.menu_event .content{
  padding: 10px 24px 18px;
  max-height: 80vh;
  overflow-y: auto;
}

.event-form{
  display: grid;
  margin: 0;
}

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

.event-field{
  display: grid;
  gap: 6px;
  font-size: .95em;
  color: #2b2f33;
}

.event-field span{
  font-size: .78em;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5a6168;
  font-weight: 600;
}

.event-date-meta{
  font-size: .85em;
  color: #2b2f33;
  background: #f2f4f7;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: 4px;
  width: fit-content;
}

.event-field--half{
  grid-column: span 1;
}

.event-field--full,
.event-field--title{
  grid-column: 1 / -1;
}

.event-field--inline{
  grid-column: 1 / -1;
}

.event-form input[type='text'],
.event-form input[type='number'],
.event-form input[type='password' i],
.event-form select{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d0d7de;
  border-radius: 12px;
  background: #ffffff;
  font-size: .95em;
}

.event-form input[type='checkbox']{
  transform: scale(1.1);
  margin: 0;
}

.event-inline{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-inline--time select{
  min-width: 120px;
}

.event-time-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-time-field{
  display: grid;
  gap: 6px;
}

.event-time-field small{
  font-size: .75em;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5a6168;
  font-weight: 600;
}

@media screen and (max-width: 760px){
  .event-time-row{
    grid-template-columns: 1fr;
  }
}

.event-inline__sep{
  font-weight: 700;
  color: #5a6168;
}

.event-inline--check{
  gap: 8px;
}

.event-repeat{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f5f6f8;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 6px 10px;
}

.event-repeat label{
  font-size: .85em;
  color: #2b2f33;
}

.event-repeat #weekEndBox{
  display: none;
  align-items: center;
  gap: 6px;
}

.event-repeat #chkYes:checked ~ #weekEndBox{
  display: inline-flex;
}

.event-repeat #weekEndBox span{
  font-size: .8em;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5a6168;
}

.event-actions{
  display: flex;
  justify-content: flex-end;
}

.event-actions .button{
  margin: 0;
}

@media screen and (max-width: 760px){
  .modal.menu_event{
    margin: 30px auto;
    max-height: 95dvh;
    border-radius: 0;
  }
  .modal.menu_event .content{
    padding: 16px;
  }
  .modal-save-button{
    display: inline-flex;
  }
  .event-grid{
    grid-template-columns: 1fr;
  }
  .event-actions{
    display: none;
    justify-content: stretch;
  }
  .event-actions .button{
    width: 100%;
  }
}

/* Form styles */
input[type='checkbox'],
input[type='text'],
input[type='number'],
input[type='password' i],
select option,
select
{
    font-size: 18px;
    line-height: 1.4;
    padding: 6px 0 6px 0;
    border: none;
    border-bottom: solid 1px gray;
    background-color: inherit;
}
input[type='number']
{
    width: 35px;
}
input[type='checkbox'] + label
{
    position: relative;  padding-left: 1.6em;
}
input[type='checkbox'] {
  -ms-transform: scale(1.5); /* IE */
  -moz-transform: scale(1.5); /* FF */
  -webkit-transform: scale(1.5); /* Safari and Chrome */
  -o-transform: scale(1.5); /* Opera */
  transform: scale(1.5);
}
input[type='submit'],
input[type='reset']
{
    font-size: 18px;
    line-height: 1.4;
    width: 125px;
    padding: 6px;
    margin: 15px 10px 5px 5px;
    border: none;
}

input[type='reset']
{
    padding-right: 5px;  background-color: #bf4444;
}
input[type='reset']:hover
{
    background-color: #892f2f;
}
.radio-toolbar input[type='radio'],
.schedule_header_mobile input[type='radio']
{
    position: fixed;  width: 0;  opacity: 0;
}
.radio-toolbar label
{
    font-family: sans-serif, Arial;  font-size: 18px;

    display: inline-block;  margin-right: -5px;  padding: 12px 9px;  border: none;  border-left: solid 2px #bbb;     background-color: #dedede;
}

#radio_tkd + label
{
    border: none;
}
#radio_tkd + label:hover
{
    background-color: #f9e8e8;
}
#radio_hdg + label:hover
{
    background-color: #e8f9ec;
}
#radio_hkd + label:hover
{
    background-color: #e8eff9;
}
#radio_oth + label:hover
{
    background-color: #f9f3e8;
}
.radio-toolbar input[type='radio']:focus + label,
.schedule_header_mobile input[type='radio']:focus + label
{
    background-color: #acacac;
}
.radio-toolbar input[type='radio']:checked + label,
.schedule_header_mobile input[type='radio']:focus + label
{
    background-color: #acacac;
}

/* Cancelled button */
.button_cancel {
    position: absolute;
    bottom: 25px;
    width: 20px;
    height: 20px;
    margin: 0 0 5px 5px;
    background-image: url(../images/icons/x-icon.png);
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.7;
}

.button_cancel:hover {
    opacity: 1;
}

/* Cancelled event styles - grayscale everything except red elements */
.event.cancelled {
    background-color: #f3f4f6 !important;
    border-left-color: #9ca3af !important;
    opacity: 0.8;
}

.event.cancelled .event_title {
    color: #666 !important;
}

.event.cancelled .event_subtitle {
    color: #888 !important;
}

.event.cancelled .timestamp {
    color: #999 !important;
}

.event.cancelled .lokal {
    color: #888 !important;
}

.event.cancelled .event_description {
    color: #777 !important;
}

/* Keep important indicator and text red for cancelled events */
.event.cancelled .important-indicator {
    background: #ff0000 !important;
    color: white !important;
}

.event.cancelled .event_important {
    color: #ff0000 !important;
    font-weight: 700;
    text-transform: uppercase;
}


/* Mobile styles for cancel button */
@media screen and (max-width: 600px) {
    .button_cancel {
        width: 24px;
        height: 24px;
        bottom: 30px;
    }
}

@media screen and (min-width: 850px)
{
    .event .timestamp
    {
        font-size: 10px;
    }
    .event_title
    {
        font-size: 14px;
    }
    .event_subtitle
    {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .time
    {
        font-size: 15px;
    }
    .lokal {
      font-size: 10px;
      padding-top: 8px;
    }
    .weekday
    {
        font-size: 25px;  padding: 0 5px 0 5px;
    }
    .weekdate
    {
        font-size: 16px;
    }
}
@media screen and (max-width: 600px)
{
  div#body.log div.wrapper{
    width: 90%;
  }

  table.list {
    border: 0;
  }

  table.list caption {
    font-size: 1.3em;
  }

  table.list thead {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    width: 1px;
  }

  table.list tr {
    border-bottom: 3px solid #ddd;
    height: 40px;
  }

  table.list td {
    border-bottom: 1px solid #ddd;
    font-size: .8em;
    text-align: right;
  }

  table#loglist.list th{
    font-size: 10px;
  }
  table#loglist.list td {
    font-size: 12px;
    overflow: hidden;
  }
  table.list td::before {
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }

  table#userlist td:last-child {
    border-bottom: 0;
  }
  [data-href]{
    cursor: hand;
  }

  .schedule_header, .button_add{
    margin-left: 10px;
    padding: 5px;
    border-radius: 15px 3px 1px 3px;

  }
  .grid-container{
    display:block;
    padding: 0px 10px 0 10px;
    margin-top: -60px;
  }

  .col_overlay{
    display: block;
    margin: -1px 0 70px 25px;
  }
  .modal{
    width: 70%;
  }
  .infobox{
    width: 95%;
    margin: auto;
    position: unset;
  }
  .weeknav
  {
      z-index: 96;
      width: 100%;
      background: white;
      padding: 0 10px;
  }
  .weekdate
  {
      font-size: 20px;
  }
  .weekday{
      font-size: 24px;
  }
  .weekday.full{
    display:contents;
  }
  .weekday.short{
    display:none;
  }

  .event{
    padding: 5px 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
  }

  .time
  {
      display:none;
  }
  .event_title
  {
      font-size: 18px;
      float: left;
      width: auto;
      max-width: 60%;
  }
  
  .event_subtitle
  {
      font-size: 18px;
      height: auto;
      min-height: 30px;
      margin-top: 5px;
      float: none;
      clear: both;
      text-align: left;
      white-space: normal;
  }

  .lokal {
      font-size: 12px;
      height: 20px;
      float: none;
      clear: both;
      text-align: left;
  }

  .event .timestamp
  {
      font-size: 15px;
      float: right;
      text-align: right;
  }

  .item.vacant{
    display: none;
  }
  .schedule_wrapper
  {
      margin: 20px 0px;  padding: 0 0px;
  }
  .modal.message{
    width: 90%;
  }
}
/* Important indicator - "!" badge */
.important-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #ff0000;
    color: white;
    font-size: 14px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Important info text - displayed in red */
.event_important {
    font-size: 1.2vw;
    color: #ff0000;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.2;
    word-wrap: break-word;
    white-space: normal;
}

/* Description text - only visible when logged in */
.event_description {
    font-size: 1.1vw;
    color: #444;
    font-style: italic;
    margin-top: 2px;
    line-height: 1.2;
    word-wrap: break-word;
    white-space: normal;
    border-top: 1px dashed #ccc;
    padding-top: 3px;
    margin-top: 4px;
}

/* Adjust button positions when important indicator is present */
.event.has-important .button_edit {
    top: 28px;
}

/* Mobile styles for new fields */
@media screen and (min-width: 850px) {
    .event_important {
        font-size: 11px;
    }
    
    .event_description {
        font-size: 10px;
    }
}

@media screen and (max-width: 600px) {
    .important-indicator {
        width: 24px;
        height: 24px;
        font-size: 16px;
        top: 30px;
        right: 10px;
    }
    
    .event_important {
        font-size: 16px;
        margin-top: 5px;
        clear: both;
        text-align: left;
    }
    
    .event_description {
        font-size: 14px;
        margin-top: 5px;
        clear: both;
        text-align: left;
    }
}