﻿/*general popup style start*/

/* שכבת רקע כהה */
.general-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    overflow: hidden; /* חשוב - אין גלילה על כל הפופאפ */
    padding: 20px;
    box-sizing: border-box;
}

/* קופסת הפופאפ */
.general-popup-history {
    position: relative;
    width: min(900px, 92vw);
    height: min(700px, 88vh);
    min-width: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f7;
}

/* תוכן */
.general-popup-content-history {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 28px 20px 28px;
    box-sizing: border-box;
}

/* כפתור X */
/*.popup-close-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 34px;
    height: 34px;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.popup-close-btn:hover {
    transform: scale(1.08);
    opacity: 0.85;
}*/

/* פס עליון */
.general-popup-top-line {
    width: 70px;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5, #027aff);
    border-radius: 999px;
    margin: 0 auto 14px auto;
}

/* כותרת */
.general-popup-title-history {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 22px;
}

/* כותרת טבלה */
.general-popup-history-list-header {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #334155;
    font-size: 15px;
    flex-shrink: 0;
}

/* אזור הרשימה - רק כאן תהיה גלילה */
.general-popup-history-list-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 4px;
    padding-right: 4px;
    margin-bottom: 18px;
}

    /* עיצוב סרגל גלילה */
    .general-popup-history-list-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .general-popup-history-list-scroll::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 10px;
    }

    .general-popup-history-list-scroll::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

        .general-popup-history-list-scroll::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* שורה */
.general-popup-history-row {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    min-height: 58px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .general-popup-history-row:hover {
        background: #f8fbff;
        border-color: #cbd5e1;
    }

/* כפתור שקוף על כל השורה */
.general-popup-history-row-click-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    z-index: 2;
}

/* עמודות */
.general-popup-col-id {
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

.general-popup-col-header {
    text-align: center;
    color: #334155;
}

.general-popup-col-data {
    text-align: center;
    color: #334155;
}

.general-popup-col-data-amount {
    direction: ltr;
}

.general-popup-status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.general-popup-status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.general-popup-price-cell {
    white-space: nowrap;
}

.general-popup-currency-symbol {
    font-weight: 600;
    color: #334155;
}

/* תחתית */
.general-popup-footer-history {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding-top: 6px;
}

/* כפתור סגירה */
.general-popup-close-main-btn {
    min-width: 150px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #4f46e5, #027aff);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .general-popup-close-main-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
    }

.general-popup-close-btn-fa {
    position: absolute;
    top: 18px;
    right: 18px;
    left: auto;
    width: 42px;
    height: 42px;
    border: none;
    background: #ffffff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
    overflow: hidden;
}

    .general-popup-close-btn-fa:hover {
        background: #f8fafc;
        color: #0f172a;
        transform: scale(1.08);
    }

    .general-popup-close-btn-fa i {
        pointer-events: none;
    }

/* תבנית עמודות אחידה גם לכותרת וגם לשורות */
.general-popup-history-grid {
    display: grid;
    align-items: center;
    column-gap: 0;
}

/* התאמה למסכים קטנים */
@media (max-width: 768px) {
    .general-popup-history {
        width: 96vw;
        height: 90vh;
        min-width: unset;
        border-radius: 18px;
    }

    .general-popup-content-history {
        padding: 20px 16px 16px 16px;
    }

    .general-popup-title-history {
        font-size: 22px;
    }

    .general-popup-history-list-header,
    .general-popup-history-row {
        font-size: 13px;
        padding: 12px 10px;
    }
}

.general-popup-open {
    display: flex;
}

.general-popup-close {
    display: none;
}

.general-popup-col-time {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    width: fit-content;
    font-weight: 500;
}
/*general popup style end*/


/*popup-credit-history adjustments*/
.popup-credit-history .general-popup-history-grid {
    grid-template-columns: 16% 16% 16% 16% 16% 20%;
}

/*popup-claims-history start*/

/*claims*/
/* שכבת רקע כהה */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    overflow: hidden; /* חשוב - אין גלילה על כל הפופאפ */
    padding: 20px;
    box-sizing: border-box;
}

/* קופסת הפופאפ */
.popup-history-claims {
    position: relative;
    width: min(900px, 92vw);
    height: min(700px, 88vh);
    min-width: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f7;
}

/* רקע דקורטיבי */
.popup-bg-history {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

/* תוכן */
.popup-content-history {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 28px 20px 28px;
    box-sizing: border-box;
}

/* כפתור X */
.popup-close-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 34px;
    height: 34px;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.popup-close-btn:hover {
    transform: scale(1.08);
    opacity: 0.85;
}

/* פס עליון */
.popup-top-line {
    width: 70px;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5, #027aff);
    border-radius: 999px;
    margin: 0 auto 14px auto;
}

/* כותרת */
.popup-title-history {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 22px;
}

/* כותרת טבלה */
.history-list-header {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #334155;
    font-size: 15px;
    flex-shrink: 0;
}

/* אזור הרשימה - רק כאן תהיה גלילה */
.history-list-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 4px;
    padding-right: 4px;
    margin-bottom: 18px;
}

/* עיצוב סרגל גלילה */
.history-list-scroll::-webkit-scrollbar {
    width: 8px;
}

.history-list-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.history-list-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.history-list-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* שורה */
.history-claim-row {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    min-height: 58px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-claim-row:hover {
    background: #f8fbff;
    border-color: #cbd5e1;
}

/* כפתור שקוף על כל השורה */
.history-row-click-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    z-index: 2;
}

/* עמודות */
.col-claim-id {
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

.col-claim-type {
    text-align: center;
    color: #334155;
}

.col-claim-date {
    text-align: center;
    color: #334155;
}

.col-claim-status {
    text-align: center;
    color: #334155;
}

.col-claim-price {
    text-align: center;
    font-weight: 700;
    color: #334155;
}

/* עזר */
.text-center {
    text-align: center;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.price-cell {
    white-space: nowrap;
}

.currency-symbol {
    font-weight: 600;
    color: #334155;
}

/* תחתית */
.popup-footer-history {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding-top: 6px;
}

/* כפתור סגירה */
.popup-close-main-btn {
    min-width: 150px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #4f46e5, #027aff);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close-main-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
}

.popup-close-btn-fa {
    position: absolute;
    top: 18px;
    right: 18px;
    left: auto;
    width: 42px;
    height: 42px;
    border: none;
    background: #ffffff;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
    overflow: hidden;
}

.popup-close-btn-fa:hover {
    background: #f8fafc;
    color: #0f172a;
    transform: scale(1.08);
}

.popup-close-btn-fa i {
    pointer-events: none;
}

/* תבנית עמודות אחידה גם לכותרת וגם לשורות */
.history-grid {
    display: grid;
    grid-template-columns: 10% 30% 20% 30% 10%;
    align-items: center;
    column-gap: 0;
}

/* התאמה למסכים קטנים */
@media (max-width: 768px) 
{
    .popup-history-claims {
        width: 96vw;
        height: 90vh;
        min-width: unset;
        border-radius: 18px;
    }

    .popup-content-history {
        padding: 20px 16px 16px 16px;
    }

    .popup-title-history {
        font-size: 22px;
    }

    .history-list-header,
    .history-claim-row {
        font-size: 13px;
        padding: 12px 10px;
    }
}

/*popup-claims-history end*/

/*popup-credit start*/

.popup-credit-date {
    display: inline-block;
    width: 100px;
    color: #606b86;
    padding-left: 5px;
    padding-right: 5px;
    height: 33px;
    line-height: 45px;
    border-radius: 6px;
    border: solid 1px #a3a3a4;
    background-color: #fbfdfe;
    margin-right: 20px;
    text-align: center;
    font-size: 12pt;
    margin-bottom: 15px;
}
/*popup-credit end*/

/*disappearing-message start*/
.popup-disappearing-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 99999;
    opacity: 0;
    display: none;
    align-items: center;
    gap: 10px;
    direction: rtl;
    min-width: 250px;
    justify-content: center;
    background: linear-gradient(90deg, #4f46e5, #027aff);
    color: #fff;
    transition: all 0.2s ease;
}

/*disappearing-message end*/
