@font-face {
    font-family: vazir;
    src: url("fonts/vazir.ttf");
}

@font-face {
    font-family: vazir-fd;
    src: url("fonts/vazir_fd.ttf");
}

* {
    box-sizing: border-box;
    direction: rtl;
    font-family: vazir, serif;
    color: #333;
}

*[dir=ltr] {
    direction: ltr;
}

h1 {
    text-align: center;
}

p {
    text-align: center;
}

hr {
    border: 1px;
    border-bottom: 1px solid silver;
    margin-bottom: unset;
}

section {
    padding: 8px;
}

section .container {
    max-width: 1200px;
    margin: 16px auto;
    padding: 8px;
    border: 1px solid silver;
    box-shadow: 0 0 5px 5px #efefef;
    border-radius: 8px;
}

#message.success {
    color: green;
}

#message.failed {
    color: red;
}

.color-light {
    color: white;
}

.bg-red {
    background: red;
}


.input {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.input:last-child {
    margin-bottom: 0;
}

input, textarea, select {
    background: transparent;
    padding: 8px;
    flex-grow: 2;
    margin: 0 8px 0 0;
    display: table-cell;
    border: unset;
    width: auto;
}

.post-content {
    padding: 8px;
    border: 1px solid skyblue;
    margin-bottom: 8px;
}

.post-content * {
    display: block;
}

.post-content .content-type, .post-content .content-param {
    border-bottom: 1px solid silver;
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.content-type label, .content-param label {
    flex: 1;
    font-size: 80%;
}

.post-content-type, .content-param .param-selector {
    flex: 10;
}

textarea {
    margin-top: 8px;
    min-height: 150px;
    resize: none;
    border-bottom: unset;
    width: 98%;
    overflow: visible;
}

.post-content {
    display: block;

}


#add_content, #add_category, #modal_action_positive {
    margin-top: 16px;
    text-align: center;
    color: #999;
    padding: 8px;
    border: 1px solid silver;
    box-shadow: 0 0 5px 5px #efefef;
    border-radius: 8px;
    cursor: pointer;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

#add_category {
    padding: 6px 0 0 0;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 16px 0 0;
    transition: all 0.3s;
}

#modal_action_positive {
    transition: all 0.3s;
    color: white;
}

.bg-blue {
    background: dodgerblue;
}

#save_post, #login, #logout, #cancel, #save_category, #remove_category {
    text-align: center;
    color: white;
    background: dodgerblue;
    padding: 8px;
    border: 1px solid silver;
    margin: 0 auto;
    box-shadow: 0 0 5px 5px #efefef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 300ms;
    max-width: 1200px;

    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}
#remove_category{
    background-color: red;
    box-shadow: unset;
}

#save_post:hover, #login:hover, #add_category:hover, #modal_action_positive:hover {
    background: skyblue;
    color: #333333;
}

#logout, #cancel {
    background: silver;
    color: #333333;
}

#logout:hover, #cancel:hover {
    background: #999999;
}

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000c;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-container.show {
    display: flex;
}

.modal-container .modal-window {
    width: 350px;
    height: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 5px 5px skyblue;
    overflow: hidden;
}

.modal-container .modal-window .modal-header {
    padding: 8px;
    border-bottom: 1px solid silver;
    background: #efefef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-container .modal-window .modal-header * {
    margin: 0;
}

.modal-container .modal-window .modal-header #modal_action_close {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: skyblue;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 3px;
}

.modal-container .modal-window .modal-body {
    padding: 8px;
    display: flex;
    flex-flow: wrap column;
}

.modal-container .modal-window .modal-footer {
    padding: 8px;
}

.modal-container .modal-window .modal-body #modal_input {
    flex: 1 1 50%;
}

header {
    padding-left: 8px;
    padding-right: 8px;
    max-width: 1200px;
    margin: 0 auto 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td, th {
    text-align: center;
}

td {
    border: 1px solid silver;
}

th {
    border: 1px solid white;
    padding: 8px;
    background: skyblue;
}

.btn {
    border-radius: 8px;
    border: unset;
    padding: 8px 16px;
    cursor: pointer;
}

span.item-controls {
    color: blue;
    cursor: pointer;
}
