/* custom.css - סגנונות מותאמים לאתר */

/* משתנים מותאמים */
:root {
    --primary-color: #5e72e4;
    --secondary-color: #8392ab;
    --success-color: #2dce89;
    --info-color: #11cdef;
    --warning-color: #fb6340;
    --danger-color: #f5365c;
    --light-color: #e9ecef;
    --dark-color: #344767;
    --font-primary: 'Rubik', 'Open Sans', sans-serif;
}

/* כללי */
body {
    font-family: var(--font-primary);
    direction: rtl;
    text-align: right;
}

/* תיקוני RTL */
.dropdown-menu {
    text-align: right;
}

.ms-auto {
    margin-right: auto !important;
    margin-left: initial !important;
}

.me-auto {
    margin-left: auto !important;
    margin-right: initial !important;
}

.float-end {
    float: left !important;
}

.float-start {
    float: right !important;
}

/* טיפול בצורות חיצי תפריט נפתח */
.dropdown .dropdown-menu:before {
    right: auto !important;
    left: 10px !important;
}

/* תיקון מיקום אייקונים */
.navbar-vertical .navbar-nav .nav-link > i {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* כפתור חזרה למעלה */
#back-to-top-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#back-to-top-btn:hover {
    transform: translateY(-5px);
}

/* תיבת הצ'אט */
.chat-box {
    height: 400px;
    overflow-y: auto;
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 15px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

/* הודעות בצ'אט */
.justify-content-end .text-dark span {
    background: linear-gradient(310deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 15px 15px 5px 15px;
    padding: 10px 15px;
    display: inline-block;
    max-width: 80%;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.justify-content-start .text-dark span {
    background: #f8f9fa;
    color: var(--dark-color);
    border-radius: 15px 15px 15px 5px;
    padding: 10px 15px;
    display: inline-block;
    max-width: 80%;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* תיקון כיווניות טקסט */
.rtl{
    direction: rtl;
}
.ltr{
    direction: ltr;
}

button[data-bs-target="#sendSmsMessage"] {
    pointer-events: all !important;
    cursor: not-allowed;
}

/* רשימת מספרי טלפון */
#phone_number {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bs-gray-200);
    border-radius: 15px;
    box-shadow: 0px 2px 12px 4px rgba(0, 0, 0, 0.1);
}

#phone_number .list-group-item {
    border: none;
    /* border-bottom: 1px solid rgba(0, 0, 0, 0.05); */
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

#phone_number .list-group-item.active-phone {
    background-color: var(--bs-body-color);
    color: white;
}
#phone_number .list-group-item.active-phone h6 {
    color: white;
}
#phone_number .list-group-item.active-phone .badge {
    background-color: white;
    color: var(--primary-color);
}
#phone_number .list-group-item.active-phone:hover {
    background-color: var(--primary-color);
    color: var(--bs-body-color);
}
#phone_number .list-group-item.active-phone:hover h6 {
    color: var(--bs-body-color);
}
#phone_number .list-group-item .badge {
    background-color: var(--secondary-color);
    color: white;
    margin-left: 10px;
}
#phone_number .list-group-item .badge:hover {
    background-color: var(--primary-color);
    color: white;
}

#phone_number .list-group-item:hover {
    background-color: rgba(94, 114, 228, 0.1);
    /* transform: translateX(-5px); */
}

#phone_number .badge {
    float: left;
}

/* מונה תווים */
#counter {
    background: linear-gradient(310deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* שדה הזנת הודעה */
/* #message-input {
    border-radius: 10px 0 0 10px;
    height: 45px;
    font-size: 1rem;
    border: 1px solid #d2d6da;
    padding-right: 15px;
} */

#message-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(94, 114, 228, 0.1);
}

/* #send-message {
    border-radius: 0 10px 10px 0;
    height: 45px;
    background: linear-gradient(310deg, var(--primary-color), var(--info-color));
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
} */

#send-message:hover {
    transform: translateX(-3px);
}


/* אנימציה להודעות חדשות */
.new-message {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.list-group-item.number {
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-group-item.number:hover {
    background-color: rgba(94, 114, 228, 0.05) !important;
}

/* כרטיסים */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover:not(.disable-animation){
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ספירה מספרית באנימציה */
.countup {
    transition: all 0.5s ease;
}

/* מדיה קוורי */
@media (max-width: 991.98px) {
    .sidenav.fixed-end {
        right: 0 !important;
    }
    
    .g-sidenav-show:not(.rtl):not(.g-sidenav-hidden) .sidenav {
        transform: translateX(0);
    }
}

/* תיקונים למצב כהה */
.dark-version .chat-box {
    background-color: #111;
}

.dark-version .justify-content-start .text-dark span {
    background-color: #2b2b2b;
    color: #fff;
}

.dark-version #phone_number {
    background-color: #111;
}

.dark-version #message-input {
    background-color: #2b2b2b;
    color: #fff;
    border-color: #444;
}

/* התאמות לדף הבית */
.page-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: 50%;
}

.mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all .15s ease;
}

.text-gradient.text-primary {
    background-image: linear-gradient(310deg, #5e72e4, #825ee4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

/* כפתורים */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* התאמות לטפסים */
.form-control:focus + .input-group-text {
    border-color: var(--primary-color);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* התראות */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-dismissible .btn-close {
    left: 0.6rem;
    right: auto;
    top: 0.4rem;
    bottom: 0.4rem;
    padding: 1rem !important;
}
.alert-dismissible .btn-close span {
    line-height: 0;
    font-size: 1.6rem;
    position: relative;
    top: -1px;
}

/* התאמות לחשבוניות */
.invoice-card {
    border-radius: 20px;
}

.invoice-title {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* לוח הסטטיסטיקות */
.stats-card {
    overflow: hidden;
    position: relative;
}

.stats-card .icon-shape {
    width: 70px;
    height: 70px;
    background: linear-gradient(310deg, rgba(94, 114, 228, 0.2), rgba(94, 114, 228, 0.7));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-card i {
    font-size: 1.5rem;
    color: white;
}

/* ספירת תווים */
.text-dark {
    transition: all 0.3s ease;
}

.text-danger.counter {
    color: var(--danger-color) !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* המכיל של דף לוח בקרה */
.dashboard-container {
    padding: 1.5rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-weight: 700;
    color: var(--dark-color);
}

.dashboard-subtitle {
    color: var(--secondary-color);
    font-weight: 400;
}

/* מודל */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    padding: 0.5rem;
    opacity: 1;
}

/* טבלאות */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: rgba(0, 0, 0, 0.02);
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(94, 114, 228, 0.05);
}

/* דף משתמש לא מחובר */
.landing-page {
    position: relative;
}

.landing-page .page-header {
    min-height: 100vh;
}

.landing-page .shape {
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 0;
}

.landing-page .shape svg {
    width: 100%;
    height: auto;
}

.landing-page .card-image {
    min-height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 15px 15px 0 0;
}