﻿.tickets-attachment-component-wrapper .attachments-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tickets-attachment-component-wrapper .attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tickets-attachment-component-wrapper .attachments-header h2 {
    margin: 0;
    color: #172b4d;
}

.tickets-attachment-component-wrapper #attachment-count {
    background-color: var(--sds-grey-300, #F0F4F4);
    color: var(--sds-grey-800, #2D3232);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    display: inline-block;
}

.tickets-attachment-component-wrapper .attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tickets-attachment-component-wrapper .attachment-card {
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    width: 18%;
    height: 125px;
    text-align: center;
    background-color: white;
    position: relative;
    box-shadow: var(--ds-shadow-raised, 0 1px 1px rgba(9, 30, 66, 0.31), 0 0 1px 0 rgba(9, 30, 66, 0.31));
    display: flex;
    flex-direction: column;
}

.tickets-attachment-component-wrapper .attachment-card .attachment-card-body {
    position: relative;
    flex-grow: 1;
}

.tickets-attachment-component-wrapper .attachment-card .attachment-card-body .overlay-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1;
}

.tickets-attachment-component-wrapper .attachment-card .attachment-card-body .attachment-preview-img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: 4px;
}

.tickets-attachment-component-wrapper .attachment-card:hover .overlay-wrapper {
    opacity: 1;
    visibility: visible;
    cursor: pointer;
}

.tickets-attachment-component-wrapper .attachment-card .attachment-card-body .remove-btn {
    cursor: pointer;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    position: absolute;
    top: 5px;
    right: 5px;
}

.tickets-attachment-component-wrapper .attachment-card:hover .attachment-card-body .remove-btn {
    opacity: 1;
    visibility: visible;
}

.tickets-attachment-component-wrapper .attachment-card-footer {
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 40px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.tickets-attachment-component-wrapper .attachment-name {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: start;
}

.tickets-attachment-component-wrapper .attachment-datetime {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
}

.tickets-attachment-component-wrapper #add-attachment-btn:hover {
    cursor: pointer;
    background-color: var(--sds-grey-300, #F0F4F4);
    border-radius: 4px;
}

.tickets-attachment-component-wrapper .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: white;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}


/* attachment preview */
.tickets-attachment-component-wrapper .preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 15, 15, 0.95);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    padding: 20px;
}

.tickets-attachment-component-wrapper .preview-modal.hidden {
    display: none;
}

.tickets-attachment-component-wrapper .modal-header {
    display: flex;
    justify-content: space-between;
    color: rgb(199, 209, 219);
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tickets-attachment-component-wrapper .file-name {
    font-weight: 400;
}

.tickets-attachment-component-wrapper .close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    color: rgb(199, 209, 219);
    cursor: pointer;
}

.tickets-attachment-component-wrapper #download-attachment-file > svg *{
    fill: #FFF;
    color: #FFF;
}

.tickets-attachment-component-wrapper .modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tickets-attachment-component-wrapper .modal-image {
    max-height: 80vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
}

.tickets-attachment-component-wrapper .nav-btn {
    position: absolute;
    background: transparent;
    border: none;
    font-size: 24px;
    color: rgb(199, 209, 219);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.tickets-attachment-component-wrapper #prev-btn {
    left: 20px;
    opacity: 0;
    pointer-events: none;
    /* prevent accidental clicks */
    transition: opacity 0.3s ease;
}

.tickets-attachment-component-wrapper #next-btn {
    right: 20px;
    opacity: 0;
    pointer-events: none;
    /* prevent accidental clicks */
    transition: opacity 0.3s ease;
}

.tickets-attachment-component-wrapper #preview-modal:hover #next-btn,
.tickets-attachment-component-wrapper #preview-modal:hover #prev-btn,
.tickets-attachment-component-wrapper #preview-modal:hover .modal-header {
    opacity: 1;
    pointer-events: auto;
}

#tickets-attachment-wrapper > .activity-wrapper > .card-body{
    min-height: 165px;
}