﻿/* בסיס עיצובי עם גופן Rubik */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f7fa;
    font-family: 'Rubik', sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 820px;
    margin: 30px auto;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

    .container:hover {
        transform: translateY(-4px);
    }

header {
    background: linear-gradient(135deg, #0061bf 0%, #004a8f 100%);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

    header img {
        max-height: 60px;
        vertical-align: middle;
        margin-left: 12px;
    }

    header .title {
        font-size: 26px;
        font-weight: 500;
        display: inline-block;
        vertical-align: middle;
    }

    header .subtitle {
        font-size: 14px;
        font-weight: 300;
        margin-top: 4px;
        display: block;
        color: #e0e9fb;
    }

.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
}

.content {
    padding: 30px 25px;
}

.section {
    margin-bottom: 30px;
}

    .section h2 {
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 12px;
        color: #0055a4;
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 6px;
    }

.invoice-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

    .invoice-info div {
        flex: 1 1 calc(50% - 15px);
        background-color: #fdfdfe;
        border: 1px solid #e3e8ef;
        border-radius: 6px;
        padding: 16px;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
        transition: background-color 0.2s ease;
    }

        .invoice-info div:hover {
            background-color: #f0f4f9;
        }

    .invoice-info label {
        font-weight: 500;
        display: block;
        margin-bottom: 6px;
        color: #444;
    }

    .invoice-info span {
        display: block;
        font-size: 15px;
        color: #333;
        word-break: break-word;
    }

/* טבלת פרטים מתקדמת */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    direction: rtl;
}

    table thead {
        background-color: #f0f4f9;
    }

    table th,
    table td {
        padding: 14px 10px;
        text-align: center;
        border: 1px solid #e2e6ed;
        font-size: 14px;
        color: #333;
    }

    table th {
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    table tbody tr:nth-of-type(odd) {
        background-color: #fcfdfe;
    }

    table tbody tr:hover {
        background-color: #eef2f7;
    }

.total-row td {
    font-size: 16px;
    font-weight: 700;
    color: #0055a4;
}

/* כפתור תשלום מעוצב יותר */
.payment-button {
    text-align: center;
    margin: 40px 0 20px;
}

    .payment-button button {
        display: inline-block;
        background: linear-gradient(135deg, #0078e7 0%, #0055a4 100%);
        color: #fff;
        text-decoration: none;
        padding: 16px 36px;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 500;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
        transition: background 0.3s ease, transform 0.2s ease;
    }

        .payment-button button:hover {
            background: linear-gradient(135deg, #0055a4 0%, #003d77 100%);
            transform: translateY(-2px);
        }

/* הנחיות נוספות */
.instructions {
    font-size: 14px;
    color: #555;
    background-color: #fdfdfe;
    border-left: 4px solid #0055a4;
    padding: 15px 18px;
    border-radius: 4px;
    line-height: 1.6;
}

    .instructions a {
        color: #0055a4;
        text-decoration: none;
        font-weight: 500;
    }

        .instructions a:hover {
            text-decoration: underline;
        }

/* פוטר מודרני */
.footer {
    background-color: #f0f4f9;
    padding: 18px 25px;
    font-size: 13px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e2e6ed;
}

    .footer a {
        color: #0055a4;
        text-decoration: none;
        margin: 0 6px;
        font-weight: 500;
    }

        .footer a:hover {
            text-decoration: underline;
        }

/* רספונסיביות */
@media (max-width: 700px) {
    .invoice-info div {
        flex: 1 1 100%;
    }

    table th,
    table td {
        font-size: 13px;
        padding: 10px 6px;
    }

    .payment-button a {
        width: 100%;
        padding: 14px 0;
        font-size: 15px;
    }
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.payment-method-option {
    flex: 1 1 120px;
    min-width: 120px;
    max-width: 220px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
    margin-bottom: 0.5rem;
}

    .payment-method-option input[type="radio"] {
        margin-left: 0.5em;
        accent-color: #0078d4;
    }

.method-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.85rem;
}

.method-icon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    margin-left: 0.5em;
}

@media (max-width: 600px) {
    .payment-methods {
        display: block;
        flex-direction: column;
        gap: 0.75rem;
    }

    .payment-method-option {
        max-width: 100%;
        min-width: 0;
        padding: 0.3rem;
        /*        width: 100%;*/
        font-size: 1rem;
        /*        padding: 0.75rem;*/
    }

    .method-label {
        font-size: 1rem;
    }

    .method-icon {
        width: 60px;
        height: 60px;
    }
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

    #loadingOverlay.active {
        display: flex !important;
    }

.spinner {
    border: 6px solid #e0e0e0;
    border-top: 6px solid #4a90e2;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}




#paymentModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    #paymentModal.active {
        display: flex !important;
    }

    #paymentModal > div {
        background: #fff;
        border-radius: 8px;
        width: 90vw;
        max-width: 700px;
        height: 90vh;
        max-height: 700px;
        position: relative;
        display: flex;
        flex-direction: column;
        padding: 0;
        box-sizing: border-box;
    }

#paymentIframe {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
    min-height: 0;
}