/* Haramain Request Stock Plugin CSS */

/* 01. Request Stock button font size */
.hrs-btn {
    font-size: 12px !important; /* Added !important for stronger override */
    padding: 8px 15px !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background-color 0.3s ease !important;
    border-radius: 5px !important; /* Default slight round */
    line-height: 1.5 !important; /* Ensure text sits well */
    margin: 5px 0; /* Add some margin */
}

/* 03. Product page Request Stock button color */
.hrs-btn {
    background-color: #00793a !important;
    color: #fff !important;
}

.hrs-btn:hover {
    background-color: #005f2e !important; /* Slightly darker on hover */
    color: #fff !important;
}

/* 02. Product page Request Stock button left alignment */
/* On single product page, move button to left */
.product .summary .hrs-single-product-btn {
    float: left; /* Align to the left */
    margin-right: 10px; /* Optional: space from next element */
    clear: both; /* Ensures it clears previous floating elements */
    width: auto; /* Allow button to size naturally */
}


/* Popup container */
.hrs-popup-overlay {
    display: flex; /* Changed to flex for centering */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Increased z-index to be absolutely sure it's on top of EVERYTHING */
    z-index: 9999999; 
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    visibility: hidden; /* Hidden by default, will be controlled by JS 'display' */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.hrs-popup-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* 04. Popup content and button styling */
.hrs-popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px; /* Rounded corners for the popup */
    text-align: center; /* Center content inside popup */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Stronger shadow */
    max-width: 450px; /* Slightly wider */
    width: 90%;
    position: relative; /* Crucial for z-index of children like close button */
    transform: translateY(-20px); /* Initial slight move up */
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    /* Also ensure content is above overlay but below close button */
    z-index: 1000; /* Relative to overlay's high z-index, this can be lower */
}

.hrs-popup-overlay.active .hrs-popup-content {
    transform: translateY(0);
    opacity: 1;
}

.hrs-popup-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.8em; /* Slightly larger heading */
    margin-bottom: 20px;
}

.hrs-popup-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 25px;
}

.hrs-popup-content input[type="text"] {
    width: calc(100% - 20px);
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px; /* Slightly rounded input */
    font-size: 1.1em;
    box-sizing: border-box; /* Include padding in width */
}

.hrs-popup-content .hrs-submit-popup {
    background-color: #00793a;
    color: #fff;
    border: none;
    padding: 15px 30px; /* Larger padding */
    border-radius: 30px; /* Fully rounded button */
    cursor: pointer;
    font-size: 1.1em; /* Larger font */
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: auto; /* Allow button to size naturally */
    min-width: 150px; /* Minimum width */
    font-weight: bold;
}

.hrs-popup-content .hrs-submit-popup:hover {
    background-color: #005f2e;
    transform: translateY(-2px); /* Slight lift effect */
}

.hrs-close-button {
    position: absolute; /* Essential for z-index and placement */
    top: 15px;
    right: 15px;
    font-size: 30px; /* Larger close button */
    cursor: pointer;
    color: #888;
    line-height: 1;
    transition: color 0.3s ease;
    /* Ensure close button is on top of everything inside popup and overlay */
    z-index: 1001; /* Must be higher than popup-content's z-index */
}

.hrs-close-button:hover {
    color: #333;
}

.hrs-message {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1em;
    color: #00793a; /* Success message color */
}

/* Added responsiveness for smaller screens */
@media (max-width: 600px) {
    .hrs-popup-content {
        padding: 20px;
        border-radius: 10px;
    }
    .hrs-popup-content h3 {
        font-size: 1.5em;
    }
    .hrs-popup-content p {
        font-size: 1em;
    }
    .hrs-popup-content input[type="text"] {
        padding: 10px;
        font-size: 1em;
    }
    .hrs-popup-content .hrs-submit-popup {
        padding: 12px 25px;
        font-size: 1em;
    }
    .hrs-close-button {
        font-size: 26px;
    }
}