.recently-viewed {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.section-title {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.view-all-link {
    font-size: 0.875rem;
    color: #222f6e;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.view-all-link:hover {
    color: #1a2a60;
    text-decoration: none;
}

.recent-units-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
}

.recent-units-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.recent-unit-card {
    min-width: 220px;
    flex: 0 0 auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-unit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #eef1fb;
    border-color: #222f6e;
    color: #333;
}

.recent-unit-card .unit-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #222f6e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.recent-unit-info {
    flex: 1;
}

.recent-unit-info .unit-name {
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewed-timestamp {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #222f6e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background-color: #222f6e;
    color: white;
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .recent-unit-card {
        min-width: 180px;
    }

    .viewed-timestamp {
        display: none;
    }
}

/* Animation for recently viewed units */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recent-unit-card {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index) * 0.1s);
    opacity: 0;
}
