html {
    scroll-behavior: smooth;
}

body {
    font-family: "Regular", sans-serif;
    word-break: break-word;
    overflow-x: hidden;
    direction: rtl;
    color: var(--body-color);
    background-color: var(--body-bg);
}

:root {
    --body-bg: #ffffff;
    --body-color: #000000;
    --muted-color: #5a5a5a;
    --surface-50: #f5f5f5;
    --surface-75: #fafafa;
    --surface-100: #e5e7eb;
    --border-color: #e2e8f0;
    --topbar-bg: #f5f5f5;
    --navbar-text: #1e1e1e;
    --footer-bg-start: #3a3a3a;
    --footer-bg-end: #1b1b1b;
    --copy-bg-start: #31df87;
    --copy-bg-end: #28be55;
    --footer-text: #d9d9d9;
    --footer-title: #f5f5f5;
    --icon-color: #9e9e9e;
    --accent-color: #0d6efd;
    --accent-color-hover: #0b5ed7;
    --alert-error-bg: #f8d7da;
    --alert-error-border: #f5c6cb;
    --alert-error-text: #721c24;
}

[data-theme="dark"] {
    --body-bg: #0f172a;
    --body-color: #f8fafc;
    --muted-color: #94a3b8;
    --surface-50: #1f2937;
    --surface-75: #111827;
    --surface-100: #0f172a;
    --border-color: #334155;
    --topbar-bg: #111827;
    --navbar-text: #e2e8f0;
    --footer-bg-start: #111827;
    --footer-bg-end: #0b1120;
    --copy-bg-start: #1d4ed8;
    --copy-bg-end: #16a34a;
    --footer-text: #cbd5f5;
    --footer-title: #f8fafc;
    --icon-color: #cbd5f5;
    --accent-color: #60a5fa;
    --accent-color-hover: #3b82f6;
    --alert-error-bg: #401b1f;
    --alert-error-border: #7f1d1d;
    --alert-error-text: #fecaca;
}

* {
    transition: all 0.3s ease-in-out;
}

a {
    text-decoration: none;
}

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

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

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

.ltr {
    direction: ltr;
}

.NeoSans {
    font-family: NeoSans;
}

.NeoSansLight {
    font-family: NeoSansLight;
}

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

::-webkit-scrollbar-track {
    background: #dfdfdf;
    border-radius: 50px;
}

::-webkit-scrollbar-thumb {
    background: #2fd67b;
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: #000;
}

input::placeholder {
    color: var(--muted-color) !important;
    line-height: 14 !important;
}

.br-24 {
    border-radius: 24px;
}

.br-50 {
    border-radius: 50px;
}

ul li {
    list-style-type: none;
}

.btn:focus,
.navbar-toggler:focus,
.btn-check:focus + .btn-outline-primary,
.form-check-input:focus {
    box-shadow: none !important;
}

.form-check-input:checked {
    background-color: #2fd67b;
    border-color: #2fd67b;
}

/* ================== colors =============== */

footer,
footer a,
.footerList li a {
    color: var(--footer-text);
}

.default-color,
.footerList li:hover a,
footer a:hover,
.nav-item.active .nav-link,
.nav-item:hover .nav-link,
.signup-link:hover {
    color: #2fd67b;
}

.gray-bg {
    background-color: var(--surface-50);
}

.gray-color {
    color: var(--muted-color);
}

/* ======================== font size ======================== */

.f-12 {
    font-size: 12px;
}

.f-14 {
    font-size: 14px;
}

/*====================== footer =============================*/

.copyRight {
    background-image: linear-gradient(
        to left,
        var(--copy-bg-start),
        var(--copy-bg-end)
    );
    color: var(--body-color);
}

.copyRight img {
    height: 35px;
}

footer {
    background-image: linear-gradient(
        to right,
        var(--footer-bg-start),
        var(--footer-bg-end)
    );
}

footer .footer-title {
    color: var(--footer-title);
    position: relative;
}

footer .footer-title:after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -22px;
    height: 1px;
    width: 50px;
    background-color: #2fd67b;
}

footer .logo {
    height: 100px;
}

.footerList li {
    margin-bottom: 20px;
}

.footerList li:before {
    content: url(../images/footerListIcon.svg);
}

.footerList li a {
    font-size: 14px;
    padding-inline-start: 8px;
}

footer .social a:hover img {
    border-bottom: 2px solid #2fd67b;
    padding-bottom: 8px;
}

/*================== topbar ==================*/

.topbar {
    background-color: var(--topbar-bg);
    font-size: 14px;
}

.topbar a {
    color: var(--navbar-text);
}

nav .logo {
    width: 150px;
}

.default-btn {
    background-color: #2fd67b;
    border-radius: 50px;
    color: #fff;
    padding: 10px 30px;
}

.default-btn:hover {
    background-color: #9e9e9e;
}

.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--navbar-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--surface-50);
}

.sync-refresh-icon {
    color: var(--accent-color);
    transition: color 0.2s ease;
}

.sync-refresh-icon:hover {
    color: var(--accent-color-hover);
}

.update-time-btn {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #fff;
}

.update-time-btn:not(:disabled):hover {
    background-color: var(--accent-color-hover) !important;
    border-color: var(--accent-color-hover) !important;
}

.update-time-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.dropzone-placeholder {
    display: block;
    background-color: var(--surface-75);
    height: 100%;
    border-radius: 10px;
    width: 500px;
    border: 1px dashed var(--border-color);
}

.custom-danger-alert {
    background-color: var(--alert-error-bg);
    border: 1px solid var(--alert-error-border);
    color: var(--alert-error-text);
    border-radius: 16px;
    padding: 16px;
}

nav .nav-link {
    color: var(--navbar-text);
}

nav form .input-group {
    background-color: var(--surface-50);
    border-radius: 50px;
    padding-block: 4px;
}

nav form .input-group input,
nav form .input-group input:focus {
    border: none !important;
    background-color: transparent;
    box-shadow: none !important;
    outline: none !important;
}

nav .fav-icon {
    color: var(--icon-color);
}

nav .nav-item {
    margin-block: auto;
}

nav .notificatoin-icon {
    animation: swing 1.5s ease infinite;
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* ================= Dark mode overrides ================= */
[data-theme="dark"] .card,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .table,
[data-theme="dark"] .table th,
[data-theme="dark"] .table td,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .accordion-button,
[data-theme="dark"] .form-select,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .favCard,
[data-theme="dark"] .adsCard,
[data-theme="dark"] .comment-box,
[data-theme="dark"] .notification-card,
[data-theme="dark"] .wizard-step,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .modal-content {
    background-color: #1f2937;
    color: var(--body-color);
    border-color: #1f2937;
}

[data-theme="dark"] .accordion-button,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-control,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .card {
    border-color: var(--border-color);
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: #0f172a;
}

[data-theme="dark"] footer,
[data-theme="dark"] footer a,
[data-theme="dark"] .footerList li a {
    color: var(--footer-text);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: #0f172a;
}

[data-theme="dark"] .bordered-card,
[data-theme="dark"] .border-card,
[data-theme="dark"] .profile-items {
    background-color: #1f2937;
    border-color: var(--border-color);
}

[data-theme="dark"] .chat-bubble.received {
    background-color: #1f2937;
    border-color: var(--border-color);
}

[data-theme="dark"] .send-box {
    background-color: #111827;
}

[data-theme="dark"] .send-box .input-group {
    background-color: #1f2937;
    border-color: var(--border-color);
}

[data-theme="dark"] .favCard,
[data-theme="dark"] .verticalCard {
    background-color: #1f2937;
}

[data-theme="dark"] .aboutAdv-card {
    background-color: #1f2937;
    border-color: var(--border-color);
}

[data-theme="dark"] .advContact .phoneInfo {
    background-color: #1f2937;
}

[data-theme="dark"] .commentsBlock {
    background-color: #111827;
}

[data-theme="dark"] .commentsBlock .comment-box {
    background-color: #1f2937;
    border-color: var(--border-color);
}

[data-theme="dark"] #CarPlates .CarPlateImage .plate,
[data-theme="dark"] .CarPlateImage .plate {
    background-color: #1f2937;
    border-color: var(--body-color);
}

[data-theme="dark"] .plateAdvDetails .CarPlateImage {
    background-color: #111827;
}

[data-theme="dark"] .riyal-icon {
    fill: var(--muted-color);
}
[data-theme="dark"] ::placeholder {
    color: #ffffff;
    opacity: 1;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .addAd .form-control,
[data-theme="dark"] .editAdvForm .form-control {
    color: #ffffff;
}

[data-theme="dark"] #myDropzone {
    background-color: #1f2937 !important;
    border-color: var(--border-color) !important;
    color: var(--muted-color) !important;
}

[data-theme="dark"] #details {
    background-color: #1f2937;
    border-color: var(--border-color);
    color: white;
}
[data-theme="dark"] #sendBtn,
[data-theme="dark"] .custom-file-btn,
[data-theme="dark"] .favButton {
    color: white;
}

[data-theme="dark"] .dropzone {
    background-color: transparent !important;
    border: 2px dashed var(--border-color) !important;
}
.modal-content {
    border-radius: 15px;
    padding: 30px 60px;
    background-color: var(--surface-75);
    color: var(--body-color);
    border: 1px solid var(--border-color);
}

.modal-content .btn-close {
    position: absolute;
    left: 50px;
    top: 50px;
    z-index: 9999;
}

.form-control {
    background-color: var(--surface-75);
    border-radius: 7px;
    border: 1px solid var(--border-color);
    height: 50px;
    padding-inline: 55px !important;
    text-align-last: right;
    font-size: 16px;
    padding-bottom: 5px !important;
    text-align: right;
    color: var(--body-color);
}

.form-control::placeholder {
    font-size: 14px !important;
    color: var(--muted-color) !important;
    padding-bottom: 5px !important;
}

.iti.iti--allow-dropdown {
    width: 100%;
    text-align: right;
    text-align-last: right;
}

.iti--inline-dropdown .iti__dropdown-content {
    left: 0 !important;
    z-index: 9999999;
}

.input-icon {
    color: #9e9e9e;
    position: absolute;
    z-index: 9999;
    font-size: 24px;
    top: 0;
    bottom: 0;
    margin: auto !important;
    right: 20px;
    height: max-content;
}

.iti__eg {
    margin-inline-end: 7px;
}

.togglePassword {
    position: absolute;
    left: 20px;
    color: #9e9e9e;
    position: absolute;
    z-index: 9999;
    font-size: 20px;
    top: 0;
    bottom: 0;
    margin: auto !important;
    height: max-content;
    opacity: 0.62;
}

.form-control:focus {
    color: var(--body-color);
    background-color: var(--surface-75);
    border-color: #2fd67b;
    outline: 0;
    box-shadow: none;
}

.form-check-input[type="checkbox"]:checked {
    background-color: #2fd67b;
    border-color: #2fd67b;
}

.form-check-input[type="checkbox"] {
    width: 1.5em;
    height: 1.5em;
    margin-top: 0.3rem;
    border-radius: 50%;
    /* For a circular checkbox */
}

.form-check-label {
    margin-left: 0.5em;
    font-size: 1rem;
    color: var(--body-color);
}

.form-check-input[type="checkbox"] {
    border: 3px solid #31de87;
    border-radius: 8px !important;
}

.signup-link {
    color: var(--muted-color);
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.prev-step {
    position: absolute;
    left: 0;
    top: -90px;
}

#mainSlider img {
    width: 100%;
    height: 400px;
    /* object-fit: cover; */
    border-radius: 25px;
}

#mainSlider .swiper-pagination-bullet {
    background: #d1d9de;
    opacity: 1;
}

#mainSlider .swiper-pagination-bullet-active {
    opacity: 1;
    background: #31de87;
    width: 30px;
    border-radius: 10px;
}

/* ================= about page ============= */

.accordion-button {
    background-color: transparent !important;
    box-shadow: none !important;
    padding-block: 5px;
    color: var(--body-color) !important;
    font-weight: 700;
    font-family: NeoSans;
}

.accordion-item:first-of-type .accordion-button {
    border: none !important;
}

.accordion-item {
    border: 2px solid var(--border-color) !important;
    box-shadow: 1px 0 5px 3px rgba(0, 0, 0, 0.02);
    border-radius: 10px !important;
    background-color: var(--surface-75);
}

.accordion-item:has(.accordion-button:not(.collapsed)) {
    border: 2px solid #2fd67b !important;
    border-radius: 0.5rem;
}

.accordion-button:not(.collapsed)::after {
    background-image: url(../images/icons/arrow.svg);
    transform: rotate(0deg);
}

.accordion-body {
    padding: 0 80px 0 0;
    color: var(--muted-color);
    font-family: NeoSans;
}

.accordion-body p {
    color: var(--muted-color);
    opacity: 0.7;
    font-family: NeoSans;
}

/* ================== contact us page ================= */

.contactForm .form-control {
    padding-inline: 20px !important;
}

textarea {
    height: 150px !important;
    padding-top: 20px !important;
}

/* =============================================== */

.bordered-card {
    border: 2px solid var(--border-color) !important;
    box-shadow: 0px 0 10px 0px rgba(0, 0, 0, 0.03);
    border-radius: 10px !important;
    background-color: var(--surface-75);
}

/* =============== fav page ==================== */

.favCard,
.verticalCard {
    box-shadow: 0px 0 10px 0px rgba(0, 0, 0, 0.03);
    border-radius: 10px !important;
    padding: 8px;
    height: 100%;
    background-color: var(--surface-75);
}

.favCard .favCarImg,
.verticalCard .favCarImg {
    min-width: 100%;
    min-height: 137px;
    border-radius: 5px;
    height: 150px;
    object-fit: cover;
    max-height: 200px;
}

.favCard .carName,
.verticalCard .carName {
    color: #397ccd;
}

.w-40 {
    width: 40px;
}

.favCard .w-20 {
    width: 20px;
}

.favCard .gray-color,
.verticalCard a {
    color: var(--muted-color);
}

.adv-time,
.verticalCard .adv-time {
    background-color: var(--surface-50);
    color: var(--muted-color);
    padding: 8px 15px;
    border-radius: 50px;
    font-family: NeoSansLight;
    font-size: 15px;
}

.verticalCard .adv-time {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    font-size: 12px;
}

.favCard .fa-heart.fas,
.favButton.fav-btn .fas {
    color: #e14747;
}

.favCard .far,
.verticalCard .far {
    color: #a6a7ad;
}

.verticalCard .favButton {
    background-color: var(--surface-75);
    position: absolute;
    top: 10px;
    left: 10px;
    bottom: auto;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    border: 1px solid var(--border-color);
}

.verticalCard .favCarImg {
    height: 160px;
}

.verticalCard .favButton i {
    font-size: 15px;
    padding-top: 3px;
}

.favCard .When-communicating,
.verticalCard .When-communicating {
    color: #fe8628;
}

.favCard .price-title,
.verticalCard .price-title {
    color: var(--muted-color);
}

.nav-tabs {
    border-bottom: none;
    text-align: end;
    justify-content: end;
    margin-bottom: 25px;
}

.nav-tabs .nav-link.active {
    color: #ffffff;
    background-color: #2fd67b;
    border: none !important;
    border-radius: 25px;
}

.nav-tabs .nav-link {
    border: none !important;
    background: #f5f5f5;
    color: #000;
    border-radius: 50px;
    padding-inline: 40px;
    margin-inline-start: 10px;
}

.favButton.active i {
    color: #e14747;
}

.favButton {
    position: absolute;
    left: 0px;
    top: auto;
    cursor: pointer;
    z-index: 800;
    bottom: 0;
    font-size: 30px;
    padding: 0;
}

.CarPlateImage {
    background-color: #f4f4f4;
    min-width: 250px;
    border-radius: 5px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.pagination .page-link {
    color: #4d4f5c;
    border-radius: 5px;
    border-color: #e8e9ec;
}

.pagination .page-item {
    margin-inline: 5px;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #2fd67b;
    border-color: #2fd67b;
}

#brandsSlider {
    background-color: var(--surface-50);
    border-radius: 15px;
}

#brandsSlider .swiper-slide {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brandsSlider .swiper-button-next,
.brandsSlider .swiper-button-prev {
    position: relative;
    box-shadow: 0px 4px 24.4px 0px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
}

.brandsSlider .swiper-button-prev:after,
.brandsSlider .swiper-button-next:after {
    content: url(../images/icons/greenArrow.svg);
    height: max-content;
    line-height: 0;
    padding-bottom: 4px;
}

.brandsSlider .swiper-button-next:after {
    transform: scaleX(-1);
}

.brandsSlider .swiper-button-next {
    right: auto;
    left: auto;
    top: -56px;
    margin-inline-end: auto;
    margin-inline-start: -55px;
}

.brandsSlider .swiper-button-prev {
    right: auto;
    left: auto;
    top: -77px;
    margin-inline-start: auto;
    margin-inline-end: -55px;
}

.brandsSlider .swiper-free-mode > .swiper-wrapper {
    display: flex;
    align-items: center;
}

#carsFilterModal .btn-group label.btn,
#CarPlatesFilterModal .btn-group label.btn,
.btn-group label.btn {
    transition: all 0.3s ease-in-out;
}

#carsFilterModal .btn-group label.btn:hover,
#CarPlatesFilterModal .btn-group label.btn:hover,
.btn-group label.btn:hover {
    background-color: #2fd67b;
    color: #fff;
}

#carsFilterModal .modal-content,
#CarPlatesFilterModal .modal-content {
    border-radius: 0px;
    padding: 30px;
    background: #f5f5f5;
}

#carsFilterModal .btn-check:checked + .btn-outline-primary,
#CarPlatesFilterModal .btn-check:checked + .btn-outline-primary {
    background-color: #2fd67b;
    border-color: #2fd67b;
    color: #fff !important;
}

#carsFilterModal .btn-outline-primary,
#CarPlatesFilterModal .btn-outline-primary {
    color: #212121;
    border-color: #eeeeee;
    background: #eeeeee;
    border-radius: 25px;
    margin-inline-end: 10px;
    font-size: 14px;
}

.form-control.no-icon {
    padding-inline: 20px !important;
}

#carsFilterModal .form-control,
#CarPlatesFilterModal .form-control {
    color: #5a5a5a;
    font-family: NeoSansLight;
}

.autoFilterInput {
    width: 350px;
}

.autoFilterInput .form-control {
    border-radius: 50px;
}

.line-view .item {
    flex: 0 0 100%;
    max-width: 100%;
}

.grid-view .item .favCard .row {
    flex-direction: column;
}

.grid-view .item .favCard .row .col-lg-8,
.grid-view .item .favCard .row .me-lg-4,
.grid-view .item .favCard .row .col-lg-4 {
    width: 100%;
}

.grid-view .item .favCard .row .col-lg-8 .d-md-flex {
    display: block !important;
}

.grid-view .item .favCard .favCarImg {
    min-width: 100%;
}

.grid-view .item .favCard .mt-lg-5 {
    margin-top: 1rem !important;
}

.grid-view .item .favCard .pt-lg-4 {
    padding-top: 0rem !important;
}

.active-view {
    color: #2fd67b !important;
}

#CarPlates .CarPlateImage .plate,
.CarPlateImage .plate {
    background-color: var(--surface-75);
    color: var(--body-color);
    border: 2px solid var(--body-color);
    border-radius: 10px;
    display: flex;
    overflow: hidden;
}

.ar-num {
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 24px;
    direction: rtl;
    unicode-bidi: embed;
}

#CarPlates .CarPlateImage .plate .row,
.CarPlateImage .plate .row {
    max-width: 180px;
}

#CarPlates .CarPlateImage .plate .border-bottom,
.CarPlateImage .plate .border-bottom {
    border-bottom: 2px solid var(--body-color) !important;
}

#CarPlates .CarPlateImage .plate .border-end,
.CarPlateImage .plate .border-end {
    border-inline-end: 2px solid var(--body-color) !important;
}

.grid-view .item .CarPlateImage .plate .row,
.CarPlateImage .plate .row {
    flex-direction: row;
}

.grid-view .item .CarPlateImage {
    min-width: 190px;
}

#CarPlates .CarPlateImage .plate .ksaLogo,
.CarPlateImage .plate .ksaLogo {
    width: 15px;
    border-inline-end: 2px solid var(--body-color);
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding-block: 5px;
}

#CarPlates .CarPlateImage .plate .ksaLogo span,
.CarPlateImage .plate .ksaLogo span {
    font-weight: 700;
    font-size: 11px;
}

.border-card {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0px 0px 31px 4px rgba(0, 0, 0, 0.03);
    background-color: var(--surface-75);
    color: var(--body-color);
}

.addAd .nav-tabs {
    justify-content: center;
}

.addAd .form-control,
.editAdvForm .form-control {
    padding-inline: 20px !important;
    font-size: 14px;
    font-family: NeoSansLight;
    color: #5a5a5a;
}

.addAd .ext,
.editAdvForm .ext,
.ext {
    position: absolute;
    left: 25px;
    bottom: 12px;
    font-weight: 700;
    color: #5a5a5a;
}

.topSlider img {
    height: 400px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 20px;
    background: var(--surface-50);
}

.thumbsSlider img {
    height: 150px;
    border-radius: 13px;
    cursor: pointer;
    object-fit: contain;
    /* background: #eee; */
    aspect-ratio: auto;
}

.thumbsSlider img:hover {
    cursor: pointer;
}

.thumbsSlider .swiper-slide-thumb-active img {
    border: 3px solid #2fd67b;
}

.owner-img {
    width: 40px;
    height: 40px;
    border-radius: 50px;
}

.yellow-star {
    color: #f8d44c;
}

.rate {
    color: #888888;
}

.aboutAdv-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--muted-color);
    background-color: var(--surface-75);
}

.green-btn {
    background-color: #31de87;
}

.gray-btn {
    background-color: #80858e;
}

.red-btn {
    background-color: #f3513e;
}

.green-btn,
.gray-btn,
.red-btn {
    font-size: 13px;
    min-width: 103px;
    padding-block: 7px;
}

.advContact .phoneInfo {
    background-color: var(--surface-50);
    color: var(--body-color);
}

.commentsBlock {
    background-color: var(--surface-50);
}

.commentsBlock .comment-box {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--surface-75);
    padding-inline-end: 50px;
    position: relative;
    color: var(--body-color);
}

.commentsBlock .comment-text {
    margin: 10px 0;
    font-size: 14px;
    color: var(--muted-color);
    max-width: 80%;
}

.commentsBlock .reply {
    color: var(--body-color);
    cursor: pointer;
    text-align: end;
    width: fit-content;
    margin-inline-start: auto;
    margin-top: -20px;
}

.commentsBlock .active-comment {
    border: 2px solid #28a745;
}

.commentsBlock .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.commentsBlock .reply:hover {
    text-decoration: underline;
}

.commentsBlock .input-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
}

.commentsBlock .input-box textarea {
    flex: 1;
    margin-right: 10px;
    border: none;
    border-radius: 8px;
    padding: 10px;
    background-color: transparent;
    height: 80px !important;
    resize: none;
}

.commentsBlock .input-box button {
    padding: 10px 15px;
    width: 100px;
}

.commentsBlock .reply-box {
    width: 90%;
    margin-inline-start: auto;
    margin-inline-end: 20px;
}

.commentsBlock .reply-line {
    width: 80px;
    background-color: #ffffff;
    margin-right: 10px;
    position: absolute;
    height: 118%;
    right: -80px;
    top: -15px;
    border-inline-start: 2px solid #28a745;
    border-bottom: 2px solid #28a745;
    z-index: -1;
}

.rating-stars {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.rating-stars .star {
    font-size: 50px;
    color: #d1d9de;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-inline: 10px;
}

.rating-stars .star.hover,
.rating-stars .star.active {
    color: #ffc107;
}

.follow-btn {
    border: 1px solid #31de87;
    border-radius: 50px;
    padding: 8px 30px !important;
}

.profile-img {
    background-image: url(../images/profile-bg.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: #ffffff;
    width: max-content;
    padding: 33px;
    margin: auto;
    margin-top: -100px;
    margin-bottom: 30px;
}

.profile-img img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid #31de87;
}

.notification-list .notif-bg,
.messages-list .messageImg-bg {
    background-color: #f2f2f2;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-list .notif-item p,
.messages-list .message-item p,
.follow-item p {
    color: var(--muted-color);
}

.notification-list .notif-item,
.messages-list .message-item,
.follow-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.notification-list .notif-item:last-child,
.messages-list .message-item:last-child,
.follow-item:last-child {
    border-bottom: 0;
    padding-bottom: 0px;
    margin-bottom: 0px;
}

.notif-num,
.message-time .message-num {
    background: #31de87;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    min-width: 25px;
    display: block;
    text-align: center;
    color: #fff;
    margin-inline: auto;
    margin-bottom: 8px;
}

.notification-list .time,
.messages-list .message-time .time {
    font-size: 15px;
    color: var(--muted-color);
}

.chat-container {
    background-color: var(--surface-50);
    padding: 30px;
}

.chat-message {
    display: flex;
    margin-bottom: 20px;
}

.chat-message p {
    margin-bottom: 0;
    font-size: 13px;
    padding: 10px 10px 10px 10px;
    display: flex;
}

.chat-message.received {
    justify-content: flex-end;
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 25px;
    max-width: 25%;
}

.chat-bubble.sent {
    background-image: linear-gradient(to right, #26b94d, #1ea441);
    color: white;
    border-top-right-radius: 0;
    min-width: 25%;
}

.chat-bubble.received {
    background-color: var(--surface-75);
    color: var(--body-color);
    border-top-left-radius: 0;
    min-width: 25%;
    border: 1px solid var(--border-color);
}

.chat-bubble .time {
    display: block;
    text-align: end;
    font-size: 13px;
    color: #f2f2f2;
}

.chat-bubble.received .time {
    color: var(--muted-color);
}

.send-box {
    background-color: var(--surface-50);
    padding-bottom: 25px;
    padding-inline: 15px;
}

.send-box .input-group {
    border-radius: 50px;
    overflow: hidden;
    max-width: 90%;
    background-color: var(--surface-75);
    border: 1px solid var(--border-color);
    margin: 0 !important;
}

.send-box .input-group input {
    background-color: var(--surface-75);
    color: var(--body-color);
}

#recordBtn {
    width: 51px;
    height: 51px;
    max-width: 51px;
    max-height: 51px;
    min-width: 51px;
    min-height: 51px;
    background-color: #26b94d;
    border-radius: 50%;
    color: #fff;
    margin-inline-start: 25px;
    font-size: 22px;
}

.chatPage .messageImg-bg img.user {
    width: 60px;
    height: 60px;
}

.profile-items {
    background-color: var(--surface-50);
    border-radius: 5px;
    color: var(--body-color);
}

.profile-items .userMail {
    color: var(--muted-color);
    font-size: 12px;
}

.userBlock {
    background-image: url(../images/profile-bg.svg);
    background-repeat: no-repeat;
    background-position: 100% 0;
    background-size: 120px;
    padding: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 35px;
    margin-bottom: 10px;
}

.userBlock img {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    border-radius: 50%;
    /* background-image: linear-gradient(to left, #31df87, #26b94d); */
    padding: 3px;
}

.linksList .dashed-border {
    border-bottom: 2px dashed var(--border-color);
}

.linksList .dashed-border i {
    color: var(--icon-color);
}

.linksList a {
    color: var(--body-color) !important;
}

.linksList a h6 {
    color: var(--body-color) !important;
}

.upload-box-container {
    display: flex;
    gap: 20px;
    justify-content: start;
    flex-wrap: wrap;
}

/* Styling each Dropzone box */

.dropzone-box {
    width: 120px;
    height: 90px;
    min-height: 90px;
    border: none;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    padding: 0 !important;
}

.dropzone-box .dz-message {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.dropzone-box .dz-preview {
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropzone .dz-preview .dz-remove {
    font-size: 14px;
    text-align: center;
    display: block;
    cursor: pointer;
    border: none;
    background: #ff0000;
    z-index: 999999999999;
    position: absolute;
    top: 3px;
    right: 3px;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
}

.dropzone-box .dz-preview img {
    object-fit: contain;
}

.dropzone .dz-preview.dz-image-preview {
    background: #fafafa;
    border-radius: 5px;
    margin: 0;
}

.dropzone .dz-preview .dz-image {
    border-radius: 5px !important;
    overflow: hidden;
    width: 100% !important;
    height: 100% !important;
    position: relative;
    display: flex;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.add-upload-btn {
    text-align: center;
    background: #fafafa;
    width: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.add-upload-btn i {
    color: #5a5a5a;
}

#add-upload-box {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.upload-box-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-switch .form-check-input {
    width: 41px;
    border-radius: 50px !important;
}

.upload-report-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 7px;
    width: 100%;
    max-width: 90%;
    background-color: #fafafa;
    height: 50px;
}

.upload-report-container .uploadIcons {
    position: absolute;
    left: 13%;
    color: #a6a7ad;
}

.upload-report-container input[type="file"] {
    display: none;
}

.upload-report-container .upload-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    cursor: pointer;
    color: #a6a7ad;
}

.upload-report-container .upload-label {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    flex-grow: 1;
    padding-inline: 13px 84px;
}

.form-control[readonly] {
    background-color: #fafafa;
    opacity: 1;
}

.display-value {
    padding-top: 12px;
}

#deleteModal .accept-btn,
.addAd .accept-btn {
    background-color: #2fd67b;
    border-radius: 25px;
    height: 45px;
    color: #fff;
    width: 140px;
}

#deleteModal .cancel-btn,
.addAd .cancel-btn {
    background-color: #e14747;
    border-radius: 25px;
    height: 45px;
    color: #fff;
    width: 140px;
}

#deleteModal .modal-content {
    border-radius: 0;
    padding: 50px 30px;
    background: #f5f5f5;
    color: #5a5a5a;
}

.swiper-slide .dropzone-box {
    height: 115px;
}

.delete-follow {
    background-color: #e0e0e0;
    color: #f3513e;
    border-radius: 15px;
    width: 40px;
    height: 40px;
    line-height: 2.5;
    padding: 0;
    text-align: center;
}

.show-follow {
    background-color: #31de87;
    color: #fff;
    border-radius: 15px;
    width: 40px;
    height: 40px;
    line-height: 2.5;
    padding: 0;
    text-align: center;
}

.commission {
    border: 1px dashed #b1b1b1;
    border-radius: 6px;
}

.commission h6 {
    color: #5a5a5a;
}

.userRateBlock img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.searchInput .form-control {
    padding-inline: 0px !important;
}

/* ============== media =============== */

@media (min-width: 990px) {
    .time_date {
        position: absolute;
        top: 10px;
        left: 15px;
    }

    .plateAdvDetails .CarPlateImage .plate .row {
        max-width: 500px;
    }

    .plateAdvDetails .CarPlateImage .plate .row span {
        font-size: 50px;
    }

    .plateAdvDetails .CarPlateImage .plate .ksaLogo {
        width: 33px;
        border-inline-end: 4px solid var(--body-color);
    }

    .plateAdvDetails .CarPlateImage .plate .ksaLogo span {
        font-size: 25px;
    }

    .plateAdvDetails .CarPlateImage .plate .border-bottom {
        border-bottom: 4px solid var(--body-color) !important;
    }

    .plateAdvDetails .CarPlateImage .plate {
        border: 4px solid var(--body-color);
    }

    .plateAdvDetails .CarPlateImage {
        background-color: var(--surface-50);
        border-radius: 22px;
        padding-block: 50px;
    }

    .plateAdvDetails .CarPlateImage .plate .border-end {
        border-inline-end: 4px solid var(--body-color) !important;
    }
}

@media (max-width: 1286px) and (min-width: 990px) {
    .adv-time {
        padding: 8px 15px;
        font-size: 11px;
    }

    .favButton {
        bottom: -3px;
        font-size: 26px;
        padding: 0;
    }
}

@media (max-width: 1200px) {
    nav .default-btn {
        width: 100%;
        margin-block: 15px;
    }
}

@media (max-width: 991px) {
    #recordBtn {
        margin-inline-start: 5px;
    }

    .send-box .input-group input {
        background-color: #fff;
        padding-inline: 15px !important;
    }

    .chat-bubble {
        padding: 10px 15px;
        border-radius: 15px;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    .chat-container {
        padding: 15px;
    }

    .time_date {
        position: absolute;
        top: 15px;
        left: 15px;
        width: 90%;
    }

    .time_date .favButton,
    .time_date .btn {
        background-color: #fff;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2px;
    }

    .time_date .adv-time {
        margin-inline-end: auto !important;
        right: 10px;
        padding: 5px 15px;
        font-size: 12px;
    }

    .time_date .favButton i {
        font-size: 15px;
        padding-top: 3px;
    }

    .rating-stars .star {
        font-size: 30px;
    }

    .commentsBlock .input-box textarea {
        padding-inline: 10px !important;
    }

    .commentsBlock .input-box button {
        width: auto;
    }

    .commentsBlock .comment-box {
        padding-inline-end: 20px;
    }

    .commentsBlock .reply-box {
        margin-inline-end: 0;
    }

    .commentsBlock .reply-line {
        display: none;
    }

    .copyRight {
        text-align: center;
    }

    .d-none-md {
        display: none;
    }

    .modal-content {
        padding: 20px 0px;
    }

    .prev-step {
        position: absolute;
        left: 0;
        top: -60px;
    }

    .addAd .prev-step {
        top: -111px;
        left: -20px;
        z-index: 9999;
    }

    #mainSlider img {
        width: 100%;
        height: 200px;
    }

    .favCard .favCarImg {
        min-width: 100%;
        min-height: 200px;
        border-radius: 5px;
        height: 200px;
        object-fit: cover;
    }

    .brandsSlider .swiper-button-prev {
        right: auto;
        left: auto;
        top: auto;
        bottom: 20px;
        margin-inline-start: auto;
        margin-inline-end: 0;
    }

    .brandsSlider .swiper-button-next {
        right: 0;
        left: auto;
        top: 0;
        margin-inline-end: auto;
        margin-inline-start: 0;
    }

    #carsFilterModal .modal-content,
    #CarPlatesFilterModal .modal-content {
        padding: 30px 0;
    }

    #carsFilterModal .btn-outline-primary,
    #CarPlatesFilterModal .btn-outline-primary {
        font-size: 11px;
    }

    #carsFilterModal .modal-content .btn-close,
    #CarPlatesFilterModal .modal-content .btn-close {
        position: absolute;
        left: 20px;
        top: 20px;
        z-index: 99999;
    }

    .autoFilterInput {
        width: 200px;
    }

    .favButton {
        font-size: 24px;
    }

    .adv-time {
        padding: 5px 15px;
    }

    .topSlider img {
        height: 200px;
    }

    .thumbsSlider img {
        height: 80px;
    }

    .notification-list .notif-bg,
    .messages-list .messageImg-bg {
        min-width: 40px;
        min-height: 40px;
        width: 40px;
        height: 40px;
    }

    .notif-time,
    .message-time {
        top: -4px !important;
        bottom: auto !important;
        display: flex;
        gap: 11px;
        direction: ltr;
    }
}

@media (min-width: 991px) {
}

@media (max-width: 768px) {
}

#chatInput {
    height: 100px !important;
}

#chatImgUpload {
    display: none;
}

.custom-file-upload {
    display: flex;
    justify-content: center;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--bs-green);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    align-items: center;
}

.custom-file-upload:hover {
    background: var(--bs-green);
    color: white;
}

.custom-file-upload:active {
    transform: scale(0.95);
}

#details {
    border: 1px solid #c7c7c7;
    padding: 10px !important;
}

#complaintModal {
    z-index: 9999 !important;
}

.modal.fade .modal-dialog {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.modal.fade.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

#imageModal .modal-img-zoom {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

#imageModal .modal-img-zoom:hover {
    transform: scale(1.5);
}

.chat-bubble-img {
    width: 100%;
}

/* --- chat images grid --- */
.chat-images {
    display: grid;
    gap: 6px;
    width: 100%;
}

/* default item styling */
.chat-image-item {
    overflow: hidden;
    border-radius: 8px;
    background: #f2f2f2;
}
.chat-image-item img.chat-bubble-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* 1 image: full width */
.chat-images[data-count="1"] {
    grid-template-columns: 1fr;
}
.chat-images[data-count="1"] .chat-image-item {
    aspect-ratio: 16 / 9; /* wide image */
}

/* 2 images: each 50% */
.chat-images[data-count="2"] {
    grid-template-columns: 1fr 1fr;
}
.chat-images[data-count="2"] .chat-image-item {
    aspect-ratio: 1 / 1;
}

/* 3 images: two small stacked (25%) and one large (50%) */
/* layout: column-left small stacked, right large spanning two rows */
.chat-images[data-count="3"] {
    grid-template-columns: 25% 1fr;
    grid-template-rows: 1fr 1fr;
}
.chat-images[data-count="3"] .chat-image-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}
.chat-images[data-count="3"] .chat-image-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}
.chat-images[data-count="3"] .chat-image-item:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / span 2;
    height: 100%;
}

/* ensure small stacked items look square-ish */
.chat-images[data-count="3"] .chat-image-item:nth-child(1),
.chat-images[data-count="3"] .chat-image-item:nth-child(2) {
    aspect-ratio: 1 / 1;
}

/* 4 or more: grid of 4 items per row each 25% (if more than 4, wraps to next row) */
.chat-images[data-count="4"],
.chat-images[data-count="5"],
.chat-images[data-count="6"],
.chat-images[data-count="7"],
.chat-images[data-count="8"],
.chat-images[data-count="9"] {
    grid-template-columns: repeat(4, 1fr);
}
.chat-images[data-count="4"] .chat-image-item,
.chat-images[data-count="5"] .chat-image-item,
.chat-images[data-count="6"] .chat-image-item,
.chat-images[data-count="7"] .chat-image-item,
.chat-images[data-count="8"] .chat-image-item,
.chat-images[data-count="9"] .chat-image-item {
    aspect-ratio: 1 / 1;
}

/* responsive adjustments */
@media (max-width: 576px) {
    .chat-images[data-count="3"] {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .chat-images[data-count="3"] .chat-image-item:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 16 / 9;
    }

    .chat-images[data-count="2"],
    .chat-images[data-count="4"],
    .chat-images[data-count="5"],
    .chat-images[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

.togglePassword {
    cursor: pointer;
}

.incorrect-info {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.is-incorrect ~ .incorrect-info {
    display: block;
}

.is-invalid {
    border-color: #dc3545;
}

.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* chat attach file input */

.chat-attach-file-input {
    background: transparent;
    border: none;
    color: #495057;
    font-size: 18px;
    cursor: pointer;
    padding: 10px 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.chat-attach-file-input:hover {
    background: var(--bs-green);
    color: white;
}
.chat-attach-file-input:focus {
    outline: none;
}
.chat-attach-file-input i {
    pointer-events: none;
}

/* adDropzone */

#adDropzone.dropzone {
    border: 2px dashed #d0d7de;
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
}
#adDropzone .dz-message {
    margin: 0;
    color: #495057;
}
#adDropzone .dz-preview {
    display: inline-block;
    margin: 6px;
}

/* Force Dropzone progress visibility in case theme overrides hide it */
.dropzone .dz-preview .dz-progress {
    opacity: 1 !important;
    display: none !important;
    pointer-events: none !important;
}
.dropzone .dz-preview .dz-progress .dz-upload {
    background: linear-gradient(
        90deg,
        rgba(47, 214, 123, 1) 0%,
        rgba(38, 180, 85, 1) 100%
    ) !important;
    height: 100% !important;
    width: 0 !important; /* JS will update inline width */
}

.dropzone-container {
    min-height: 150px;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    background: #fafafa !important;
    padding: 20px 20px;
    border-radius: 10px !important;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.custom-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    text-align: justify;
}

.custom-modal .close {
    position: absolute;
    left: 15px;
    top: 0px;
    font-size: 30px;
    cursor: pointer;
    transition: 0.5s;
}

.custom-modal .close:hover {
    transform: scale(1.2);
}

.swiper-nav-btn {
    color: var(--bs-green);
}

.edit-page-dropzone {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}
