/* Northgram V17 — личный архив публикаций */

.archive-page {
    width: min(100% - 28px, 960px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 26px 0 110px;
    color: #E3DAD8;
}

.archive-header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: start;
    gap: 14px;
    padding: 20px;
    border: 1px solid #44353D;
    border-radius: 18px;
    background:
        radial-gradient(
            circle at 88% 4%,
            rgb(196 154 124 / 0.12),
            transparent 34%
        ),
        #32252B;
}

.archive-back,
.archive-lock {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #44353D;
    border-radius: 12px;
    background: #2A1F25;
    color: #E3DAD8;
}

.archive-back:hover {
    border-color: #C49A7C;
    color: #C49A7C;
}

.archive-back svg,
.archive-lock svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.archive-lock {
    color: #C49A7C;
}

.archive-header > div:nth-child(2) > span {
    display: block;
    margin-bottom: 5px;
    color: #C49A7C;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.archive-header h1 {
    margin: 0;
    color: #E3DAD8;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.05;
}

.archive-header p {
    max-width: 520px;
    margin: 8px 0 0;
    color: #A89AA0;
    font-size: 11px;
    line-height: 1.55;
}

.archive-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0;
    padding: 13px 16px;
    border: 1px solid #44353D;
    border-radius: 13px;
    background: #32252B;
}

.archive-summary div {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.archive-summary strong {
    color: #C49A7C;
    font-size: 18px;
}

.archive-summary span,
.archive-summary small {
    color: #A89AA0;
    font-size: 9px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.archive-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #44353D;
    border-radius: 15px;
    background: #32252B;
    transition:
        border-color 0.16s ease,
        transform 0.16s ease;
}

.archive-card:hover {
    border-color: rgb(196 154 124 / 0.65);
    transform: translateY(-2px);
}

.archive-photo-button {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: #2A1F25;
    cursor: zoom-in;
}

.archive-photo-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.22s ease;
}

.archive-photo-button:hover img {
    transform: scale(1.025);
}

.archive-photo-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgb(42 31 37 / 0.42),
        transparent 48%
    );
    opacity: 0;
    transition: opacity 0.16s ease;
}

.archive-photo-button:hover .archive-photo-shade {
    opacity: 1;
}

.archive-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border: 1px solid rgb(227 218 216 / 0.18);
    border-radius: 10px;
    background: rgb(42 31 37 / 0.82);
    color: #E3DAD8;
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity 0.16s ease,
        transform 0.16s ease;
}

.archive-photo-button:hover .archive-zoom,
.archive-photo-button:focus-visible .archive-zoom {
    opacity: 1;
    transform: translateY(0);
}

.archive-zoom svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.archive-card-body {
    padding: 12px;
}

.archive-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    color: #A89AA0;
    font-size: 8px;
}

.archive-card-meta span {
    color: #C49A7C;
    font-weight: 750;
}

.archive-card-body p {
    min-height: 30px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: #E3DAD8;
    font-size: 10px;
    line-height: 1.5;
}

.archive-card-body .archive-no-caption {
    color: #776970;
    font-style: italic;
}

.archive-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.archive-card-actions form {
    min-width: 0;
    margin: 0;
}

.archive-card-actions button {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 9px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.archive-card-actions svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.archive-restore {
    border: 0;
    background: #C49A7C;
    color: #2A1F25;
}

.archive-restore:hover {
    filter: brightness(1.06);
}

.archive-delete {
    border: 1px solid #44353D;
    background: #2A1F25;
    color: #D99B9B;
}

.archive-delete:hover {
    border-color: rgb(217 155 155 / 0.55);
    background: rgb(217 155 155 / 0.08);
}

.archive-empty {
    display: grid;
    min-height: 330px;
    place-items: center;
    align-content: center;
    padding: 38px 20px;
    border: 1px dashed #44353D;
    border-radius: 17px;
    background: #32252B;
    text-align: center;
}

.archive-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 16px;
    background: rgb(196 154 124 / 0.11);
    color: #C49A7C;
}

.archive-empty-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.archive-empty h2 {
    margin: 0;
    font-size: 18px;
}

.archive-empty p {
    max-width: 400px;
    margin: 8px 0 17px;
    color: #A89AA0;
    font-size: 10px;
    line-height: 1.55;
}

.archive-empty a {
    padding: 10px 15px;
    border-radius: 10px;
    background: #C49A7C;
    color: #2A1F25;
    font-size: 9px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .archive-page {
        width: min(100% - 20px, 620px);
        padding-top: 12px;
    }

    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .archive-header {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        padding: 15px;
    }

    .archive-back,
    .archive-lock {
        width: 38px;
        height: 38px;
    }

    .archive-summary small {
        display: none;
    }
}

@media (max-width: 430px) {
    .archive-header {
        gap: 9px;
    }

    .archive-header p {
        font-size: 9px;
    }

    .archive-card-body {
        padding: 9px;
    }

    .archive-card-actions {
        grid-template-columns: 1fr;
    }

    .archive-delete {
        min-height: 33px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .archive-card,
    .archive-photo-button img,
    .archive-photo-shade,
    .archive-zoom {
        transition: none;
    }
}
