*,
*::after,
*::before {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    line-height: 1rem;
}

:root {
    --bg-color-primary: #171717;
    --bg-color-secondary: #252525;
    --bg-color-third: #434343;

    --text-color-primary: white;
    --text-color-disable: #a5a5a5;

    --border-color: #2f2f2f;
}

body {
    font-family: "IranYekan";
    background: var(--bg-color-primary);
    padding: 1.2rem;
    color: var(--text-color-primary);
    direction: rtl;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: var(--text-color-disable);
    transition: 130ms ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

a svg {
    width: 1.3rem;
}

nav {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.5rem;
    margin-bottom: 1.1rem;
}

a:hover {
    color: white;
}

.shopContainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shopHeader {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    padding-right: 1rem;
}

.shopHeader div {
    display: flex;
    gap: 0.5rem;
}

.shopHeader a {
    border: 0.1rem solid var(--border-color);
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: white;
}

.shopHeader a:hover {
    background: var(--bg-color-secondary);
}

.shopTable {
    width: 100%;
    height: auto;
    overflow-x: auto;
}

.shopTable table,
.shopTable td,
.shopTable th {
    border: 0.1rem solid var(--border-color);
    height: 2.6rem;
    text-align: right;
    padding-right: 0.4rem;
}

.shopTable table th {
    background: var(--bg-color-secondary);
    font-size: medium;
    font-weight: 600;
}

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

.shopTdItem {
    display: flex;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.abutton {
    border: 0.1rem solid var(--border-color);
    padding: 0.3rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
    color: white;
    display: flex;
    align-items: center;
}

.abutton svg {
    width: 1rem;
}

.abutton:hover {
    background: var(--bg-color-secondary);
}

.rubyspan {
    background: rgb(34, 97, 154);
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
}

.goldspan {
    background: rgb(245, 204, 25);
    color: var(--bg-color-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
}

.moneyspan {
    background: rgb(144, 34, 175);
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
}

.activeLabel {
    background: rgb(31, 101, 32);
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
}

.deactiveLabel {
    background: rgb(57, 57, 57);
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: small;
}

.editCreateNewProductContainer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 5rem;
}

.editNewForm {
    width: 40rem;
    height: auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-top: 0.3rem;
    border-radius: 0.5rem;
    padding: 1rem;
    gap: 1.5rem;
}

.editNewForm input {
    outline: none;
    padding: 0.5rem 0.6rem;
    background: var(--bg-color-secondary);
    border: 0.1rem solid var(--border-color);
    border-radius: 0.4rem;
    color: white;
    font-family: "IranYekan";
    transition: 100ms ease-out;
    font-size: 0.9rem;
    font-weight: 400;
}

.editNewForm label {
    font-size: 0.9rem;
    font-weight: 500;
}

.editNewForm input:hover {
    border-color: var(--bg-color-third);
}

.editNewForm input:focus {
    border-color: white;
}

.formItem {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.7rem;
}

.formItem select {
    font-size: 0.9rem;
    padding: 0.57rem 0.5rem;
    background: var(--bg-color-secondary);
    border: 0.1rem solid var(--border-color);
    border-radius: 0.4rem;
    color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: "IranYekan";
}

.formItem select:focus {
    border-color: white;
    outline: none;
}

.editNewForm input[type="number"] {
    appearance: textfield;
    direction: ltr;
}

.editNewForm textarea {
    outline: none;
    padding: 0.5rem 0.6rem;
    background: var(--bg-color-secondary);
    border: 0.1rem solid var(--border-color);
    border-radius: 0.4rem;
    color: white;
    font-family: "IranYekan";
    transition: 100ms ease-out;
    font-size: medium;
    font-weight: 400;
    direction: ltr;
    resize: vertical;
}

.editNewForm textarea::placeholder,
input::placeholder {
    text-align: right;
}

.editNewForm textarea:hover {
    border-color: var(--bg-color-third);
}

.editNewForm textarea:focus {
    border-color: white;
}

.formItemHo {
    display: flex;
    width: 100%;
    align-content: center;
    justify-content: center;
    gap: 0.7rem;
}

.formItemHo input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 1;
    padding: 1.1rem;
    border: 0.12rem solid var(--border-color);
    background-color: var(--bg-color-primary);
    transition: 0.1s ease-in-out;
    cursor: pointer;
}

.formItemHo input[type="radio"]:hover {
    border-color: var(--bg-color-third);
}

.formItemHo input[type="radio"]:checked + label {
    color: black;
}

.formItemHo input[type="radio"]:checked {
    border-color: white;
    background-color: white;
}

.formItemHo > div {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.formItemHo > div label {
    position: absolute;
    color: var(--bg-color-third);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.editNewForm input[type="date"] {
    direction: ltr;
}

.editNewForm input[type="submit"] {
    font-weight: 500;
    background: var(--border-color);
    padding: 0.7rem;
}

.editNewForm .header {
    text-align: right;
    width: 100%;
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
}

.editNewForm .header svg {
    width: 2rem;
}

.hogroup {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.editNewForm input:read-only {
    background: var(--bg-color-primary);
    cursor: default;
}

.editNewForm input:read-only:focus {
    border-color: var(--border-color);
}

.card-container {
    width: 100%;
    height: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.card-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.card {
    flex: 1;
    min-width: 20rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 7rem;
    border: 0.1rem solid var(--border-color);
    border-radius: 0.4rem;
    padding: 0.5rem;
    background: var(--bg-color-secondary);
}

.card p {
    margin-top: 0.3rem;
    margin-right: 0.3rem;
    font-family: "IranYekan";
    font-weight: 550;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    justify-content: center;
    gap: 0.5rem;
}
.card p svg {
    width: 1.5rem;
}

.card-info {
    width: 100%;
    padding: 0.5rem;
    display: flex;
    justify-content: flex-start;
    direction: ltr;
}
