/* Smooth fade-in animation for time slots */
@keyframes fadeIn {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.datetimepicker-minutes {
    animation: fadeIn 0.3s ease-in-out;
}

/* Custom Open Dates Styles */
.custom-open-date a,
.custom-open-date span {
    color: #145A32 !important;
}

/* Active/Selected custom date background - dark green */
.custom-open-date.active,
.custom-open-date.selected,
.custom-open-date:active,
.custom-open-date.active a,
.custom-open-date.selected a,
.custom-open-date:active a {
    background-color: #145A32 !important; /* Dark green background */
    color: #fff !important;
    font-weight: bold;
}

/* Keep the small indicator dot for regular custom dates */
.day.custom-open-date:not(.disabled):after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #4caf50;
}

/* Hide the dot when active since background is dark green */
.day.custom-open-date.active:not(.disabled):after {
    display: none !important;
}

/* Override background color for active custom dates - more specific */
.day.custom-open-date.active:not(.disabled),
.day.custom-open-date.selected:not(.disabled),
.day.custom-open-date:active:not(.disabled) {
    background-color: #145A32 !important;
    color: #fff !important;
    font-weight: bold;
}

.custom-open-date:hover,
.custom-open-date:hover a,
.custom-open-date:hover span {
    background-color: #81c784 !important;
    color: #145A32 !important;
}

.custom-open-date {
    background-color: #e8f5e9 !important;
    border: 1px solid #81c784 !important;
}

.custom-open-date .katrine-desktop,
.custom-open-date .katrine-mobile-cnt {
    position: relative;
}

.custom-open-badge {
    display: inline-block;
    padding: 2px 6px;
    background-color: #4caf50;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
}

.custom-open-date .katrine-desktop .custom-open-badge {
    position: absolute;
    top: 0;
    right: 0;
}

.custom-open-date .katrine-mobile-cnt .custom-open-badge {
    display: block;
    margin-top: 5px;
}

/* Tooltip for custom open dates */
.custom-open-date .tool-tip .tooltip-in {
    background-color: #e8f5e9;
    border-color: #81c784;
}

.custom-open-date .tool-tip .tooltip-in:before {
    border-bottom-color: #81c784;
}

/* Mobile styles */
@media (max-width: 768px) {
    .custom-open-date .katrine-mobile-cnt {
        padding-bottom: 25px;
    }
    
    .custom-open-date .katrine-mobile-cnt .custom-open-badge {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
    }
}

#sln-custom-open-dates .sln-custom-dates-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.sln-custom-date-row.sln-custom-date-chip {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e0e6ed;
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.sln-custom-date-row {
  position: relative;
}
.sln-flatpickr-icon {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.sln-custom-date-row .form-control.sln-flatpickr {
  border: none;
  background: transparent;
  font-size: 16px;
  min-width: 120px;
  margin-right: 12px;
  color: #222;
  padding-right: 32px;
}
.sln-custom-date-row .remove-date {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 25px;
  cursor: pointer;
  margin-left: 4px;
  transition: color 0.2s;
}


.sln-custom-date-row .remove-date:hover {
  color: #c0392b;
}
#sln-custom-open-dates .sln-box__actions {
  margin-top: 8px;
}

.add-custom-date {
  background: #2d9cdb;
  color: #fff;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 16px;
  border: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: background 0.2s;
}
.add-custom-date:hover {
  background: #217dbb;
} 

#sln-custom-open-dates > div > div > div > div.col-xs-12.sln-box__actions > button {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sln-custom-open-dates > div > div > div > div.col-xs-12.sln-box__actions > button::after {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom Open Dates Styling */
.sln-custom-date-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.sln-custom-date-chip {
    position: relative;
    width: 180px;
    margin-right: 15px;
}

.sln-custom-date-time {
    display: flex;
    flex: 1;
    gap: 15px;
}

.sln-custom-date-time-start,
.sln-custom-date-time-end {
    flex: 1;
}

.sln-custom-date-time label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.sln-flatpickr-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.sln-time-picker {
    width: 100%;
    padding: 8px 12px;
}

/* Custom styling for flatpickr */
.flatpickr-calendar .custom-open-date {
    background-color: #e8f5e9 !important;
    border-color: #81c784 !important;
    color: #145A32 !important;
}

/* Style for highlighting custom open dates in the frontend calendar */
.day.custom-open-date:not(.disabled) {
    background-color: #e8f5e9 !important;
    border-color: #81c784 !important;
    color: #145A32 !important;
    position: relative;
}

.day.custom-open-date:not(.disabled):after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #4caf50;
}

/* Unavailable/Disabled Time Slots */
.datetimepicker-minutes .minute.sln-unavailable {
    opacity: 0.4;
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
    pointer-events: all !important; /* Allow clicks for tooltip */
}

.datetimepicker-minutes .minute.sln-unavailable:hover {
    background-color: #e0e0e0 !important;
    color: #666 !important;
}

.datetimepicker-minutes .minute.sln-unavailable.showing-tooltip {
    position: relative;
}

.datetimepicker-minutes .minute.sln-unavailable.showing-tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Custom Open Dates Notice Styling */
.sln-custom-dates-notice {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c8 100%);
    border: 1px solid #81c784;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sln-notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sln-notice-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.sln-notice-text {
    font-size: 14px;
    color: #145A32;
    line-height: 1.3;
}

.sln-notice-text strong {
    font-weight: 600;
    color: #0d6f38;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sln-custom-dates-notice {
        padding: 10px 12px;
        margin-bottom: 15px;
    }
    
    .sln-notice-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    
    .sln-notice-icon {
        font-size: 18px;
    }
    
    .sln-notice-text {
        font-size: 13px;
    }
}
