/* Custom reCAPTCHA badge styling */
.grecaptcha-badge {
    visibility: visible !important;
    opacity: 0.9 !important;
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important; /* Moved further from edge to avoid scrollbar */
    z-index: 1039 !important; /* Lowered z-index to be below modal backdrop (1040) */

    /* Collapse to only show icon */
    width: 70px !important;
    overflow: hidden !important;
    transform-origin: bottom right;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.3) !important;
    border-radius: 2px !important;
}

/* Allow the badge to expand on hover */
.grecaptcha-badge:hover {
    width: auto !important;
    transition: width 0.3s ease-in-out !important;
}

/* Responsive adjustments */
@media screen and (min-width: 1200px) {
    .grecaptcha-badge {
        right: 25px !important; /* More space on larger screens */
    }
}

@media screen and (max-width: 600px) {
    .grecaptcha-badge {
        right: 15px !important; /* Less space on mobile */
        bottom: 85px !important; /* Higher position on mobile */
    }
}

/* For devices with visible scrollbars */
@media screen and (overflow: scroll) {
    .grecaptcha-badge {
        right: 30px !important; /* Even more space when scrollbars are visible */
    }
}

/* Add margin to the footer to ensure content isn't hidden */
.footer, footer {
    margin-bottom: 70px !important;
}

/* Debug section styling */
#debug {
    margin-top: 20px;
    display: none;
}