/**
 * Paint Detail Modal Styles
 * Includes image carousel and paint information layout
 */

/* Modal body layout - two columns on desktop */
.paint-detail-body {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: 1.5rem;
    max-height: 80vh;
}

/* Carousel Section */
.paint-detail-carousel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.carousel-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.carousel-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    z-index: 10;
    opacity: 0.7;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.carousel-prev {
    left: 0.5rem;
}

.carousel-next {
    right: 0.5rem;
}

/* Carousel Counter */
.carousel-counter {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
}

/* Carousel Thumbnails */
.carousel-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: thin;
}

.carousel-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: var(--border-color, #ccc);
    border-radius: 3px;
}

.carousel-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--bg-secondary, #f5f5f5);
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.7;
}

.carousel-thumbnail:hover {
    opacity: 1;
}

.carousel-thumbnail.active {
    border-color: var(--primary-color, #3b82f6);
    opacity: 1;
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Paint Info Section */
.paint-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.paint-detail-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
}

/* Override common styles for modal layout - add flex for icon alignment */
.paint-detail-info .paint-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.paint-detail-info .paint-car-info {
    margin-bottom: 0;
}

.paint-detail-info .paint-stats {
    flex-wrap: wrap;
}

/* Description Section */
.paint-detail-description {
    margin-top: 0.5rem;
}

.paint-detail-description h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.paint-detail-description .description-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary, #1a1a1a);
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Actions */
.paint-detail-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.paint-detail-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 20px;
}


/* Responsive - stack vertically on mobile */
@media (max-width: 768px) {
    .paint-detail-body {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .paint-detail-carousel {
        order: 1;
    }

    .paint-detail-info {
        order: 2;
        max-height: 50vh;
    }

    .carousel-main {
        aspect-ratio: 16 / 9;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .carousel-thumbnail {
        width: 50px;
        height: 34px;
    }

    .paint-detail-description .description-content {
        max-height: 150px;
    }
}

/* Make modal wider for paint detail */
.paint-detail-modal .modal-content--wide {
    max-width: 1500px;
    width: 95vw;
}
