/**
 * Sidebar Modules - Compact & Minimalistic Design
 */

.sidebar-module {
    background: white;
    border-radius: 8px;
    border: 1px solid rgb(224, 224, 224);
    padding: 15px;
    margin-bottom: 20px;
}

.module-title {
    font-size: 16px;
    font-weight: 700;
    color: #27282c;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #6CD3C2;
}

/* Weekly Materials Carousel */
.weekly-materials .carousel {
    position: relative;
}

.material-card-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgb(224, 224, 224);
    padding: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.material-card-horizontal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #6CD3C2;
    text-decoration: none;
}

.material-image-left {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.material-image-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-content-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.material-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.material-card-horizontal .material-title {
    font-size: 14px;
    font-weight: 600;
    color: #27282c;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.material-arrow {
    flex-shrink: 0;
    stroke: #6CD3C2;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.material-card-horizontal:hover .material-arrow {
    opacity: 1;
    transform: translateX(0);
}

.material-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.material-card-horizontal .material-vendor {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-card-horizontal .material-price {
    font-size: 14px;
    font-weight: 700;
    color: #27282c;
    white-space: nowrap;
}

/* Weekly Materials Carousel — buttons top-right next to title */
.weekly-materials {
    position: relative;
}

.weekly-materials .carousel {
    overflow: visible;
}

.weekly-materials .carousel-control-prev,
.weekly-materials .carousel-control-next {
    position: absolute;
    width: 26px;
    height: 26px;
    background: #e5e7eb;
    border-radius: 6px;
    border: none;
    top: -48px;
    transform: none;
    opacity: 1;
    transition: all 0.15s ease;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
}

.weekly-materials .carousel-control-prev:hover,
.weekly-materials .carousel-control-next:hover {
    background: #6CD3C2;
}

.weekly-materials .carousel-control-prev {
    right: 32px;
    left: auto;
}

.weekly-materials .carousel-control-next {
    right: 0;
}

.weekly-materials .carousel-control-prev svg,
.weekly-materials .carousel-control-next svg {
    width: 14px;
    height: 14px;
    stroke: #374151;
    stroke-width: 2.5;
}

.weekly-materials .carousel-control-prev:hover svg,
.weekly-materials .carousel-control-next:hover svg {
    stroke: #fff;
}

.weekly-materials .carousel-control-prev-icon,
.weekly-materials .carousel-control-next-icon {
    display: none;
}

/* Popular Creators */
.creators-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.creator-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.creator-item:hover {
    background: #f8f9fa;
    border-color: rgb(224, 224, 224);
    text-decoration: none;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.creator-info {
    flex: 1;
    min-width: 0;
}

.creator-name {
    font-size: 14px;
    font-weight: 600;
    color: #27282c;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-count {
    font-size: 12px;
    color: #6b7280;
}

/* Weekly Stats */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #27282c;
}

.stat-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-module {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .module-title {
        font-size: 15px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
}
