﻿/* Trigger Button */
.ipg-demo-trigger {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

    .ipg-demo-trigger:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

/* Modal Overlay */
.ipg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .ipg-modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Modal Content (flex layout) */
.ipg-modal-content {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 96vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ipg-modal-overlay.active .ipg-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header (fixed) */
.ipg-modal-header {
    background: linear-gradient(135deg, #922582 0%, #47093A 50%, #34192f 100%);
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

    .ipg-modal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('../images/x.png');
    }

.ipg-modal-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.ipg-modal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px !important;
    margin: 4px 0 0 0;
    position: relative;
    z-index: 1;
}

/* Scrollable Body Wrapper */
.ipg-modal-body-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 17px;
}

.ipg-modal-body {
    min-width: 363px;
}

/* Modal Footer (fixed) */
.ipg-modal-footer {
    flex-shrink: 0;
    padding: 9px 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Info Note (optional) */
.ipg-modal-info {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ipg-modal-info::before {
        content: "ℹ️";
        font-size: 16px;
    }

/* OK Button */
.ipg-ok-btn {
    background: linear-gradient(135deg, #922582 0%, #47093A 50%, #34192f 100%);
    color: white;
    border: none;
    padding: 8px 28px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(146, 37, 130, 0.3);
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

    .ipg-ok-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .ipg-ok-btn:hover::before {
        left: 100%;
    }

    .ipg-ok-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(146, 37, 130, 0.4);
        background: linear-gradient(135deg, #a12d94 0%, #52104a 50%, #3d1f36 100%);
    }

    .ipg-ok-btn:active {
        transform: translateY(0);
        box-shadow: 0 4px 15px rgba(146, 37, 130, 0.3);
    }

    .ipg-ok-btn::after {
        content: "✓";
        font-size: 16px;
        margin-left: 4px;
    }

/* Table Container */
.ipg-table-container {
    background: white;
    border-radius:10px;
    box-shadow: 0 8px 25px rgba(146, 37, 130, 0.08);
    border: 1px solid rgba(146, 37, 130, 0.1);
    overflow: hidden;
    position: relative;
}

/* Table */
.ipg-modern-table {
    width: 100%;
    border-spacing: 0;
    background: white;
    border-collapse: collapse;
}

    .ipg-modern-table thead th {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        color: #475569;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 12px 20px;
        text-align: left;
        border-bottom: 2px solid #e2e8f0;
        z-index: 10;
    }

        .ipg-modern-table thead th.text-center {
            text-align: center;
        }

    .ipg-modern-table tbody tr {
        transition: all 0.2s ease;
        border-bottom: 2px solid #d1d5db;
    }

        .ipg-modern-table tbody tr:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            transform: translateX(4px);
            box-shadow: 4px 0 12px rgba(146, 37, 130, 0.08);
        }

    .ipg-modern-table tbody td {
        padding: 12px 20px;
        font-size: 14px;
        color: #334155;
        vertical-align: middle;
        border-right: 1px solid #f1f5f9;
        border-bottom: 1px solid #e2e8f0;
    }

        .ipg-modern-table tbody td:last-child {
            border-right: none;
        }

/* Account Cell Styling */
.ipg-account-cell {
    background: linear-gradient(135deg, #92258220 0%, #47093A20 100%);
    font-weight: 600;
    color: #34192f;
    position: relative;
}

    .ipg-account-cell::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #922582 0%, #47093A 50%, #34192f 100%);
    }

/* IPG Cell */
.ipg-ipg-cell {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: #f8fafc;
    font-weight: 500;
}

/* Fee Cells */
.ipg-fee-cell {
    text-align: center;
    font-weight: 600;
}

.ipg-fee-visa {
    color: #34192f;
    background: linear-gradient(135deg, #92258230 0%, #47093A20 100%);
}

.ipg-fee-amex {
    color: #47093A;
    background: linear-gradient(135deg, #47093A30 0%, #34192f20 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .ipg-modal-content {
        width: 95%;
        margin: 10px;
    }

    .ipg-modal-header {
        padding: 20px;
    }

    .ipg-modal-body-wrapper {
        padding: 20px;
    }

    .ipg-modal-title {
        font-size: 20px;
    }

    .ipg-modal-subtitle {
        font-size: 13px;
    }

    .ipg-modern-table thead th,
    .ipg-modern-table tbody td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .ipg-modal-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ipg-modal-title {
        font-size: 18px;
    }

    .ipg-modal-subtitle {
        font-size: 12px;
    }

    .ipg-modern-table thead th,
    .ipg-modern-table tbody td {
        padding: 5px 12px;
        font-size: 12px;
    }

    .ipg-modal-header {
        padding: 16px;
    }

    .ipg-modal-body-wrapper {
        padding: 16px;
    }
}

/* Ultra-tall screen fix */
@media (min-height: 1080px) {
    .ipg-modal-content {
        max-height: 90vh;
    }
}
