.settingsarticle {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100vw;
    min-height: 400px;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background-color: rgb(15, 15, 15);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    padding: 1.25rem;
    box-sizing: border-box;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
    z-index: 150;
}

.settingsarticle.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}


/* ============================= */
/* TITLE */
/* ============================= */

.settingsarticle h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}


/* =========================
   FORM STRUCTURE
========================= */

.settingsarticle form {
    max-width: 520px;
    margin: 0 auto;
}

.formgrup {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}


/* =========================
   LABELS
========================= */

.formgrup label {
    font-size: 0.85rem;
    color: #bbb;
}


/* =========================
   INPUTS / TEXTAREA
========================= */

.formgrup input,
.formgrup textarea {
    background-color: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    font-size: 0.95rem;
    color: #fff;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.formgrup textarea {
    min-height: 120px;
    resize: vertical;
}

.formgrup input:not(:focus):invalid {
    animation: headshake 200ms cubic-bezier(.4,.1,.6,.9) 2;
}


/* =========================
   FOCUS STATE 
========================= */

.formgrup input:focus,
.formgrup textarea:focus {
    outline: none;
    border-color: #4da3ff;
    background-color: #202020;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.25);
}


/* =========================
   MESSAGES
========================= */

.messages-div {
    margin-bottom: 1rem;
}

.success-span {
    display: block;
    color: #4ade80;
    font-size: 0.85rem;
}

.error-span {
    display: block;
    color: #f87171;
    font-size: 0.85rem;
}


/* =========================
   BUTTONS
========================= */

.settingsarticle button {
    margin-top: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    color: white;
    transition:
        background-color 0.2s ease,
        transform 0.1s ease;
}

.settingsarticle button:active {
    transform: translateY(1px);
}

.save-btn {
    background-color: #2563eb;
    color: #fff;
}

.save-btn:hover {
    background-color: #1d4ed8;
}

.close-btn {
    background-color: transparent;
    color: #aaa;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}


.delete-btn {
    background-color: #7f1d1d;
}

.delete-btn:hover {
    background-color: #991b1b;
}

.settingsarticle form > button {
    width: 100%;
}


/* ============================= */
/* ANIMATIONS */
/* ============================= */

@keyframes headshake {
    0% {
        border: 1px solid #b20a37;
    }
    25% {
        transform: translateX(10px);

    }
    75% {
        transform: translateX(-10px);
    }
    100% {
        border: 1px solid #b20a37;
    }
}
