/* Basic footer styling */
footer {
    background-color: #000; /* Black background for the footer */
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative;
    border-radius: 0 0 10px 10px; /* Rounded bottom corners */
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    border: 1px solid rg/* Extra small mobile devices with more aggressive zoom-out */
@media (max-width: 480px) {
    .calculator-iframe {
        height: 85vh !important;
        min-height: 500px;
        transform: scale(0.70); /* Increased zoom-out by 5% (from 0.75 to 0.70) */
        transform-origin: center top;
    }
    
    #cashout-calculator-modal .modal-iframe {
        height: 85vh;
        min-height: 500px;
        transform: scale(0.70); /* Increased zoom-out by 5% (from 0.75 to 0.70) */
        transform-origin: center top;
    }
}/* Black border */
    text-shadow: 4px 4px 8px rgb(252, 182, 4); /* Add subtle white shadow */
    box-shadow: 0 0 20px rgba(241, 190, 4, 0.6); /* Soft red shadow for emphasis */
}

/* Footer links */
.footer-links {
    margin-bottom: 10px;
}

.footer-links ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    display: inline;
    margin: 0 10px;
}

.footer-links ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.footer-links ul li a:hover {
    text-decoration: underline;
}

/* Footer "Chat Now" button with Messenger styling */
.chat-button-footer {
    position: fixed;
    bottom: 20px; /* Distance from the bottom of the page */
    right: 20px; /* Distance from the right edge of the page */
    padding: 12px 20px; /* Increased padding for a larger clickable area */
    background: linear-gradient(45deg, #007bff, #0056b3); /* Same gradient as header button */
    color: white;
    text-decoration: none;
    border-radius: 25px; /* Match header button roundness */
    font-size: 16px; /* Larger font size for readability */
    font-weight: bold; /* Bold text for emphasis */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Slight shadow for depth */
    transition: all 0.3s ease;
    z-index: 1000; /* Ensure it's above other content */
    border: 1px solid rgb(252, 182, 4); /* Gold border */
    box-shadow: 0 0 20px rgba(241, 190, 4, 0.6); /* Matching shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
    animation: chatButtonAnimation 4s infinite; /* Add animation from header */
}

/* Contact modal Chat Now button: reuse chat-button-footer animation and style for inline use */
.contact-chat-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: #fff;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgb(252, 182, 4);
    box-shadow: 0 6px 18px rgba(0,132,255,0.18), 0 2px 8px rgba(0,0,0,0.12);
    transition: all 0.25s ease;
    cursor: pointer;
    animation: chatButtonAnimation 4s infinite;
}

.contact-chat-now:hover {
    background: linear-gradient(45deg, #28a745, #1e7e34); /* green hover */
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(40,167,69,0.35);
    color: #fff;
}

.contact-chat-now:active {
    background: linear-gradient(45deg, #1e7e34, #155724) !important;
}

/* Ensure icon inside modal chat button pulses like messenger icon */
.contact-chat-now .messenger-icon {
    width: 16px;
    height: 16px;
    animation: pulseIcon 2s infinite;
}

/* Button hover effect with matching header style */
.chat-button-footer:hover {
    background: linear-gradient(45deg, #28a745, #1e7e34); /* green hover */
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(40,167,69,0.35);
    color: #fff;
}

/* Button pressed effect */
.chat-button-footer:active {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(40,167,69,0.35);
    /* active -> darker green */
    background: linear-gradient(45deg, #1e7e34, #155724) !important;
}

/* Messenger Icon Styling in Footer */
.chat-button-footer .messenger-icon {
    width: 18px;
    height: 18px;
    animation: pulseIcon 2s infinite;
}

/* Animation for the messenger icon - same as header */
@keyframes pulseIcon {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile optimizations for footer chat button */
@media (max-width: 767px) {
    .chat-button-footer {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 25px;
        background: linear-gradient(45deg, #007bff, #0056b3);
        color: #fff;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgb(252, 182, 4);
        box-shadow: 0 0 20px rgba(241, 190, 4, 0.6);
        bottom: 15px;
        right: 15px;
        z-index: 1000;
        animation: chatButtonAnimation 4s infinite;
        transition: all 0.3s ease;
    }
    /* Mobile modal chat button sizing */
    .contact-chat-now {
        padding: 9px 14px;
        font-size: 14px;
        border-radius: 18px;
    }
    .chat-button-footer .messenger-icon {
        width: 16px;
        height: 16px;
        animation: pulseIcon 2s infinite;
    }
}

/* Chat Button Animation - Facebook Messenger colors - same as header */
@keyframes chatButtonAnimation {
    0%, 100% {
        background: linear-gradient(45deg, #007bff, #0056b3); /* Start with standard blue */
    }
    50% {
        background: linear-gradient(45deg, #00B2FF, #006AFF); /* Facebook Messenger blue */
    }
}

/* Global fixed chat button used site-wide */
.chat-footer-fixed {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 9999;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    animation: fadeIn 0.28s ease-out;
}

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

/* Modal iframe sizing optimized for calculator */
.modal-iframe { 
    width: 100%; 
    height: 700px; /* Increased height for calculator */
    border: none; 
    overflow: auto;
}

/* Calculator-specific modal sizing for full image capture - Desktop optimized */
.calculator-iframe {
    height: 1056px !important; /* Increased by 10% from 960px (960 * 1.1 = 1056) */
    min-height: 750px;
    width: 638px !important; /* Reduced by 15% from 750px (750 * 0.85 = 637.5) */
    border: none !important;
    background: transparent !important;
    margin: 0;
    display: block;
    box-sizing: border-box;
}

#cashout-calculator-modal .modal-iframe {
    height: 1056px; /* Increased by 10% from 960px */
    min-height: 750px;
    min-width: 638px; /* Reduced by 15% from 750px */
    max-width: 638px;
    margin: 0 auto;
    display: block;
}

/* Modal content styling - Top-aligned for upward expansion */
#cashout-calculator-modal .modal-inner-content {
    max-height: 90vh;
    overflow: auto;
    padding: 0;
    width: 638px; /* Match reduced iframe width */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for upward expansion */
    box-sizing: border-box;
}

#cashout-calculator-modal .iframe-modal-content {
    width: 638px; /* Match reduced iframe width */
    max-width: 95vw;
    margin: 0 auto; /* Center the content */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal positioning - Top-aligned for upward expansion */
#cashout-calculator-modal.modal {
    display: flex;
    align-items: flex-start; /* Align to top for upward expansion */
    justify-content: center; /* Center horizontally */
    padding: 0;
    padding-top: 50px; /* Small padding from top edge */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0,0,0,0.4);
}
    width: auto;
    margin: 0 auto; /* Center the modal content */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center iframe inside modal */
}

/* Center the iframe within its container */
#cashout-calculator-modal .modal-inner-content {
    max-height: 90vh;
    overflow: auto;
    padding: 0;
    min-width: 750px;
    display: flex;
    justify-content: center; /* Center the iframe horizontally */
    align-items: flex-start; /* Align to top */
}

/* Tablet and medium screen responsiveness */
@media (max-width: 900px) {
    #cashout-calculator-modal .iframe-modal-content {
        min-width: 95vw;
        max-width: 95vw;
        margin: 0 auto;
    }
    
    .calculator-iframe {
        min-width: 95vw;
        max-width: 95vw;
    }
    
    #cashout-calculator-modal .modal-iframe {
        min-width: 95vw;
    }
    
    #cashout-calculator-modal .modal-inner-content {
        min-width: 95vw;
    }
    
    #cashout-calculator-modal.modal {
        padding: 10px;
        align-items: flex-start;
    }
}

/* Mobile-specific optimizations with zoom-out approach */
@media (max-width: 768px) {
    .calculator-iframe {
        height: 90vh !important;
        min-height: 600px;
        min-width: 750px;
        transform: scale(0.80); /* Increased zoom-out by 5% (from 0.85 to 0.80) */
        transform-origin: center top;
        margin: 0 auto;
        border-radius: 8px;
    }
    
    #cashout-calculator-modal .modal-iframe {
        height: 90vh;
        min-height: 600px;
        min-width: 750px;
        transform: scale(0.80); /* Increased zoom-out by 5% (from 0.85 to 0.80) */
        transform-origin: center top;
    }
    
    #cashout-calculator-modal .iframe-modal-content {
        min-width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }
    
    #cashout-calculator-modal .modal-inner-content {
        min-width: 100vw;
        max-width: 100vw;
        padding: 0;
        overflow-x: hidden;
    }
    
    #cashout-calculator-modal.modal {
        padding: 0;
        align-items: flex-start;
        justify-content: center;
    }
}

/* Extra small mobile devices with more aggressive zoom-out */
@media (max-width: 480px) {
    .calculator-iframe {
        height: 85vh !important;
        min-height: 500px;
        transform: scale(0.75); /* More aggressive zoom-out for small screens */
        transform-origin: center top;
    }
    
    #cashout-calculator-modal .modal-iframe {
        height: 85vh;
        min-height: 500px;
        transform: scale(0.75);
        transform-origin: center top;
    }
}

/* General Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black with opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Centered in the viewport */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px;
    border-radius: 8px;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Fire flash animation for text box */
.fire-flash-textbox {
    animation: fireFlash 1s ease;
}

@keyframes fireFlash {
    0% { background-color: #000; color: #fff; }
    25% { background-color: #ff6f00; color: #000; }
    50% { background-color: #ffcc00; color: #000; }
    75% { background-color: #ff6f00; color: #000; }
    100% { background-color: #000; color: #fff; }
}
