@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');

/* =====================================================
   Root Variables
===================================================== */

:root{

    --bg-primary:#1a1a2e;
    --bg-secondary:#16213e;

    --text-primary:#e0e0e0;
    --text-secondary:#c9d1d9;

    --primary:#2563eb;
    --primary-light:#3b82f6;

    --success:#22c55e;
    --danger:#ef4444;

    --border:#334155;

    --transition:.25s ease;

}

/* =====================================================
   Reset
===================================================== */

*{

    margin:0;
    padding:0;
    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    min-height:100vh;

    background:
        linear-gradient(
            135deg,
            var(--bg-primary),
            var(--bg-secondary)
        );

    color:var(--text-primary);

    font-family:'Vazirmatn',sans-serif;

    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;

    text-align:center;

}

/* =====================================================
   Common Elements
===================================================== */

a{

    text-decoration:none;
    color:inherit;

}

img{

    max-width:100%;
    display:block;

}

button{

    font-family:inherit;
    cursor:pointer;

}

input,
textarea,
select{

    font-family:inherit;

}

::selection{

    background:var(--primary);

    color:#fff;

}

/* =====================================================
   Layout
===================================================== */

.content{

    margin-top:110px;

    padding:20px;

}

/* =====================================================
   Global Django Messages
===================================================== */

.global-messages{

    width:min(100%, 1200px);

    margin:0 auto 14px;

    display:grid;

    gap:8px;

    text-align:right;

}

.global-message{

    --message-accent:#94a3b8;
    --message-surface:rgba(71,85,105,.88);

    position:relative;

    min-height:44px;

    padding:10px 44px 10px 14px;

    border:1px solid color-mix(
        in srgb,
        var(--message-accent) 45%,
        transparent
    );

    border-right:4px solid var(--message-accent);

    border-radius:14px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.13),
            rgba(255,255,255,.035)
        ),
        var(--message-surface);

    color:#f8fafc;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.16),
        0 10px 24px rgba(2,6,23,.18);

    backdrop-filter:blur(18px) saturate(145%);
    -webkit-backdrop-filter:blur(18px) saturate(145%);

}

.global-message[open]{

    display:grid;

    direction:ltr;

    grid-template-columns:minmax(0, 1fr) 24px;
    grid-template-areas:"message-text message-icon";

    align-items:center;

    gap:9px;

}

.global-message:not([open]){

    display:none;

}

.global-message--success{

    --message-accent:#4ade80;
    --message-surface:rgba(20,83,45,.88);

}

.global-message--error{

    --message-accent:#fb7185;
    --message-surface:rgba(127,29,29,.90);

}

.global-message--warning{

    --message-accent:#fbbf24;
    --message-surface:rgba(120,53,15,.90);

}

.global-message--info{

    --message-accent:#60a5fa;
    --message-surface:rgba(30,64,175,.88);

}

.global-message--debug{

    --message-accent:#c4b5fd;
    --message-surface:rgba(76,29,149,.88);

}

.global-message--default{

    --message-accent:#cbd5e1;
    --message-surface:rgba(51,65,85,.90);

}

.global-message__icon{

    grid-area:message-icon;

    width:24px;
    height:24px;

    display:inline-flex;

    align-items:center;
    justify-content:center;

    border:1px solid color-mix(
        in srgb,
        var(--message-accent) 60%,
        transparent
    );

    border-radius:50%;

    color:var(--message-accent);

    font-size:13px;
    font-weight:800;

}

.global-message__text{

    grid-area:message-text;

    width:100%;
    min-width:0;

    direction:rtl;
    text-align:right;

    white-space:normal;
    overflow-wrap:anywhere;

    font-size:13px;
    font-weight:600;
    line-height:1.8;

}

.global-message__close{

    position:absolute;

    top:50%;
    left:11px;

    width:26px;
    height:26px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:8px;

    color:rgba(255,255,255,.78);

    font-size:20px;
    line-height:1;

    list-style:none;

    transform:translateY(-50%);

    transition:
        background var(--transition),
        color var(--transition);

}

.global-message__close::-webkit-details-marker{

    display:none;

}

.global-message__close:hover,
.global-message__close:focus-visible{

    outline:none;

    background:rgba(255,255,255,.14);

    color:#fff;

}

.global-sr-only{

    position:absolute;

    width:1px;
    height:1px;

    margin:-1px;
    padding:0;

    overflow:hidden;

    clip:rect(0,0,0,0);
    clip-path:inset(50%);

    white-space:nowrap;

    border:0;

}

@media(max-width:768px){

    .global-messages{

        margin-bottom:10px;

    }

    .global-message{

        min-height:40px;

        padding-block:8px;

    }

}

/* =====================================================
   Utility Classes
===================================================== */

.hidden{

    display:none !important;

}

/* =====================================================
   Animations
===================================================== */

@keyframes fadeIn{

    from{

        opacity:0;
        transform:translateY(20px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}

@keyframes fadeInUp{

    from{

        opacity:0;
        transform:translateY(30px);

    }

    to{

        opacity:1;
        transform:translateY(0);

    }

}
