/* 3. List Styling */
.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 400px;
    margin: 0;
    overflow-y: auto;
}

.product-list .no-sales-text,
#images-tab-content .images-container ul>h4 {
    text-align: center;
    margin: 64px 0 0;
    color: var(--color-shade-dark-500);
    font-weight: 500;
    width: 100%;
}

/* 4. List Item (Card) Styling */
.product-item {
    background-color: var(--md-sys-color-surface);
    border-radius: 0;
    padding: 16px;
    /*
  box-shadow: var(--md-sys-elevation-1);
  */

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
}

.product-item:hover {
    box-shadow: var(--md-sys-elevation-2);

    /*cursor: pointer;

   Subtle border on hover for accessibility */
    border-color: var(--md-sys-color-outline-variant);
}

.product-item .p-detail.serial-number {
    display: none;
}

.product-item.project-product-type-1 .p-detail.serial-number {
    display: flex;
}

/* 5. Content Layout */
.product-item .p-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    width: 100%;
    flex-grow: 1;
    flex-shrink: 0;
}

.product-item .p-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    flex-grow: 1;
    margin: 0 0 8px;
}

/* Badges for Product Type */
.product-item .p-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 16px;
    border-width: 1px;
    border-color: var(--default-frame-border-color);
    border-style: solid;
    box-shadow: var(--default-card-shadow);
    border-radius: calc(var(--default-card-border-radius) / 1.4);

}

.product-item .type-product {
    /**/
    background-color: var(--badge-product-bg);
    color: var(--badge-product-text);

    color: var(--color-shade-dark-700);
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;

    flex-shrink: 0;
}

.product-item .type-mjete {
    background-color: var(--badge-mjete-bg);
    color: var(--badge-mjete-text);
}

/* Meta Info (Serial, Qty, Date) */
.product-item .p-meta-info {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 4px;
    /* Slight spacing on mobile wrap */
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.875rem;
}

.product-item .p-detail strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
}

.product-item .p-date {
    font-size: 0.75rem;
    opacity: 0.8;
}



#scheduled-event-finished-form {
    min-width: 700px;
}

#scheduled-event-finished-form .tab-content {
    min-height: 400px;
}

#scheduled-event-finished-form .tittle {
    margin: 0 0 calc(var(--default-items-margin) * 3);
}

#scheduled-event-finished-form h3 {
    margin-top: 32px;
}

#scheduled-event-finished-form .tittle .above-tittle {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: calc(100% - 64px);
}

#scheduled-event-finished-form .tittle .above-tittle>div {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

#scheduled-event-finished-form .tittle .above-tittle>div span {
    color: var(--color-shade-dark-700);
    fill: var(--color-shade-dark-700);
    font-size: 0.9em;
}

#scheduled-event-finished-form .tittle .above-tittle>div span {
    color: var(--color-shade-dark-700);
    fill: var(--color-shade-dark-700);
    font-size: 0.9em;
}

#scheduled-event-finished-form .tittle .above-tittle>div span svg {
    width: 16px;
    height: 16px;
    fill: inherit;
}

#scheduled-event-finished-form .tittle h2 {
    margin-block-start: 0.5em;
    margin-block-end: 0;
}

#images-tab-content .images-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

#images-tab-content .images-container .opened-image {
    width: 100%;
    height: 400px;
    display: none;
}

#images-tab-content .images-container.have-images .opened-image {
    display: block;
}

#images-tab-content .images-container .opened-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#images-tab-content .images-container ul {
    width: 100%;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0;
}

#images-tab-content .images-container ul li {
    width: 64px;
    height: 64px;
}

#images-tab-content .images-container ul li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 6. Responsive Adjustments */
@media (max-width: 600px) {
    .product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .p-meta-info {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        font-size: 0.8rem;
    }
}