import os

filepath = '/var/www/html/user-dashboard/resources/views/registrations.blade.php'
with open(filepath, 'r') as f:
    content = f.read()

# Add height: 100% and display: block to the iframe container or iframe itself
new_content = content.replace(
    '''    iframe#payment-iframe {
        width: 100%;
        flex: 1;
        border: none;
        background: #fff;
        overflow-y: auto;
    }''',
    '''    iframe#payment-iframe {
        width: 100%;
        height: 100%;
        display: block;
        border: none;
        background: transparent;
    }'''
)

with open(filepath, 'w') as f:
    f.write(new_content)

print("Replaced CSS for payment-iframe")
