body.modal-open {
  overflow: visible;
  /*height: auto;*/
}

.panel-default.calendarview {

}

.panel-default.calendarview .panel-body .fc-center h2 {
  font-size: 22px;
  font-weight: bold;
}

.fc-toolbar {
  background-color: #f3f6fb;
  margin: -15px -15px 15px -15px;
  padding: 20px 15px 15px 15px;
}

.fc-day-header .fa-plus-circle.add,
.fc-day-top .fa-plus-circle.add {
  color: #949e97;
  cursor: pointer;
  font-size: 20px;
  line-height: 20px;
  padding: 2px 8px 2px 4px;
  opacity: 0.4;
  z-index: 5;
  -moz-transition-property: all;
  -o-transition-property: all;
  -webkit-transition-property: all;
  transition-property: all;
  -moz-transition-duration: 0.3s;
  -o-transition-duration: 0.3s;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -moz-transition-timing-function: ease-in-out;
  -o-transition-timing-function: ease-in-out;
  -webkit-transition-timing-function: ease-in-out;
  transition-timing-function: ease-in-out
}

.fc-day-header .fa-plus-circle.add,
.fc-day-top .fa-plus-circle.add {
  font-size: 20px;
  line-height: 20px;
  padding: 2px 8px 2px 4px;
}

/* Plus-Symbole unsichtbar machen, aber klickbar halten */
.fc-day-header .fa-plus-circle.add,
.fc-day-top .fa-plus-circle.add,
.fc-daygrid-day-top .fa-plus-circle.add {
  color: transparent !important;
  opacity: 0 !important;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  cursor: pointer;
}

.fc-day-top:hover .fa-plus-circle.add,
.fc-day-top .fa-plus-circle.add:hover {
  color: #008803;
  opacity: 1;
}

/* Ursprüngliche Hover-Effekte beibehalten */
.fc-day-top:hover .fa-plus-circle.add,
.fc-day-top .fa-plus-circle.add:hover, 
.fc-daygrid-day-top:hover .fa-plus-circle.add,
.fc-daygrid-day-top .fa-plus-circle.add:hover {
  color: transparent !important;
}

#forcal .fc-day-header {
  position: relative;
}

#forcal .fc-day-header i.add {
  position: absolute;
  left: 0;
  top: 0;
}

#forcal .fc-day-header i.add:hover {
  color: #00e504;
  opacity: 1;
}

#forcal .fc-day-header i.add:hover {
  color: transparent !important;
  opacity: 0 !important;
}

#forcal .fc-day-header.fc-sun .fa-plus-circle.add:hover,
#forcal .fc-day-header.fc-sat .fa-plus-circle.add:hover {
  color: #004f01;
}

#forcal .fc-day-header.fc-sun .fa-plus-circle.add:hover,
#forcal .fc-day-header.fc-sat .fa-plus-circle.add:hover {
  color: transparent !important;
}

.fc-event-container a,
.fc-day-top:hover {
  cursor: pointer;
}

.fc-content-skeleton > table {
  background: inherit;
}

.fc-day-header {
  background-color: #324050;
  color: #fff;
}

#forcal .fc-day-header {
  padding: 10px 0;
}

.fc-day-header.fc-sat {
  background-color: #ffab91
}

.fc-day-header.fc-sun {
  background-color: #ef9a9a
}

/* Make event text readable on light backgrounds */
.fc-event .fc-event-main,
.fc-event .fc-event-time,
.fc-event .fc-time,
.fc-event .fc-title, 
.fc-event-title,
.fc-event {
    color: #333 !important; 
    font-weight: 500;
}

.fc-day-top.fc-sat .fc-day-number {
  color: #ffab91
}

.fc-day-top.fc-sun .fc-day-number {
  color: #ef9a9a
}

.forcal-group {
  width: 100%;
}

.forcal_clangtabs {
  margin-left: -15px;
  margin-right: -15px;
}

.forcal_clangtabs .nav {
  padding-left: 5px;
  border-bottom: 1px solid #bfe0d8;
}

.forcal-tabform {
  padding: 20px 15px 5px 15px;
  margin-bottom: 10px;
  background-color: #f1fcfa;
  border-bottom: 1px solid #bfe0d8;
}

.forcal_clangtabs .nav-tabs > li.active > a,
.forcal_clangtabs .nav-tabs > li.active > a:hover,
.forcal_clangtabs .nav-tabs > li.active > a:focus {
  color: #333;
  background-color: #f1fcfa;
  border-color: #bfe0d8;
  border-top: 2px solid #3bb594;
  border-bottom: 1px solid #f1fcfa;
  border-radius: 4px 4px 0 0;
}

.forcal_clangtabs .nav-tabs > li > a {
  color: #333;
  background-color: #e6eaf0;
  border-color: #f1f6fc;
  border-radius: 4px 4px 0 0;
}

.forcal_clangtabs .nav-tabs > li > a:hover {
  color: #fff;
  background-color: #3bb594;
  border-color: #3bb594;
}

.forcal_clangtabs .nav.nav-tabs {
  background-color: #e1ebe5;
  padding-top: 12px;
  /*margin-top: -15px;*/
}

dl + .forcal_clangtabs .nav.nav-tabs,
.forcal-first-group + .forcal_clangtabs .nav.nav-tabs {
  margin-top: 0;
}

.forcal-first-group .form-group-np {
  margin-bottom: 0;
}

.forcal-first-group {
  margin-left: -15px;
  margin-right: -15px;
  padding: 15px;
  margin-top: -15px;
  background: #8ad6bb;
  color: #fff;
}

/*    overflow-x: hidden;
  white-space: nowrap;
*/

.forcal-first-group + dl {
  margin-top: 15px;
}

.panel-group.forcal-panel + .panel-group.forcal-panel {
  margin-top: -15px;
}

.forcal-panel .panel-collapse.collapsing .panel-body,
.forcal-panel .panel-collapse.collapse .panel-body,
.forcal-tabform .forcal-panel .panel-collapse.collapse .panel-body {
  border-color: transparent;
}

.forcal-panel .panel-default {
  border-color: #d0d4d9;
}

.forcal-panel .panel-default .panel-body {
  background-color: #e1ebe5;
}

.forcal-panel .panel-default > .panel-heading {
  background-color: #e1ebe5;
}

.forcal-tabform .forcal-panel .panel-default {
  border-color: #dfe3e9;
}

.forcal-tabform .forcal-panel .panel-default .panel-body {
  background-color: #fefcff;
}

.forcal-tabform .forcal-panel .panel-default > .panel-heading {
  background-color: #fefcff;
}

.forcal-panel .panel-heading a:after {
  font-family: 'Glyphicons Halflings';
  content: "\2212";
  float: right;
  color: grey;
}

.forcal-panel .panel-heading a.collapsed:after {
  content: "\002b";
}

.forcaldatepicker.forcal .form-control {
  /*border-radius: 4px;*/
}

div.daterangepicker_input,
.rex-page-forcal-events .daterangepicker .daterangepicker_input {
  display: none;
}

div.daterangepicker.forcal {
  margin-top: 10px;
}

.daterangepicker.forcal:before {
  /*left: 50%;*/
  /*margin-left: -11px;*/
  /*border-top-width: 0;*/
  /*border-bottom-color: #999;*/
  /*border-bottom-color: rgba(0, 0, 0, 0.25);*/
  /*top: -11px*/
}

.daterangepicker.forcal:after {
  /*content: " ";*/
  /*top: 1px;*/
  /*margin-left: -10px;*/
  /*border-top-width: 0;*/
  /*border-bottom-color: #fff;*/
}

div.daterangepicker.forcal .cancelBtn {
  display: none;
}

.daterangepicker.forcal.opensright:before,
.daterangepicker.forcal.opensright:after {
  position: absolute;
  display: inline-block;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  content: '';
}

.daterangepicker.forcal.opensright:before {
  top: -11px;
  border-right: 11px solid transparent;
  border-left: 11px solid transparent;
  border-bottom: 11px solid #ccc;
}

.daterangepicker.forcal.opensright:after {
  top: -10px;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #fff;
  border-left: 10px solid transparent;
}

div.popover.clockpicker-popover {
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.clockpicker-align-left.popover > .arrow {
  left: 20px;
}

div.popover.clockpicker-popover .popover-content {
  background: inherit;
}

.clockpicker-popover .popover-title {
  font-size: inherit;
  font-weight: bold;
  border-bottom: none;
}

.clockpicker-popover .popover-content {
  padding-top: 0;
  padding-bottom: 9px;
}

.btn.clockpicker-button {
  /*color: #fff;*/
  /*background-color: #3bb594;*/
  /*border-color: #35a284;*/
  /*display: inline-block;*/
  /*margin-bottom: 0;*/
  /*font-weight: normal;*/
  /*text-align: center;*/
  /*vertical-align: middle;*/
  /*border-radius: 4px;*/
}

/*.forcal_repeats_show,*/
.forcal_repeat_show {
  display: none;
}

div.popover.clockpicker-popover {
  max-width: 228px;
  width: auto;
}

div.popover.clockpicker-popover .pop-wrapper {
  width: 225px;
  float: left;
}

div.popover.clockpicker-popover .popover-title,
div.popover.clockpicker-popover .popover-content {
}

div.popover.clockpicker-popover .range_inputs {
  padding: 8px;
  float: left;
}

table.forcaldatepicker.table {
  margin-bottom: 0;
  background: inherit;
}

table.forcaldatepicker.table > thead > tr > th label {
  font-weight: normal;
}

table.forcaldatepicker.table > thead > tr > th,
table.forcaldatepicker.table > thead > tr > td {
  padding: 0;
}

table.forcaldatepicker > thead > tr > td.date-input {
  padding-left: 0;
  padding-right: 0;
  border: none;
}

table.forcaldatepicker > thead > tr > td.date-input.only input.form-control {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

table.forcaldatepicker > thead:first-child > tr:first-child > th.date-label,
table.forcaldatepicker > thead > tr > th.date-label {
  padding-right: 18px;
  border: none;
}

table.forcaldatepicker > thead > tr > td.date-input:last-child {
  padding-right: 0;
}

div.forcal-form-input-inline dl,
div.forcal-form-select-inline dl,
div.forcal-form-radioboxes-inline dl,
div.forcal-form-checkboxes-inline dl {
  display: inline !important;
  width: inherit !important;
  table-layout: inherit !important;
  float: left;
  margin-bottom: 0 !important;
}

div.forcal-form-input-inline dl dt,
div.forcal-form-select-inline dl dt,
div.forcal-form-radioboxes-inline dl dt,
div.forcal-form-checkboxes-inline dl dt,
div.forcal-form-input-inline dl dd,
div.forcal-form-select-inline dl dd,
div.forcal-form-radioboxes-inline dl dd,
div.forcal-form-checkboxes-inline dl dd {
  display: inline !important;
  padding: 0 !important;
}

.forcal-form-inline-description + div dl,
.forcal-form-input-inline + div dl,
.forcal-form-select-inline + div dl,
.forcal-form-radioboxes-inline + div dl,
.forcal-form-checkboxes-inline + div dl {
  margin-left: 15px !important;
}

.forcal-form-inline-description + div dl dt,
.forcal-form-input-inline + div dl dt,
.forcal-form-select-inline + div dl dt,
.forcal-form-radioboxes-inline + div dl dt,
.forcal-form-checkboxes-inline + div dl dt {
  margin-right: 10px !important;
}

div.forcal-form-inline-description dl + dl,
div.forcal-form-input-inline dl + dl,
div.forcal-form-select-inline dl + dl,
div.forcal-form-radioboxes-inline dl + dl,
div.forcal-form-checkboxes-inline dl + dl {
  margin-left: 15px;
}

.forcal_repeats_show:after {
  content: '';
  display: block;
  clear: both;
}

.forcal-form-inline-description {
  float: left;
  padding-left: 10px;
  padding-top: 7px;
}

.forcal-check-checkstyle .btn-group label,
.forcal-check-radiostyle .btn-group label {
  padding-left: 40px;
}

.forcal-check-checkstyle input:empty,
.forcal-check-radiostyle input:empty {
  margin-left: -20px;
  margin-right: 10px;
}

.forcal-check-checkstyle input:before,
.forcal-check-radiostyle input:before {
  position: absolute;
  display: block;
  top: 0;
  bottom: 0;
  left: 0;
  content: '';
  width: 2.5em;
  background: #eee;
}

.forcal-check-checkstyle input:before,
.forcal-check-radiostyle input:before {
  content: '\2714';
  color: #C2C2C2;
  padding-top: 7px;
  text-align: center;
}

.forcal-check-checkstyle input:checked:before,
.forcal-check-radiostyle input:checked:before {
  content: '\2714';
  color: #fff;
  background-color: #5cb85c;
}

.forcal-check-checkstyle .btn-group > .btn:first-child input:before,
.forcal-check-radiostyle .btn-group > .btn:first-child input:before {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.forcal-repeat-type .bootstrap-select {
  width: 130px !important;
}

.forcal-repeat-ending strong {
  padding-left: 10px;
}

.view-weekly .bootstrap-select,
.view-yearly .bootstrap-select,
.view-monthly .bootstrap-select {
  width: 60px !important;
}

/* Repeat-Selects: Light zuerst, Dark/Auto separat überschreiben */
.forcal_repeat_fields,
.forcal_repeats_show {
  --forcal-repeat-select-text: #111111;
}

.forcal_repeats_show .bootstrap-select > .dropdown-toggle,
.forcal_repeats_show .bootstrap-select > .dropdown-toggle .filter-option,
.forcal_repeats_show .bootstrap-select .dropdown-menu > li > a,
.forcal_repeats_show .bootstrap-select .dropdown-menu > li > a .text,
.forcal_repeat_fields .bootstrap-select > .dropdown-toggle,
.forcal_repeat_fields .bootstrap-select > .dropdown-toggle .filter-option,
.forcal_repeat_fields .bootstrap-select .dropdown-menu > li > a,
.forcal_repeat_fields .bootstrap-select .dropdown-menu > li > a .text {
  color: var(--forcal-repeat-select-text) !important;
}

body.rex-theme-dark .forcal_repeat_fields,
body.rex-theme-dark .forcal_repeats_show {
  --forcal-repeat-select-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  body.rex-has-theme:not(.rex-theme-light) .forcal_repeat_fields,
  body.rex-has-theme:not(.rex-theme-light) .forcal_repeats_show {
    --forcal-repeat-select-text: #ffffff;
  }
}

#dpd2b_wrapper {
  width: 220px;
  padding-left: 10px;
}

#dpd2b_wrapper input {
  -webkit-border-top-right-radius: 4px;
  -webkit-border-bottom-right-radius: 4px;
  -moz-border-radius-topright: 4px;
  -moz-border-radius-bottomright: 4px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.forcal_repeats_show .forcal-form-input-inline + .rex-form-group {
  display: none;
}

#rex-page-forcal-entries .rex-page-section .panel-edit .panel-body > .alert {
  margin-bottom: 35px;
}

.rex-table-icon.forcal-fa-repeat i:before,
.forcal-fa-repeat i:before {
  content: "\f363" !important;
}

.palette-color-picker-button {
  z-index: 10000;
}
.quick_navi_forcal_border {
border-left: 5px solid;
}

/* Safari-spezifische Fixes für flatpickr */
.flatpickr-monthDropdown-months {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  color: inherit !important;
  cursor: pointer !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: 300 !important;
  height: auto !important;
  line-height: inherit !important;
  margin: -1px 0 0 0 !important;
  outline: none !important;
  padding: 0 0 0 0.5ch !important;
  position: relative !important;
  vertical-align: initial !important;
  width: auto !important;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' height='10px' width='15px'%3E%3Ctext x='0' y='10' fill='white'%3E%E2%96%BE%3C/text%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 5px center !important;
}

/* Verstecke den Standardpfeil im Safari */
.flatpickr-monthDropdown-months::-webkit-details-marker {
  display: none !important;
}

/* Weitere Safari-Fixes für flatpickr */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
      .flatpickr-monthDropdown-months { 
          text-indent: 0.01px !important;
          text-overflow: '' !important;
          padding-right: 15px !important;
      }
  }
}

/* Andere Browser-Fixes für flatpickr */
.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Korrektur für das Dropdown-Menü */
.flatpickr-months .flatpickr-month {
  position: relative !important;
  overflow: visible !important;
}

/* Klickbare Kalendertage */
.forcal-clickable-cell,
.forcal-clickable-day {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

/* Hover-Effekt für Tagesheader */
.forcal-clickable-cell:hover {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.1) !important;
}

/* Hover-Effekt für normale Tage in der Monatsansicht */
.forcal-clickable-day:hover:not(.fc-day-today) {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.1) !important;
}

/* Hover-Effekt für den heutigen Tag (mit anderem Hintergrund) */
.forcal-clickable-day.fc-day-today:hover {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.15) !important;
}

/* Hover-Effekt für Wochenendtage */
.fc-day-sat.forcal-clickable-day:hover,
.fc-day-sun.forcal-clickable-day:hover {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.15) !important;
}

/* Darstellung des Cursor als 'Hinzufügen' */
.forcal-clickable-cell:hover,
.forcal-clickable-day:hover {
    position: relative;
}

/* Effekt für Dark Mode */
body.rex-theme-dark .forcal-clickable-cell:hover,
body.rex-theme-dark .forcal-clickable-day:hover:not(.fc-day-today) {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.2) !important;
}

body.rex-theme-dark .forcal-clickable-day.fc-day-today:hover {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.25) !important;
}

body.rex-theme-dark .fc-day-sat.forcal-clickable-day:hover,
body.rex-theme-dark .fc-day-sun.forcal-clickable-day:hover {
    background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.25) !important;
}

/* Verbesserte und spezifischere Selektoren für Hover-Effekte */
.fc-daygrid-day.forcal-clickable-day:hover:not(.fc-day-today):not(.fc-popover):not(.fc-more-popover),
.fc-col-header-cell.forcal-clickable-cell:hover:not(.fc-popover):not(.fc-more-popover) {
  background-color: rgba(var(--event-color-rgb, 55, 136, 216), 0.1) !important;
}

/* "Weitere Termine"-Link deutlicher hervorheben */
.fc-daygrid-more-link {
  font-weight: bold;
  text-decoration: none !important;
  padding: 2px 5px !important;
  border-radius: 10px;
  color: #1867a6 !important;
}

.fc-daygrid-more-link:hover {
  background-color: rgba(24, 103, 166, 0.15) !important;
  color: #0a4f8d !important;
  cursor: pointer;
}

/* Im Dark Mode */
body.rex-theme-dark .fc-daygrid-more-link,
body.rex-has-theme:not(.rex-theme-light) .fc-daygrid-more-link {
  color: #52a8ff !important;
}

body.rex-theme-dark .fc-daygrid-more-link:hover,
body.rex-has-theme:not(.rex-theme-light) .fc-daygrid-more-link:hover {
  background-color: rgba(82, 168, 255, 0.2) !important;
  color: #78bcff !important;
}

/* Weitere Termine-Popover korrekte Positionierung */
body #forcal .fc-popover.fc-more-popover {
  position: absolute !important;
  z-index: 100 !important;
  /* Verhindern, dass das Popup immer oben links erscheint */
  
  margin-top: 1px;
  max-width: 300px;
}

/* Verbesserte Positionierung für verschiedene Bildschirmgrößen */
@media (max-width: 768px) {
  body #forcal .fc-popover.fc-more-popover {
    max-width: 280px;
  }
}

/* Sicherstellen, dass der Popover die richtige Hintergrundfarbe hat */
body #forcal .fc-popover.fc-more-popover,
body.rex-theme-dark #forcal .fc-popover.fc-more-popover,
body.rex-has-theme:not(.rex-theme-light) #forcal .fc-popover.fc-more-popover {
  background-color: var(--fc-panel-bg, #fff);
  border: 1px solid var(--fc-border, #ddd);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Verbesserte Dark Mode Anpassungen */
body.rex-theme-dark #forcal .fc-popover.fc-more-popover .fc-event,
body.rex-has-theme:not(.rex-theme-light) #forcal .fc-popover.fc-more-popover .fc-event {
  background-color: transparent;
}

/* === Quick Navigation: ForCalButton === */
.forcal-qn-add-btn {
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
}

.forcal-qn-entry .forcal-qn-link {
    display: block;
    padding: 4px 6px 4px 10px;
    border-left: 3px solid var(--forcal-color, #9ca5b2);
    text-decoration: none;
    color: inherit;
    border-radius: 0 3px 3px 0;
    transition: background 0.15s;
}

.forcal-qn-entry .forcal-qn-link:hover {
    background-color: rgba(75, 154, 217, 0.12);
    text-decoration: none;
}

.forcal-qn-name {
    display: block;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.forcal-qn-meta {
    display: block;
    font-size: 11px;
    color: #9ca5b2;
    margin-top: 1px;
}

.forcal-qn-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 0 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
    line-height: 16px;
}

.forcal-qn-today {
    background-color: #d4edda;
    color: #155724;
}

.forcal-qn-tomorrow {
    background-color: #cce5ff;
    color: #004085;
}

body.rex-theme-dark .forcal-qn-today { background-color: #1a3c28; color: #6abf69; }
body.rex-theme-dark .forcal-qn-tomorrow { background-color: #0d2a45; color: #79b8e8; }

@media (prefers-color-scheme: dark) {
    body.rex-has-theme:not(.rex-theme-light) .forcal-qn-today { background-color: #1a3c28; color: #6abf69; }
    body.rex-has-theme:not(.rex-theme-light) .forcal-qn-tomorrow { background-color: #0d2a45; color: #79b8e8; }
}
