/* --- Custom Overrides for SB Admin 2 --- */
.error-message {
    color: #e74a3b;
}

.success-message {
    color: #1cc88a;
}

#logo-img {
    max-height: 40px;
    margin-bottom: 1rem;
}

/* --- Calendar Styles (Not covered by SB Admin 2) --- */
.calendar-container {
    margin-top: 20px;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-header h4 {
    margin: 0;
    text-transform: capitalize;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e3e6f0; /* light */
    border: 1px solid #e3e6f0;
}
.calendar-weekday {
    text-align: center;
    font-weight: bold;
    padding: 10px 5px;
    background-color: #f8f9fc; /* Lighter */
}
.calendar-day {
    min-height: 120px;
    padding: 8px;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}
.calendar-day.other-month {
    background-color: #f8f9fc;
    color: #b7b9cc; /* mid */
}
.calendar-day.today {
    background-color: #f0f3ff;
}
.day-number {
    font-weight: bold;
    font-size: 14px;
}
.calendar-event {
    font-size: 12px;
    padding: 3px 6px;
    margin-top: 4px;
    background-color: #1cc88a; /* success */
    color: white;
    border-radius: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.calendar-event.bot-reminder {
    background-color: #4e73df; /* primary */
}
.google-connect-box-small {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fc;
    border-radius: .35rem;
    margin-bottom: 20px;
    border: 1px solid #e3e6f0;
}

/* Modal (used for edits) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1050; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: .3rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.modal-header .close {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    cursor: pointer;
}

/* Action buttons in tables */
.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
}

/* Hide sidebar brand on all viewports as logo is now in topbar */
.sidebar .sidebar-brand {
    display: none !important;
}

/* --- Mobile Layout Overrides --- */
@media (max-width: 767.98px) {
  /* Make the topbar fixed */
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
  }

  /* Add padding to the top of the main content wrapper to prevent overlap */
  #content-wrapper {
    padding-top: 70px; /* Adjust to match new topbar height */
  }

  /* When the sidebar is toggled on mobile, it should appear below the topbar */
  .sidebar {
    padding-top: 70px; /* Adjust to match new topbar height */
    z-index: 1020; /* Below topbar, but above content */
  }
}

/* Custom styles for active sidebar link */
.sidebar-dark .nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-dark .nav-item.active .nav-link span {
    font-weight: 700;
}