﻿.image-search-box {
    position: relative;
    background: rgba(var(--color-search-box-rgb, 244, 126, 18), 0.20);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(var(--color-search-box-rgb, 244, 126, 18), 0.40);
    border-radius: 22px;
    padding: 20px 20px 20px;
    box-shadow: 0 8px 24px rgba(var(--color-search-box-rgb, 244, 126, 18), 0.15);
}
.background {
    background-color: #640b0f!important;
}
/* Badge Tìm ảnh nằm cạnh trên, căn giữa */
.image-search-label {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-button, #f47e12);
    color: white;
    font-weight: 800;
    font-size: 15px;
    padding: 7px 22px;
    border-radius: 999px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 5px 14px rgba(var(--color-button-rgb, 244, 126, 18), 0.38);
}

.image-search-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.image-action-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 16px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .image-action-card:hover {
        background: rgba(var(--color-button-rgb, 244, 126, 18), 0.08);
        transform: translateY(-2px);
    }

.image-action-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(var(--color-button-rgb, 244, 126, 18), 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--color-button-rgb, 244, 126, 18), 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

    .image-action-icon span {
        color: var(--color-button, #f47e12);
    }

.image-action-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.image-action-title {
    font-size: 18px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.image-action-desc {
    font-size: 14px;
    color: white;
    opacity: 0.82;
    line-height: 1.2;
}

/* Nếu còn CSS cũ của area-2 đè màu thì override lại */
.image-search-box,
.area-2.boxed-text.image-search-box {
    background: rgba(var(--color-search-box-rgb)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    box-shadow: 0 8px 24px rgba(var(--color-search-box-rgb, 244, 126, 18), 0.15) !important;
}
    .area-2.boxed-text.image-search-box .mdi {
        color: var(--color-button, #f47e12) !important;
    }
.logo{
    display:flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 10px;

}
.logo1 {
    width: 200px;
    object-fit: contain;
}
.logo2{
    width: 250px;
    object-fit: contain;
    margin-bottom: 10px;
}
.logo3 {
    width: 400px;
    object-fit: contain;
    margin-top:30px;
}
.anh1 {
    width: 200px;
    object-fit: contain;
}
.anh2 {
    width: 200px;
    object-fit: contain;
}
.footage {
    background: white;
    border-radius: 15px;
    padding: 5px 20px;
    max-width: fit-content;
}
.footer1 {
    display: flex;
    justify-content: center !important;
    text-align: center !important;
}

/* Mobile */
@media (max-width: 576px) {
    .logo{
        justify-content: space-between;
    }
    .image-search-box {
        padding: 14px 14px 16px;
        border-radius: 20px;
    }

    .image-search-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .image-action-card {
        gap: 8px;
        padding: 8px;
    }

    .image-action-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .image-action-title {
        font-size: 14px;
    }

    .image-action-desc {
        font-size: 11px;
    }

    .image-search-label {
        font-size: 14px;
        padding: 6px 18px;
    }
    .logo1{
        width: 150px;
    }
    .logo2 {
        width: 150px;
    }
    .anh1 {
        width: 80px;
    }

    .anh2 {
        width: 80px;
    }
    .background {
        background: url("/image/bg_mobile.png") !important;
        background-size: contain !important;
    }
    .logo3{
        width: 180px;
    }
    .area-1{
        text-align: center;
        margin-bottom: 30px;
    }
}
@media (max-width: 400px) {
    .logo1 {
        width: 120px;
    }

    .logo2 {
        width: 120px;
    }

    .anh1 {
        width: 60px;
    }

    .anh2 {
        width: 60px;
    }

    .logo3 {
        width: 150px;
    }
}
/* ── Download bar cố định (tất cả kích thước) – 2 hàng ── */
.download-images.download-fixed {
    position: fixed;
    left: 50%;
    bottom: calc(18px + var(--dl-bar-lift, 0px));
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 22px 10px;
    border-radius: 16px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.07);
    display: flex !important;
    align-items: center;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
    min-width: 340px;
    max-width: 370px;
}

/* Hàng 1 – select + button (flex items tự chia nhau) */
.download-images.download-fixed > select {
    flex-shrink: 0;
    font-size: 14px;
    max-width: 110px;
    cursor: pointer;
}
.download-images.download-fixed > button.btn {
    flex-shrink: 0;
}

/* Hàng 2 – inner div (checkbox + text) chiếm full width → xuống hàng */
.download-images.download-fixed > div {
    flex-basis: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 4px;
}
.download-images.download-fixed > div > input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}
.download-images.download-fixed > div > span {
    margin: 0 !important;
    font-size: 13px;
    white-space: normal;
    line-height: 1.4;
    text-align: left;
}

.download-process-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    min-width: 280px;
    max-width: 360px;
    display: none;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(233, 90, 30, 0.2);
    animation: downloadToastSlideIn 0.25s ease;
}

    .download-process-toast.show {
        display: flex;
    }

/* ── Circular progress ring ── */
.dl-ring-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}
.dl-ring-svg {
    display: block;
    transform: rotate(-90deg);
}
.dl-ring-track {
    fill: none;
    stroke: #ffe1d3;
    stroke-width: 5;
}
.dl-ring-fill {
    fill: none;
    stroke: #e95a1e;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 125.66;
    stroke-dashoffset: 125.66;
    transition: stroke-dashoffset 0.35s ease;
}
.dl-ring-fill.done {
    stroke: #22c55e;
}
.dl-ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #e95a1e;
    pointer-events: none;
}
.dl-ring-pct.done {
    color: #22c55e;
    font-size: 18px;
}

.download-toast-title {
    font-size: 15px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 4px;
}

.download-toast-desc {
    font-size: 13px;
    color: #777777;
    line-height: 1.4;
}

@keyframes downloadToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .download-process-toast {
        left: 12px;
        right: 12px;
        bottom: 80px; /* tránh đè lên download bar khi cả hai cùng hiện */
        max-width: none;
        min-width: auto;
    }

    /* Mobile: full-width thay vì center transform */
    .download-images.download-fixed {
        left: 10px;
        right: 10px;
        bottom: calc(12px + var(--dl-bar-lift, 0px));
        transform: none;
        min-width: 0;
        max-width: none;
        padding: 12px 12px 10px;
        gap: 6px 10px;
    }
    .download-images.download-fixed > button.btn {
        font-size: 13px;
        padding: 7px 14px;
        border-radius: 50px;
        margin-top: 0px;
    }
    .download-images.download-fixed > select {
        font-size: 13px;
        max-width: 95px;
    }
    .download-images.download-fixed > div > span {
        font-size: 12px;
    }
}
/* === Video trong lightbox === */
/*.pswp-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.img-item img, .img-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-item .play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

    .img-item .play-badge svg {
        width: 42px;
        height: 42px;
        opacity: .9;
        filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
    }*/

/* ── Mobile polish ──────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Ảnh nhẹ hơn, bo góc nhỏ hơn */
    .grid-container a {
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        border-radius: 6px !important;
        padding: 2px !important;
        margin-bottom: 6px;
    }

    /* Card body ít padding hơn */
    #grid-image .card-body {
        padding: 10px 8px !important;
    }
    #upload-file-image .card-body,
    #camera-image .card-body {
        padding: 10px 8px !important;
    }

    /* Gap grid nhỏ hơn */
    .grid-container {
        column-gap: 6px !important;
    }

    /* Checkbox size dễ bấm */
    .img-item input[type="checkbox"] {
        width: 22px !important;
        height: 22px !important;
    }

    /* Nút tải về – chiều rộng thoải mái */
    .download-images .btn {
        min-width: 0 !important;
        padding: 7px 14px;
        font-size: 14px;
        margin-top: 15px;
    }

    /* Policy text nhỏ hơn */
    .policy-camera {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Dropzone thấp hơn trên mobile */
    .dropzone-area {
        height: 45vh;
    }

    /* Camera nhỏ hơn */
    .camera {
        width: 100%;
        margin: 10px auto;
    }
}

.lg-youtube {
    visibility: visible !important;
}

.lg-outer.lg-css3 .lg-current.lg-has-video {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding-bottom: 0px !important;
}