﻿.textbox-search div {
    padding: 10px;
}
/*.textbox-search input {
    width: 350px;
}*/

.separate {
    height: 1px;
    border: none;
    background-color: #ebebeb;
}

.text-count-result {
    /*color: #9aa0a6;*/
}

    .text-count-result div {
        color: #9aa0a6;
    }

.search-extra {
    margin-top: 10px;
}

/*@media (max-width:600px) {
    .textbox-search input {
        width: 250px;
    }
}*/

.list-nhanhieu tbody tr.selected {
    background-color: #ffffae
}

.chudoninfo div label {
    width: 60px;
    display: inline-block;
}

.chudoninfo div .mst-link {
    margin-left: 3px;
}

@media (max-width: 768px) {
    .trademark-mobile-card-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .trademark-card {
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .card-header {
        display: flex;
        padding: 10px;
        background-color: #f8f9fa;
        border-bottom: 1px solid #ddd;
        align-items: center;
        flex-wrap: wrap;
    }

    .card-number {
        font-weight: bold;
        margin-right: 5px;
    }

    .card-checkbox {
        margin-right: 5px;
    }

        .card-checkbox input {
            top: 1px;
        }


    .card-so-don {
        margin-right: 15px;
    }

    .card-status {
        margin-left: auto;
        text-align: right;
    }

    .card-body {
        padding: 15px;
    }

    .card-image-and-name {
        display: flex;
        margin-bottom: 15px;
        gap: 10px;
    }

    .card-image {
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #eee;
    }

        .card-image img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

    .card-name {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .card-view-more {
        display: flex;
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .btn-view-more {
        background-color: #f8f9fa;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px 15px;
        font-size: 0.9em;
        cursor: pointer;
        color: #007bff;
    }

    .card-info-row {
        margin-bottom: 10px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

        .card-info-row:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

    .card-label {
        font-weight: bold;
        font-size: 0.9em;
        color: #666;
        margin-bottom: 3px;
    }

    .card-value {
        font-size: 1em;
    }

    .class-details {
        margin-top: 5px;
        font-size: 0.9em;
    }

    .card-actions {
        display: flex;
        gap: 10px;
        margin-top: 15px;
        justify-content: flex-end;
    }

    .trang-thai-subtext {
        font-size: 0.85em;
        margin-top: 3px;
    }
}

#imageSearchFeedbackPanel {
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #b8daff;
    border-radius: 5px;
    background-color: #cce5ff;
    text-align: center;
    box-sizing: border-box;
    color: #004085;
}

    #imageSearchFeedbackPanel p {
        margin: 5px 10px;
        line-height: 2em; /*fix for mobile*/
    }

    #imageSearchFeedbackPanel button:first-child {
        margin-left: 20px;
    }

    #imageSearchFeedbackPanel button {
        margin-right: 5px;
        font-size: 0.8em;
        padding: 2px 5px;
        width: 100px;
    }

    #imageSearchFeedbackPanel.floating-panel {
        position: fixed;
        top: 0;
        width: 100%; /* Đảm bảo panel giữ nguyên chiều rộng */
        z-index: 1000; /* Đảm bảo panel luôn ở trên các thành phần khác */
        margin-top: 0px;
    }

/* View toggle buttons */
.view-toggle-buttons {
    align-items: center;
    margin-left: auto;
}

/* [copilot]: Badge "New" cho view toggle buttons - tạo sự chú ý về tính năng mới */
.view-toggle-new-badge {
    position: absolute;
    top: -12px;
    right: -8px;
    font-size: 10px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 1;
    animation: pulse-new-badge 2s infinite;
    box-shadow: 0 2px 4px rgba(238, 90, 36, 0.4);
}

/* [copilot]: Animation nhấp nháy nhẹ để thu hút sự chú ý */
@keyframes pulse-new-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(238, 90, 36, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(238, 90, 36, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(238, 90, 36, 0.4);
    }
}

.btn-view-toggle {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    transition: all 0.2s ease;
}

    .btn-view-toggle:hover {
        background-color: #f5f5f5;
        border-color: #ccc;
    }

    .btn-view-toggle.active {
        background-color: #007bff;
        border-color: #007bff;
        color: #fff;
    }

        .btn-view-toggle.active:hover {
            background-color: #0056b3;
            border-color: #0056b3;
        }

/* Grid view styles */
.trademark-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.trademark-grid-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

    .trademark-grid-item:hover {
        box-shadow: 0 4px 12px rgba(0,123,255,0.25);
        transform: translateY(-2px);
        border-color: #007bff;
        border-width: 2px;
    }

.trademark-grid-item-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    gap: 8px;
}

.trademark-grid-item-index {
    font-weight: bold;
    color: #666;
    font-size: 0.85em;
}

.trademark-grid-item-status {
    margin-left: auto;
}

.trademark-grid-item-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #fafafa;
    border-bottom: 1px solid #eee;
}

    .trademark-grid-item-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.trademark-grid-item-text-logo {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    text-align: center;
    word-break: break-word;
}

.trademark-grid-item-body {
    padding: 12px;
}

.trademark-grid-item-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trademark-grid-item-info {
    font-size: 0.9em;
    color: #666;
}

    .trademark-grid-item-info > div {
        margin-bottom: 5px;
    }

.trademark-grid-item-so-don {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
}

    .trademark-grid-item-so-don a {
        color: #007bff;
        text-decoration: underline;
    }

        .trademark-grid-item-so-don a:hover {
            text-decoration: underline;
        }

.trademark-grid-item-classes {
    color: #555;
}

.trademark-grid-item-date {
    color: #888;
}

.trademark-grid-item-expire,
.trademark-grid-item-tien-trinh {
    font-size: 0.85em;
    font-style: italic;
}

.trademark-grid-item-owner {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trademark-grid-item-actions {
    padding: 10px 12px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Responsive grid */
@media (max-width: 576px) {
    .trademark-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .trademark-grid-item-image {
        height: 150px;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .trademark-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .trademark-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .trademark-grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Gallery view styles */
.trademark-gallery-container {
    padding: 10px 0;
}

.trademark-gallery-header {
    margin-bottom: 15px;
    padding: 5px 0;
}

.trademark-gallery-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #555;
}

    .trademark-gallery-select-all input[type="checkbox"] {
        width: 16px;
        height: 16px;
cursor: pointer;
    }

.trademark-gallery-items {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

/* <!-- [copilot]: Sử dụng flexbox column để đảm bảo phần thông tin nhóm luôn ở bottom --> */
.trademark-gallery-item {
    position: relative;
    width: 100%;
    min-width: 0;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
 display: flex;
    flex-direction: column;
    /* <!-- [copilot]: Chiều cao cố định để tất cả các item có cùng kích thước --> */
    height: 100%;
}

    .trademark-gallery-item:hover {
        border-color: #007bff;
        box-shadow: 0 4px 12px rgba(0,123,255,0.25);
        transform: translateY(-3px);
    }

/* <!-- [copilot]: Header row với checkbox và status cùng một dòng, dùng flexbox --> */
.trademark-gallery-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    min-height: 24px;
    /* <!-- [copilot]: Header không tự động grow --> */
    flex-shrink: 0;
}

.trademark-gallery-checkbox {
    display: flex;
    align-items: center;
}

    .trademark-gallery-checkbox input[type="checkbox"] {
        width: 14px;
  height: 14px;
        cursor: pointer;
        margin: 0;
    }

.trademark-gallery-item.selected {
    border-color: #007bff;
border-width: 2px;
}

.trademark-gallery-status {
    display: flex;
    align-items: center;
    transform: scale(0.75);
    transform-origin: center right;
    margin-left: auto;
}

/* <!-- [copilot]: Image wrapper chiếm không gian còn lại, logo sẽ được căn giữa trong vùng này --> */
.trademark-gallery-image-wrapper {
    width: 100%;
    /* <!-- [copilot]: Tự động grow để chiếm không gian còn lại giữa header và phần thông tin nhóm --> */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    /* <!-- [copilot]: Đảm bảo không bị overflow --> */
    overflow: hidden;
}

  .trademark-gallery-image-wrapper:hover {
 text-decoration: none;
    }

    .trademark-gallery-image-wrapper img {
        max-width: 100%;
        max-height: 100%;
      object-fit: contain;
    }

.trademark-gallery-text-logo {
    font-size: 0.75em;
    font-weight: bold;
    color: #333;
    text-align: center;
    word-break: break-word;
}

/* [copilot]: Hiển thị nhóm sản phẩm/dịch vụ luôn ở bottom - không tự động grow */
.trademark-gallery-classes {
    font-size: 0.7em;
    color: #666;
    text-align: center;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid #eee;
    background-color: #fafafa;
    /* <!-- [copilot]: Đảm bảo phần này luôn ở bottom, không tự động grow --> */
    flex-shrink: 0;
    /* <!-- [copilot]: Đảm bảo được fixed ở bottom --> */
    margin-top: auto;
}

/* Tooltip styles */
.trademark-gallery-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    padding: 0;
    overflow: hidden;
}

.trademark-gallery-item:hover .trademark-gallery-tooltip {
    display: block;
}

/* Adjust tooltip position for items near edges */
.trademark-gallery-item:nth-child(-n+5) .trademark-gallery-tooltip {
    left: 0;
    transform: translateX(0);
}

.trademark-gallery-item:nth-last-child(-n+5) .trademark-gallery-tooltip {
    left: auto;
    right: 0;
    transform: translateX(0);
}

/* Tooltip arrow */
.trademark-gallery-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.trademark-gallery-tooltip::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 11px 11px 0 11px;
    border-style: solid;
    border-color: #ddd transparent transparent transparent;
}

.trademark-gallery-tooltip-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    border-bottom: 1px solid #eee;
    padding: 10px;
    box-sizing: border-box;
}

    .trademark-gallery-tooltip-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.trademark-gallery-tooltip-text-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.trademark-gallery-tooltip-info {
    padding: 12px;
}

.trademark-gallery-tooltip-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

.trademark-gallery-tooltip-row {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 4px;
    word-break: break-word;
}

    .trademark-gallery-tooltip-row:last-child {
        margin-bottom: 0;
    }

/* [copilot]: Label cho các trường thông tin trong tooltip */
.trademark-gallery-tooltip-label {
    font-weight: bold;
    color: #555;
}

/* [copilot]: Link trong tooltip */
.trademark-gallery-tooltip-link {
    color: #007bff;
    text-decoration: none;
}

    .trademark-gallery-tooltip-link:hover {
        text-decoration: underline;
    }

/* [copilot]: Địa chỉ trong tooltip - font nhỏ hơn và in nghiêng */
.trademark-gallery-tooltip-address {
    font-size: 0.85em;
    font-style: italic;
    color: #888;
    padding-left: 10px;
}

/* Responsive adjustments for gallery */
@media (max-width: 576px) {
.trademark-gallery-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

    /* [copilot]: Ẩn tooltip hover trên mobile - người dùng click vào logo để xem detail */
    .trademark-gallery-tooltip {
        display: none !important;
    }

    .trademark-gallery-item-header {
        padding: 3px 4px;
        min-height: 20px;
    }

    .trademark-gallery-checkbox input[type="checkbox"] {
        width: 12px;
        height: 12px;
    }

    .trademark-gallery-status {
        transform: scale(0.65);
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .trademark-gallery-items {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .trademark-gallery-items {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (min-width: 1200px) {
    .trademark-gallery-items {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 10px;
    }
}

/* [copilot]: Số thứ tự của gallery item */
.trademark-gallery-index {
    font-size: 0.7em;
    color: #666;
    margin-left: 4px;
}

.trademark-gallery-open-new-tab {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .trademark-gallery-open-new-tab:hover {
        opacity: 1;
    }

.trademark-grid-item-so-don a.open-new-tab {
    position: relative;
    bottom: 4px;
    left: 4px;
}

.trademark-link-on-title
{
    color: inherit;
    text-decoration: none;
}

/*class detail page*/
table.list-nhanhieu td.mau-nhan img {
    /* width: 100%; */
    max-width: 200px;
    max-height: 60px;
    height: auto;
}
