/* Iframe Overlay */
#iframeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
}

/* Iframe Wrapper */
#iframeWrapper {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 90%; /* Responsive width */
    max-width: 500px; /* Max width for larger screens */
    height: auto; /* Adjust height based on content */
    max-height: 90vh; /* Max height to prevent overflow on small screens */
    overflow-y: auto; /* Enable scrolling if content exceeds max-height */
    display: flex;
    flex-direction: column; /* Stack content vertically */
}

/* Close Button */
#closeIframeButton {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #333;
    line-height: 1; /* For better vertical alignment of 'x' */
    padding: 0;
    z-index: 1001; /* Above iframe content */
}

#closeIframeButton:hover {
    color: #870505;
}

/* The actual Iframe */
#contactIframe {
    border: none; /* Remove default iframe border */
    width: 100%;
    height: 100%; /* Will be dynamically adjusted by JS, but keep for base */
    flex-grow: 1; /* Allow iframe to take available space in flex column */
}

/* Styles for the form inside the iframe (optional, but good for consistency) */
/* You might want to replicate some of your #contact-form styles here */
/* These styles would typically go into a separate CSS file that the iframe loads,
   but for simplicity, we'll inline them into the iframe's HTML for this tutorial. */