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

@font-face {
    font-family: HelveticaNeue;
    src: url("./fonts/HelveticaNeue-Roman.otf");
}

:root {
    --main-color: #b5a699;
    --text-color: #4d4d4d;
    --red-color: #cd1227;
}

body {
    margin: 0;
    min-height: 100vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: HelveticaNeue, sans-serif;
}

/* Header */
.page-header {
    margin-top: 40px;
}

.alhamayel {
    font-family: Futura, sans-serif;
    font-size: 72px;
    color: var(--main-color);
    font-weight: normal;
    text-align: center;
}

@media screen and (max-width: 450px) {
    .alhamayel {
        font-size: 40px;
    }
}

.alhamayel-img {
    width: 25%;
}

.alhamayel-subheader {
    font-family: "Almarai", sans-serif;
    font-size: 20px;
    color: var(--main-color);
    font-weight: normal;
    text-align: center;
    margin-top: 6px;
}

.alhamayel-instructions {
    margin: 52px auto 90px;
    font-size: 21px;
    font-weight: 500;
    max-width: 34%;
    text-align: center;
    color: var(--text-color);
}

[dir="rtl"] .alhamayel-instructions {
    font-family: "Almarai", sans-serif;
}

@media screen and (max-width: 992px) {
    .alhamayel-img {
        width: 50%;
    }

    .alhamayel-instructions {
        max-width: 80%;
    }
}

.family-tree-container {
    width: 100%;
    padding: 0 7%;
    margin: 0;
    background: linear-gradient(90deg, #f1e6d2 0, #f4eee2 44.15%, #d9c89e 100%);
}

.family-tree-title {
    font-size: 1.5rem;
    background-image: url(./images/family-tree.png),
        url(./images/family-tree-2.png);
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    max-width: max-content;
    padding: 50px 80px;
    background-size: 100% 50%, cover;
}

.tree-search-form input {
    display: block;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    border-inline-end-width: 0;
    border-end-start-radius: 0.25rem;
    border-start-start-radius: 0.25rem;
}

.tree-search-form button {
    color: var(--red-color);
    border: 1px solid #ced4da;
    border-radius: 0;
    border-start-end-radius: 0.375rem;
    border-end-end-radius: 0.375rem;
    border-inline-start-width: 0;
    user-select: none;
    background-color: #fff;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    vertical-align: middle;
    width: max-content;
}

.action-button {
    border: 0;
    background-color: var(--red-color);
    border-radius: 100%;
    padding: 0;
    margin: 0 4px;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.change-lang {
    position: absolute;
    color: var(--main-color);
    top: 40px;
    left: 40px;
    font-weight: bold;
}

[dir='rtl'] .change-lang {
    right: 40px;
    left: unset;
}

.change-lang:hover {
    color: var(--main-color);
}

.treeParent {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: auto;
    text-align: center;
    width: 100%;
    overflow: auto hidden;
    height: 0;
}

.treeParent.shadow {
    height: 20px;
    min-height: 20px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.familyTree {
    position: absolute;
    top: 0;
    display: block;
    padding: 0;
    margin: auto;
    text-align: center;
    width: max-content;
}

.familyTree ul {
    position: relative;
    padding: 20px 0 0;
    transition: all 0.5s ease-in-out;
    overflow: auto;
    list-style: none;
}

.familyTree ul ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 1px solid #ccc;
    width: 0;
    height: 20px;
}

.familyTree li::before,
.familyTree li::after {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 1px solid #ccc;
    width: 50%;
    height: 20px;
}

.familyTree li:first-child::before,
.familyTree li:last-child::after {
    border: 0 none;
}

.familyTree li:last-child::before {
    border-right: 1px solid #ccc;
    border-radius: 0 5px 0 0;
    -webkit-border-radius: 0 5px 0 0;
    -moz-border-radius: 0 5px 0 0;
}

.familyTree li:only-child {
    padding-top: 0;
}

.familyTree li::after {
    right: auto;
    left: 50%;
    border-left: 1px solid #ccc;
}

.familyTree li:first-child::after {
    border-radius: 5px 0 0 0;
    -webkit-border-radius: 5px 0 0 0;
    -moz-border-radius: 5px 0 0 0;
}

.familyTree ul li {
    position: relative;
    float: left;
    text-align: center;
    padding: 20px 15px 15px 10px;
    transition: all 0.5s;
}

.familyTree ul li a {
    position: relative;
    display: inline-block;
    transition: all 0.5s ease-in-out;
    text-decoration: none;
    z-index: 10;
    cursor: pointer;
}

.familyTree ul li a img {
    background-image: url(./images/member-frame.png);
    padding: 8px;
    background-size: 90px 90px;
    object-fit: cover;
}

.treeParent-footer {
    margin-top: auto;
    margin-bottom: 2px;
}

@media screen and (max-width: 700px) {
    .treeParent-footer form {
        position: relative;
        top: 40px;
    }
}

@media screen and (max-width: 500px) {
    .treeParent-footer form {
        position: relative;
        top: 80px;
    }
}

@media screen and (max-width: 350px) {
    .treeParent-footer form {
        position: relative;
        top: 120px;
    }
}

.complete-trial {
    margin: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.complete-trial-check {
    position: relative;
    width: 22px;
    height: 22px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
}

.complete-trial-check::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    background-color: var(--main-color);
    border-radius: 2px;
    top: 2px;
    left: 2px;
    transition: all 0.4s ease-in-out;
}

.complete-trial-text {
    text-align: left;
    color: var(--text-color);
    flex: 1;
    font-size: 21px;
    font-weight: 500;
}

[dir="rtl"] .complete-trial-text {
    font-family: "Almarai", sans-serif;
    text-align: right;
}

.complete-trial-input:checked + .complete-trial .complete-trial-check::before {
    width: 16px;
    height: 16px;
}

.platform-link {
    color: var(--main-color);
    text-decoration: none;
    font-size: 22px;
    font-weight: 400;
}

.platform-link:hover {
    color: var(--main-color);
}

.submit-btn {
    color: #fff;
    background-color: var(--text-color);
    padding: 8px 16px;
    border-radius: 4px;
    margin-bottom: 40px;
}

::-webkit-scrollbar-track {
    background: #535a5d;
}

.treeParent::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);
    border-radius: 5px;
    background-color: #ccc;
}

::-webkit-scrollbar-thumb {
    background: #2d3841;
}

.treeParent::-webkit-scrollbar-thumb {
    border-radius: 5px;
    -webkit-box-shadow: inset 0 0 6px rgb(0 0 0 / 30%);
    background-color: #555;
}

::-webkit-scrollbar {
    width: 12px;
}

.treeParent::-webkit-scrollbar {
    background-color: transparent;
    position: absolute;
    top: 0;
}

.flying-search {
    height: 50px;
    position: fixed;
    bottom: 20px;
    z-index: 1000;
}

.flying-search .container {
    border: 1px solid #212529;
    background: linear-gradient(142deg, #d3c1af, #666453);
    border-radius: 5px;
    height: 50px;
    direction: ltr;
}

.flying-search .tree-search-form .row {
    height: 50px;
    margin-left: 0;
    margin-right: 0;
}

.flying-search .tree-search-form input {
    height: 40px;
    margin-top: 5px;
    max-width: 41.667%;
}

.flying-search .tree-search-form button {
    height: 40px;
    margin-top: 5px;
    line-height: 30px;
    border-radius: 0.2em;
}

.flying-search .stats {
    color: white;
    font-weight: bold;
}

.familyTree li a.wanted {
    border: 5px solid rgb(6 135 126 / 74%);
    border-bottom: 15px solid rgb(6 135 126 / 74%);
    box-shadow: 0 0 19px 13px rgb(6 135 126 / 74%);
}

.familyTree li a:hover,
.familyTree li a:hover + ul li a {
    background: #c8e4f8;
    color: #000;
}
