﻿@font-face {
    font-family: Sahel;
    src: url('Sahel-WOL.woff2') format('woff2'), url('/Sahel-WOL.woff') format('woff');
    font-weight: normal;
}

@font-face {
    font-family: Sahel;
    src: url('Sahel-SemiBold-WOL.woff2') format('woff2'), url('/Sahel-SemiBold-WOL.woff') format('woff');
    font-weight: bold;
}

:root {
    --cP: #1aac7a;
    --cPD: #158a61;
    --cPB: #d3f8eb;
    --cL: #4183c4;
    --cB: #eee;
    --maxWidth: 900px;
    --cP: #1aac7a;
    --cPD: #158a61;
    --cPB: #d3f8eb;
    --cL: #4183c4;
    --cB: #eee;
    --cSuccess: #2c662d;
    --cSuccessBG: #fcfff5;
    --cSuccessBR: #a3c293;
    --cNegative: #9f3a38;
    --cNegativeBG: #fff6f6;
    --cNegativeBR: #e0b4b4;
    --cInfo: #276f86;
    --cInfoBG: #f8ffff;
    --cInfoBR: #a9d5de;
    --cWarning: #ccb200;
    --cWarningBG: #fffaf3;
    --cWarningBR: #c9ba9b;
}

html {
    scroll-behavior: smooth;
}

body, button, input, select {
    font-family: Sahel, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0 auto;
    padding: 10px;
}

div.error {
    color: #f54141;
    grid-column: 1/span 2;
    text-align: center;
    padding-bottom: 5px;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--cL);
}

table {
    border-collapse: collapse;
    color: #333;
}

th {
    background: #fafafa;
}

th, td {
    border: 1px solid #eee;
    padding: 0 10px;
    font-size: 13px;
}

    td:nth-child(1) {
        font-size: 11px;
    }

.fields {
    padding: 5px;
}

    .fields > .field {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        margin: 1px;
        padding: 1px;
    }

    .fields > .field-block {
        margin: 5px;
    }

.field-block textarea, .field-block input, .field-block label {
    width: 100%;
    display: block;
}

.field input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.field.center {
    grid-template-columns: auto;
    justify-items: center;
}

.fields > .field > label {
    padding: 5px;
}


select, input, textarea {
    border: 1px solid #eee;
    border-radius: 5px;
    line-height: 2;
    padding: 2px;
    outline: none;
}

select {
    width: 100%
}

    select:focus, input:focus, textarea:focus {
        border: 1px solid var(--cL);
    }

textarea {
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}

select, input[type="text"], input[type="password"], input[type="email"] {
    flex: 1;
    box-sizing: border-box;
}

button {
    background-color: var(--cP);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

input[type=checkbox] {
    transform: scale(1.5);
    padding: 10px;
}

/* editPage */
.editor {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    direction: rtl;
}

.preview {
    grid-template-columns: 1fr 1fr;
}

#preview {
    padding: 20px;
}

.formTab {
    background: #eee;
}

.editor div {
    overflow-y: auto;
}

textarea#body {
    height: 80%;
}

ol.sparse li {
    padding-top: 10px;
}

ol.sparse h3 {
    margin-block-end: 0;
    margin-inline-start: -1em;
}

del {
    background-color: #ffa5a5;
    text-decoration: none;
    padding: 0 2px;
}

ins {
    background-color: #8de900;
    text-decoration: none;
    padding: 0 2px;
}

u {
    color: #355cdb;
    font-weight: bold;
    text-decoration: none;
    padding: 0 1px;
}

c {
    color: var(--cP);
    font-weight: bold;
    text-decoration: none;
    padding: 0 1px;
}

q {
    display: block;
    color: #888;
    font-style: italic;
}

p {
    margin-top: 0;
    margin-bottom: 5px;
    text-align: justify;
    text-indent: 20px;
}

h1 {
    color: var(--cP);
    text-align: center;
    margin: 20px 5px;
}

h2 {
    margin-bottom: 3px;
    border-bottom: 1px solid #f1f1f1;
}

h3 {
    margin-bottom: 3px;
}


.toolbar {
    display: flex;
    flex-wrap: wrap;
}

    .toolbar > .tool {
        font-size: 11px;
        cursor: pointer;
        margin: 1px;
        padding: 5px 8px;
        border-radius: 3px;
        color: #fff;
        background-color: var(--cL);
    }
/* tab */
.tab {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px 0;
    max-width: 600px;
}

    .tab a {
        padding: 5px 20px;
        cursor: pointer;
        color: #444;
        font-size: 14px;
        transition: font-size 0.3s ease;
    }

        .tab a:hover {
            color: var(--cP);
        }

        .tab a.active {
            color: #fff;
            background: var(--cP);
            font-size: 16px;
            border-radius: 5px;
        }

.tabcontent {
    display: none;
    padding: 10px 5px;
    height: 100%;
    transition: display 0.3s ease;
}

    .tabcontent.active {
        display: block;
    }

.word span {
    padding: 0 5px;
    background: #1aac7a;
    color: #fff;
    border-radius: 5px;
}

.detailsGroup {
    display: flex;
    flex-wrap: wrap;
}

details {
    border: 1px solid #eee;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

summary {
    cursor: pointer;
    margin-bottom: 10px;
}

nav {
    background: #1aac7a;
    color: #fff;
    padding: 5px 10px;
    margin: 5px 0;
    border-radius: 5px;
}

    nav > a {
        text-decoration: none;
        color: #fff;
    }

a.button {
    color: #fff;
    background: #1aac7a;
    margin: 2px 5px;
    padding: 2px 10px;
    border-radius: 5px;
    transition: background 0.5s;
}
/*alerts*/
.alert {
    padding: 20px;
    margin: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: 700;
}

    .alert.success {
        color: var(--cSuccess);
        border: 1px solid var(--cSuccessBR);
        background-color: var(--cSuccessBG);
    }

    .alert.negative {
        color: var(--cNegative);
        border: 1px solid var(--cNegativeBR);
        background-color: var(--cNegativeBG);
    }

    .alert.info {
        color: var(--cInfo);
        border: 1px solid var(--cInfoBR);
        background-color: var(--cInfoBG);
    }

    .alert.warning {
        color: var(--cWarning);
        border: 1px solid var(--cWarningBR);
        background-color: var(--cWarningBG);
    }
