/* Notification Alert Badge */

.notification-wrapper {
    position: relative;
    margin-right: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;

}

.notification-wrapper img:hover {
    opacity: .75;
}

.notification-icon {
    flex: 0 0 auto;
    margin-right: 10px;
    color: var(--icon-muted-, #6b7280);
}

.notification.unread .notification-icon {
    color: var(--accent-color-);
}


.notification-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--red-accent-color-);
    color: white;
    font-size: 12px;
    font-weight: bold;
    height: 25px;
    width: 25px;
    cursor: default;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Notifications */
.notifications {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.notification-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}

.notification-load-more {
    min-width: 120px;
}

.notification {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border-radius: 6px;
    overflow: hidden;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: border 150ms ease, background 150ms ease;
}

.notification.unread {
    background-color: white;
    box-shadow: 0 0 5px var(--rail-border);
    border-left: 6px solid var(--accent-color-);
}

.notification.unread:hover {
    background: white;
    box-shadow: 0 0 5px var(--rail-border);
    border-left: 6px solid var(--accent-color-);
}

.notification:hover {
    border: 1px solid var(--hover-gray-);
    box-shadow: 0 0 5px var(--rail-border);
    background: #ffffff50;
    cursor: pointer;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
}

.task-filter-toggles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.task-checkbox-wrapper {
    margin-left: auto;
    gap: 10px;
}

.task-checkbox-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    font: inherit;
    color: #334155;
}

.task-checkbox-toggle input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--accent-color-);
    cursor: pointer;
}

.task-checkbox-label {
    font-size: 14px;
}

.notification-content {
    flex: 1;
    overflow: hidden;
    gap: 5px;
    display: flex;
    flex-direction: column;
}

.notification-btn {
    background: none;
    border-radius: 50%;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

.mark-read {
    font-size: 12px;
    box-shadow: inset 0 0 1px 1px #0000002a;
}

.create-task {
    background-color: lightgray;
    border-color: transparent;
    color: white;
    box-shadow: none;
}

.create-task:hover {
    background-color: var(--blue-highlight-color-);
    color: white;
}

.mark-read:hover {
    background-color: var(--red-accent-color-);
}

.mark-read.notification-unread:hover {
    background-color: var(--hover-gray-);
}

.customer {
    font-size: 12px;
    text-decoration: underline;
}

.notification-content .customer,
.request-id {
    font-weight: bold;
    cursor: pointer;
}

.notification-content .preview {
    font-size: 14px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: calc(3em + 15px);
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 5px;
}

.notification-notice {
    padding: 25px 10px;
    opacity: 0.7;
}

.part-name {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: border 150ms ease, background 150ms ease;
    background-color: white;
    box-shadow: 0 0 5px var(--rail-border);
    border-left: 6px solid var(--blue-highlight-color-);
}

.task-card:hover {
    border: 1px solid transparent;
    box-shadow: 0 0 5px var(--rail-border);
    background: white;
    border-left: 6px solid var(--blue-highlight-color-);
    cursor: pointer;
}

.task-card.is-due-today,
.task-card.is-due-today:hover {
    border-left: 6px solid var(--red-accent-color-);
}

.task-card.is-completed {
    opacity: 0.65;
}

.task-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--accent-color-);
}

.task-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
    flex: 1;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
    opacity: 0.8;
    flex-wrap: wrap;
}

.task-request-link {
    color: var(--blue-highlight-color-);
    text-decoration: underline;
    text-underline-offset: 2px;
    width: fit-content;
}

.task-request-link:hover {
    color: var(--accent-color-);
}

.tasks-panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tasks-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.task-toggle-wrapper {
    margin-left: 0;
}

.task-notification-badge {
    left: auto;
    right: -8px;
}

#task-count {
    background: var(--accent-color-);
}


.task-add-scratch {
    border: none;
    background: transparent;
    color: var(--blue-highlight-color-);
    font-weight: 700;
    text-underline-offset: 2px;
}

.task-add-scratch:hover {
    color: var(--accent-color-);
    background: transparent;
}

.task-clear-completed {
    padding: 6px 10px;
    font-size: 12px;
}

.task-clear-completed:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#task-create-wrapper,
#task-detail-wrapper {
    z-index: 50;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 12px 56px;
}

#task-create-popup,
#task-detail-popup {
    width: 620px;
    max-width: 95vw;
    position: relative;
    overflow: visible;
    max-height: none;
    height: auto;
    margin: 50px auto;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.25);
}

#task-create-container,
#task-detail-container {
    width: 100%;
    padding: 26px 30px;
    box-sizing: border-box;
}

.task-popup-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.task-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-form-label {
    font-size: 13px;
    opacity: 0.9;
}

.task-popup-form select,
.task-popup-form input[type="date"],
.task-popup-form input[type="text"],
.task-popup-form textarea {
    border: 1px solid #c9d0d7;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
}

.task-popup-form input[type="text"]:focus,
.task-popup-form input[type="date"]:focus,
.task-popup-form textarea:focus,
.task-popup-form select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #c9defc;
}

.task-popup-form textarea {
    resize: vertical;
    min-height: 90px;
}

.task-chat-quote {
    margin: 0;
    border-left: 4px solid #c9d8ee;
    background: #edf4ff;
    padding: 10px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.task-detail-notes {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    min-height: 60px;
    background: #ffffffc2;
    white-space: pre-wrap;
}

.task-copy-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-copy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    padding: 8px 10px;
    background: #f8fbff;
    cursor: pointer;
}

.task-copy-item:hover {
    border-color: #b6caea;
    background: #eef5ff;
}

.task-copy-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.task-copy-value {
    font-size: 13px;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
}

.task-spreadsheet-note {
    margin: 2px 0 0;
    font-size: 12px;
    color: #b45309;
    font-weight: 600;
}

.task-complete-btn {
    margin-top: 2px;
    border-radius: 0;
}

.task-complete-btn.notification-unread {
    box-shadow: inset 0 0 1px 1px #0000002a;
}

#task-detail-complete:disabled,
#task-detail-save:disabled,
#task-create-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/*****************************/
/*MOBILE MOBILE MOBILE MOBILE*/
/*****************************/

@media (max-width: 900px) {

    #task-create-wrapper,
    #task-detail-wrapper {
        padding: 12px 8px 36px;
    }

    .notification-badge {
        top: 7px;
        left: 7px;
    }

    #task-count {
        right: 7px;
        left: unset;
    }

    #task-create-container,
    #task-detail-container {
        padding: 20px;
    }
    
    .notification-btn {
        width: 24px;
        height: 24px;
    }



}