﻿.blog-detail_input-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

    .blog-detail_input-section label {
        display: block;
        margin-bottom: 10px;
        font-weight: bold;
        color: #333;
    }

#blog-detail_jsonInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
}

#blog-detail_renderBtn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s !important;
}

    #blog-detail_renderBtn:hover {
        background: #0056b3;
    }

/* Gallery Grid */
.blog-detail_gallery-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.blog-detail_gallery-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s !important;
}

    .blog-detail_gallery-item:hover {
        transform: translateY(-5px);
    }

    .blog-detail_gallery-item img {
        width: 100%;
        aspect-ratio: 16/9;
        object-fit: cover;
        display: block;
        border-radius: 3px;
        margin: 0;
    }

.blog-detail_gallery-text {
    font-size: 14px;
    text-align: center;
}

    .blog-detail_gallery-text p {
        margin-bottom: 0;
        font-weight: 400;
        line-height: 20px;
        margin-top: 5px;
    }

    /* Collection Icon */
    .blog-detail_collection-icon {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: #fff;
        opacity: .4;
        background-image: url(https://otohoangkim-storage.sgp1.cdn.digitaloceanspaces.com/images-icon-removebg-preview-blue.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 70% 70%;
    }

    .blog-detail_collection-icon::before {
        content: "";
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-detail_gallery-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .blog-detail_container {
        padding: 15px;
    }
}

/* Modal Styles */
.blog-detail_modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.blog-detail_modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-detail_close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s !important;
}

    .blog-detail_close:hover {
        color: #bbb;
    }

.blog-detail_slide-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-detail_image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#blog-detail_modalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.custom-gallery-modal-counter{
    margin-bottom: 5px;
    display: block;
}

.blog-detail_image-info {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-align: center;
}

.blog-detail_arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    height: 50px;
    width: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s !important;
    z-index: 1001;
}

    .blog-detail_arrow:hover {
        background: rgba(0,0,0,0.8);
    }

.blog-detail_prev-arrow {
    left: 20px;
}

.blog-detail_next-arrow {
    right: 20px;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {

    .custom-gallery-modal-img{
        width: 100%;
    }
    
    .blog-detail_arrow {
        padding: 12px 16px;
        font-size: 20px;
    }

    .blog-detail_prev-arrow {
        left: 10px;
    }

    .blog-detail_next-arrow {
        right: 10px;
    }

    .blog-detail_close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }

    .blog-detail_image-info {
        bottom: -35px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Loading Animation */
.blog-detail_loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error Message */
.blog-detail_error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #f5c6cb;
}
