﻿/* =========================================
   Updates
   ========================================= */

.updates-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
}


.updates-card-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}


.updates-card-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}


.updates-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(151, 68, 243, .12);
    border: 1px solid rgba(151, 68, 243, .25);
    color: var(--purple-light);
    font-size: 16px;
}


.updates-info {
    min-width: 0;
}


.updates-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}


    .updates-title-row h2 {
        margin: 0;
        color: var(--text);
        font-size: 14px;
        font-weight: 700;
    }


.updates-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    background: rgba(151, 68, 243, .12);
    color: var(--purple-light);
    font-size: 9px;
    font-weight: 600;
}


.updates-info p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
}


.updates-open-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #151a21;
    color: #dfe1e5;
    font-size: 10px;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

    .updates-open-btn i {
        color: var(--purple-light);
        font-size: 10px;
    }


    .updates-open-btn:hover {
        background: #191f27;
        border-color: #3a404a;
        color: #fff;
    }


/* =========================================
   Modal
   ========================================= */

.updates-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
}


    .updates-modal.is-visible {
        visibility: visible;
        opacity: 1;
    }


.updates-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
}


.updates-modal-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0d1218;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .55);
    transform: translateY(12px) scale(.985);
    transition: transform .2s ease;
}


.updates-modal.is-visible .updates-modal-dialog {
    transform: translateY(0) scale(1);
}


/* =========================================
   Modal Header
   ========================================= */

.updates-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}


.updates-modal-heading {
    min-width: 0;
}


.updates-modal-overline {
    display: block;
    margin-bottom: 5px;
    color: var(--purple-light);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
}


.updates-modal-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}


.updates-modal-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
}


.updates-modal-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #151a21;
    color: #aeb3bb;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}


    .updates-modal-close:hover {
        background: #1b2028;
        border-color: #3a404a;
        color: #fff;
    }


/* =========================================
   Updates List
   ========================================= */

.updates-list {
    overflow-y: auto;
    padding: 12px 14px 16px;
}


    .updates-list::-webkit-scrollbar {
        width: 5px;
    }


    .updates-list::-webkit-scrollbar-track {
        background: transparent;
    }


    .updates-list::-webkit-scrollbar-thumb {
        background: #303640;
        border-radius: 10px;
    }


/* =========================================
   Update Item
   ========================================= */

.update-item {
    border-bottom: 1px solid var(--border);
}


    .update-item:last-child {
        border-bottom: 0;
    }


.update-item-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
    transition: background .2s ease;
}


    .update-item-header:hover {
        background: rgba(255, 255, 255, .018);
    }


.update-item-info {
    min-width: 0;
}


.update-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 6px;
}


.update-item-info h3 {
    margin: 0;
    color: #e9eaed;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}


.update-version {
    color: var(--purple-light);
    font-size: 10px;
    font-weight: 600;
}



.update-date {
    color: #686f79;
    font-size: 9px;
}


/* =========================================
   Update Types
   ========================================= */

.update-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 600;
}


.update-type-feature {
    background: rgba(151, 68, 243, .12);
    color: var(--purple-light);
}


.update-type-improvement {
    background: rgba(255, 191, 56, .10);
    color: var(--gold);
}


.update-type-fix {
    background: rgba(110, 180, 255, .10);
    color: #78b9ff;
}


.update-type-release {
    background: rgba(255, 255, 255, .07);
    color: #c9ccd1;
}


/* =========================================
   Accordion Toggle
   ========================================= */

.update-item-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: #777e88;
    font-size: 9px;
    transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}


.update-item.is-open .update-item-toggle {
    transform: rotate(180deg);
    color: var(--purple-light);
    border-color: rgba(151, 68, 243, .3);
    background: rgba(151, 68, 243, .07);
}


/* =========================================
   Accordion Content
   ========================================= */

.update-item-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 0 8px;
}

.update-item.is-open .update-item-content {
    max-height: 500px;
    opacity: 1;
    padding: 0 8px 17px;
}


.update-item-description {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.9;
}


    .update-item-description p {
        margin: 0 0 14px;
    }


/* =========================================
   Change Groups
   ========================================= */

.update-change-group {
    padding: 12px 13px;
    background: #11161d;
    border: 1px solid #20262e;
    border-radius: 8px;
}


    .update-change-group h4 {
        display: flex;
        align-items: center;
        gap: 7px;
        margin: 0 0 9px;
        color: #d9dce1;
        font-size: 10px;
        font-weight: 600;
    }


        .update-change-group h4 i {
            color: var(--purple-light);
            font-size: 9px;
        }


    .update-change-group ul {
        margin: 0;
        padding: 0 16px 0 0;
        color: var(--muted);
        font-size: 9px;
        line-height: 2;
    }


    .update-change-group li {
        padding-right: 2px;
    }


/* =========================================
   Body Lock
   ========================================= */

body.updates-modal-open {
    overflow: hidden;
}


/* =========================================
   Responsive
   ========================================= */

@media(max-width:800px) {

    .updates-card {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }


    .updates-open-btn {
        width: 100%;
    }


    .updates-modal {
        padding: 12px;
    }


    .updates-modal-dialog {
        max-height: calc(100vh - 24px);
        border-radius: 10px;
    }


    .updates-modal-header {
        padding: 18px 16px 15px;
    }


    .updates-list {
        padding: 8px 10px 12px;
    }
}


@media(max-width:520px) {

    .updates-section {
        margin-top: 14px;
    }


    .updates-card {
        padding: 12px;
    }


    .updates-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 14px;
    }


    .updates-title-row h2 {
        font-size: 13px;
    }


    .updates-info p {
        font-size: 9px;
    }


    .updates-modal {
        padding: 0;
    }


    .updates-modal-dialog {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-top: 0;
    }


    .updates-modal-header {
        padding: 17px 14px 14px;
    }


    .updates-modal-heading h2 {
        font-size: 16px;
    }


    .updates-modal-heading p {
        font-size: 9px;
    }


    .update-item-header {
        padding: 14px 5px;
    }


    .update-item-info h3 {
        font-size: 11px;
    }


    .update-item-meta {
        gap: 5px;
    }


    .update-date,
    .update-version {
        font-size: 8px;
    }


    .update-item-toggle {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border);
        border-radius: 7px;
        color: #777e88;
        font-size: 9px;
        transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
    }

    .update-item.is-open .update-item-toggle {
        transform: rotate(180deg);
        color: var(--purple-light);
        border-color: rgba(151, 68, 243, .3);
        background: rgba(151, 68, 243, .07);
    }
}
