body {
    font-family: 'Poppins', sans-serif;
}

/* Text-based Logo Styles */
.navbar-brand.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.25rem; /* Increased by 50% from 1.5rem */
}

.logo-buzz {
    color: #343a40; /* Dark grey */
}

.logo-iq {
    color: #007bff; /* Bootstrap primary blue */
}

.logo-ai {
    color: #6c757d; /* Muted grey */
    font-weight: 400;
    font-size: 1.2rem;
}

/* Add custom styles for the new post cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Make cards smaller */
    gap: 15px; /* Reduce gap between cards */
}

.post-card {
    transition: box-shadow .3s;
}

.post-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.08);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.post-content {
    min-height: 60px;
}

.result-message {
    font-style: italic;
    color: #6c757d;
}

.post-actions {
    text-align: right;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.status-scheduled {
    background-color: #007bff; /* Blue */
}

.status-posted {
    background-color: #28a745; /* Green */
}

.status-failed {
    background-color: #dc3545; /* Red */
}

.card-header-clickable {
    cursor: pointer;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,.125);
    background-color: #f8f9fa;
}

.card-header-clickable:hover {
    background-color: #e9ecef;
}

.card-header-clickable .fa-chevron-down {
    transition: transform 0.3s ease;
}

.card-header-clickable[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* User Status Toggle Switch */
.status-toggle.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  vertical-align: middle;
}

.status-toggle.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.status-toggle.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #dc3545; /* Red for inactive by default */
  -webkit-transition: .4s;
  transition: .4s;
}

.status-toggle.switch .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

.status-toggle.switch input:checked + .slider {
  background-color: #28a745; /* Green for active */
}

.status-toggle.switch input:focus + .slider {
  box-shadow: 0 0 1px #28a745;
}

.status-toggle.switch input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.status-toggle.switch .slider.round {
  border-radius: 34px;
}

.status-toggle.switch .slider.round:before {
  border-radius: 50%;
}

/* Compact Post Card Styles */
.post-card .card-body {
    padding: 0.8rem; /* Reduce padding */
    font-size: 0.9rem; /* Reduce base font size */
}

.post-card .card-img-top {
    max-height: 150px; /* Limit image height */
    object-fit: cover; /* Ensure image covers the area nicely */
}

.post-card .card-text {
    font-size: 0.85rem; /* Smaller text for content */
    margin-bottom: 0.5rem; /* Reduce margin */
}

.post-card .post-status-badge {
    font-size: 0.7rem; /* Smaller status badge */
    padding: 4px 8px;
}

.post-card .post-actions .btn {
    font-size: 0.75rem; /* Smaller buttons */
    padding: 0.2rem 0.4rem;
}

.welcome-message {
    font-size: 1.25rem; /* Reduced by 50% from h1 default */
}

.scrollable-accounts-box {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Force correct Bootstrap navbar behavior for responsive display */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-toggler {
        display: none !important;
    }
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .navbar-brand.logo {
        font-size: 1.8rem; /* Adjust logo size for smaller screens */
    }

    .posts-grid {
        grid-template-columns: 1fr; /* Stack posts in a single column on mobile */
    }

    .container, .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

}

/* Carousel Preview Styles */
.carousel-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.carousel-preview-header h6 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#carousel-images-grid {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 10px;
    background-color: #f8f9fa;
}

.carousel-image-item {
    position: relative;
    margin-bottom: 10px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.carousel-image-item img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s;
}

.carousel-image-item:hover img {
    border-color: #007bff;
}

.carousel-image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.carousel-image-remove:hover {
    background: rgba(220, 53, 69, 1);
}

.carousel-image-order {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

#image-count-badge {
    font-size: 0.75rem;
}

/* Empty state for carousel */
.carousel-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

.carousel-empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Drag and Drop Styles for Carousel */

.carousel-image-item:active {
    cursor: grabbing;
}

.carousel-image-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
}

.carousel-image-item.drag-over {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.carousel-image-item .drag-handle {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.carousel-image-item:hover .drag-handle {
    opacity: 1;
}

.carousel-drop-zone {
    min-height: 4px;
    background: transparent;
    transition: all 0.2s;
    margin: 2px 0;
}

.carousel-drop-zone.active {
    background: #007bff;
    min-height: 8px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0,123,255,0.5);
}
