/* variables from theme configuration */
:root {
    --am_logo_link: 1;
--am_bg: #f1f5f9;
--am_bg_size: 100%;
--am_bg_size_px: 100%;
--am_bg_attachment: scroll;
--am_bg_repeat: no-repeat;
--am_color: #f1f5f9;
--am_link_color: #3f7fb0;
--am_btn_color: #4e80a6;
--am_text_color: #303030;
--am_color_c: #0e0a06;
--am_color_d: #bfc3c7;
--am_logo_align: center;
--am_logo_width: 100%;
--am_logo_width_px: 100%;
--am_max_width: 900;
--am_max_width_px: 900px;
--am_font_size: 14;
--am_font_size_px: 14px;
--am_font_family: Roboto;
--am_drop_shadow: 1;
--am_content_shadow: 0px 0px 5px #00000022;;
--am_login_layout: layout.phtml;
--am_login_bg: none;
--am_login_bg_color: unset;
--am_login_shadow: none;
--am_login_legend_bg: #f9f9f9;
--am_login_legend_padding_top: 1em;
--am_login_form_bg_color: #f9f9f9;
--am_login_header_display: block;
--am_header_bg_color: #bddef9;
--am_header_bg_size: cover;
--am_header_bg_size_px: cover;
--am_header_bg_repeat: no-repeat;
--am_header_bg: #bddef9;
--am_menu_color: #eb6653;
--am_menu_dashboard: icon;
--am_dashboard_layout: two-col;
--am_identity_align: left;
--am_identity_type: login;
--am_page_bg_color: #ffffff;
--am_page_bg: #ffffff;
--am_header_menu_link_color: #000000;
--am_header_menu_link2_color: #000000;
--am_header_menu_bg_color: #f1f5f9;
--am_footer_bg: none;
--am_footer_text_color: #0d0d0d;
--am_footer_link_color: #0d0d0d;
--am_sm_size: 18;
--am_sm_size_px: 18px;
--am_sm_color: #0d0d0d;
--am_header_logo: 11;
--am_home_url: https://app.adsgpt.io/amember/member;
--am_body_finish_out: <script>
// Define the HTML content you want to insert as a new element
const newElement = document.createElement('a');
newElement.href = "https://app.adsgpt.io/amember/member";
newElement.style = `
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
`;

// Create the image element
const logoImage = document.createElement('img');
logoImage.classList.add('am-header-content-logo');
logoImage.src="https://dashboard.adsgpt.io/assets/ads-logo-CcxBb02l.webp";
logoImage.alt = "AdsGPT";

// Append the image to the anchor element
newElement.appendChild(logoImage);

// Find the target element where you want to insert the new element
const targetElement = document.querySelector('.am-form.am-auth-form.am-login-form');

// Insert the new element as the first child
if (targetElement) {
    targetElement.insertBefore(newElement, targetElement.firstChild);
} else {
    console.error("Target element not found");
}

// Function to add overlay and show modal
function addOverlay() {
  const parentElement = document.querySelector(".am-sendpass-form-wrapper");

  if (!document.getElementById('overlay')) {
    const overlay = document.createElement('div');
    overlay.id = 'overlay';
    overlay.style.position = 'fixed';
    overlay.style.top = '0';
    overlay.style.left = '0';
    overlay.style.width = '100%';
    overlay.style.height = '100%';
    overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
    overlay.style.zIndex = '9999'; // Ensure overlay is on top
    document.body.appendChild(overlay);
  }

  // append close icon also
  if (!document.getElementById("modal_close_id")) {
    const closeIcon = document.createElement("span");
    closeIcon.id = "modal_close_id";
    closeIcon.innerHTML = "&times;"; // × symbol
    closeIcon.style.fontSize = "3rem";
    closeIcon.style.height = "fit-content";
    closeIcon.style.position = "absolute";
    closeIcon.style.top = "0";
    closeIcon.style.right = "1rem";
    closeIcon.style.cursor = "pointer";
    closeIcon.style.zIndex = "29";
      // Add onclick attribute to call removeOverlay function
    closeIcon.setAttribute("onclick", "removeOverlay()");
    parentElement.appendChild(closeIcon);
  }

  // Show the modal
  const modal = document.querySelector('.am-sendpass-form-wrapper');
  if (modal) {
    modal.style.display = 'block';
  }
  document.querySelector(".am-login-form-wrapper").style.display = "flex";
}

// Function to remove overlay and hide modal
function removeOverlay() {
  const overlay = document.getElementById('overlay');
  if (overlay) {
    overlay.remove();
  }
  console.log("Removed overlay")

  // Hide the modal
  const modal = document.querySelector('.am-sendpass-form-wrapper');
  if (modal) {
    modal.style.display = 'none';
  }
}

document.addEventListener('DOMContentLoaded', function () {
  // Attach event listener to the link to open overlay and show modal
  const loginSwitchLink = document.querySelector('.am-form-login-switch-wrapper a');
  if (loginSwitchLink) {
    loginSwitchLink.addEventListener('click', function (event) {
      event.preventDefault(); // Prevent default action if it's a link
      addOverlay(); // Open overlay and show modal
    });
  }

  // Attach event listener to the submit button to close overlay and hide modal
  const closeButton = document.querySelector('#modal_close_id');
  if (closeButton) {
    closeButton.addEventListener('click', function (event) {
      event.preventDefault(); // Prevent default form submission
      removeOverlay(); // Close overlay and hide modal
      console.log("modal closed");
    });
  }

  // need to remove login of modal and add new login link 
  const submitButtonElement = document.querySelector('.am-sendpass-form-wrapper .am-row-buttons input[type="submit"]');
  // Define the new HTML content to be inserted after the submit button
  const newElementHTML = `
    <span class="login_modal_button_wrapper" style="text-align:right; font-weight:bold;">
      <a href="/amember/login" class="login_modal_button">Log In</a>
    </span>
  `;
  if (submitButtonElement) {
    submitButtonElement.insertAdjacentHTML('afterend', newElementHTML);
  }



   // Check if the current route contains 'amember/signup'
  if (
    window.location.pathname.includes("amember/signup") || 
    window.location.pathname.includes("amember/sendpass")
  ) {
    // Select the elements to apply styles to
    const bodyContentWrapper = document.querySelector(".am-body .am-body-content-wrapper");
    const commonHeading = document.querySelector(".am-common h1");
    const bodyContent = document.querySelector(".am-body-content");
    const emailConfirmMessage = document.querySelector("#row-email-confirm-message-0 .am-element");

    // Apply styles to .am-body-content-wrapper
    if (bodyContentWrapper) {
      bodyContentWrapper.style.border = "none";
      bodyContentWrapper.style.paddingBottom = "1em";
      bodyContentWrapper.style.marginBottom = "50px";
      bodyContentWrapper.style.boxShadow = "none";
      bodyContentWrapper.style.borderRadius = "14px";
      bodyContentWrapper.style.background = "#ffffff";
      bodyContentWrapper.style.padding = "35px";
    }

    // Apply styles to .am-common h1
    if (commonHeading) {
      commonHeading.style.fontSize = "24px";
      commonHeading.style.fontWeight = "700";
      commonHeading.style.lineHeight = "1em";
      commonHeading.style.margin = "0 0 0.6em";
      commonHeading.style.textAlign = "center";
      commonHeading.style.color = "#504BB6";
    }

    // Apply styles to .am-body-content
    if (bodyContent) {
      bodyContent.style.display = "flex";
      bodyContent.style.justifyContent = "center";
      bodyContent.style.flexDirection = "column";
      bodyContent.style.gap = "1rem";
    }

    // Apply background color to #row-email-confirm-message-0 .am-element
    if (emailConfirmMessage) {
      emailConfirmMessage.style.background = "#f8f8f8";
      emailConfirmMessage.style.fontWeight = "500";
    }
  }


});

// A tag refreshing with href
const link = document.querySelector('.am-form-login-switch-wrapper a');
if (link) {
  // Set the href attribute to the desired URL
  link.setAttribute('href', 'https://app.adsgpt.io/amember/login');
}
// validation 
  document.addEventListener("DOMContentLoaded", function () {
        // Select the form
        const loginForm = document.querySelector(".am-login-form-form");

        // Check if the form exists
        if (loginForm) {
            // Add submit event listener
            loginForm.addEventListener("submit", function (event) {
                // Prevent form submission
                event.preventDefault();

                // Select the username and password fields
                const usernameField = document.querySelector("#amember-login");
                const passwordField = document.querySelector("input[name='amember_pass']");

                // Clear previous error messages
                let usernameErrorContainer = document.querySelector("#username-error-container");
                let passwordErrorContainer = document.querySelector("#password-error-container");

                // If containers don't exist, create them
                if (!usernameErrorContainer) {
                    usernameErrorContainer = document.createElement("div");
                    usernameErrorContainer.id = "username-error-container";
                    usernameField.parentNode.insertBefore(usernameErrorContainer, usernameField.nextSibling);
                }
                if (!passwordErrorContainer) {
                    passwordErrorContainer = document.createElement("div");
                    passwordErrorContainer.id = "password-error-container";
                    passwordField.parentNode.insertBefore(passwordErrorContainer, passwordField.nextSibling);
                }

                // Clear any previous errors
                usernameErrorContainer.innerHTML = "";
                passwordErrorContainer.innerHTML = "";

                // Add styles dynamically
                const style = document.createElement("style");
                style.innerHTML = `
                    #username-error-container, #password-error-container {
                        margin: 5px 0;
                        color: #d9534f; /* Bootstrap danger color */
                        font-size: 14px;
                        font-weight: bold;
                    }
                    .error-message {
                        background: #f8d7da;
                        padding: 5px 10px;
                        border: 1px solid #f5c2c7;
                        border-radius: 4px;
                        margin-top: 5px;
                    }
                `;
                document.head.appendChild(style);

                let isValid = true;

                // Validate username
                if (!usernameField.value.trim()) {
                    const usernameError = document.createElement("div");
                    usernameError.className = "error-message";
                    usernameError.textContent = "Username/Email is required.";
                    usernameErrorContainer.appendChild(usernameError);
                    isValid = false;
                }

                // Validate password
                if (!passwordField || !passwordField.value.trim()) {
                    const passwordError = document.createElement("div");
                    passwordError.className = "error-message";
                    passwordError.textContent = "Password is required.";
                    passwordErrorContainer.appendChild(passwordError);
                    isValid = false;
                }

                // If all fields are valid, submit the form
                if (isValid) {
                    loginForm.submit();
                }
            });
        }
    });
// tab text





document.addEventListener('DOMContentLoaded', function () {
    // Define the main parent class and target element for the logo
    const resetPasswordLogoTarget = document.querySelector('.am-page-changepass .am-body-content-wrapper.am-main');

    // Create the new anchor element for the logo
    const resetPasswordLogoAnchor = document.createElement('a');
    resetPasswordLogoAnchor.href = "https://app.adsgpt.io/amember/member";
    resetPasswordLogoAnchor.style = `
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    `;
    resetPasswordLogoAnchor.classList.add("amember-reset-password-logo");

    // Create the image element for the logo and set its properties
    const resetPasswordLogoImage = document.createElement('img');
    resetPasswordLogoImage.className = "am-header-content-logo";
    resetPasswordLogoImage.src = "https://dashboard.adsgpt.io/assets/ads-logo-CcxBb02l.webp";
    resetPasswordLogoImage.alt = "AdsGPT";

    // Append the logo image to the anchor element
    resetPasswordLogoAnchor.appendChild(resetPasswordLogoImage);

    // Insert the new anchor element as the first child of the target element
    if (resetPasswordLogoTarget) {
        resetPasswordLogoTarget.insertBefore(resetPasswordLogoAnchor, resetPasswordLogoTarget.firstChild);
        console.log("Logo added successfully.");
    } else {
        console.error("Reset Password Logo Target Element not found.");
    }
});


function updateTitleBasedOnPath() {
  const path = window.location.pathname;

  const titleMap = {
   
    "/amember/signup": "SignUp  AdsGPT | AI Ad Copy Generator & Competitor Insights",
    "/amember/login": "Login AdsGPT | AI Ad Copy Generator & Competitor Insights",
    "/amember/member": "AdGPT | Login",

  };

  document.title = titleMap[path] || "AdsGPT";
}

window.addEventListener("popstate", updateTitleBasedOnPath);
window.addEventListener("load", updateTitleBasedOnPath);
//  free plan logic 

    // Check if the current URL contains '/amember/thanks'
    if (window.location.href.includes('/amember/thanks')) {
        // Check if 'selectedMembershipPlan' exists in localStorage
        const selectedPlan = localStorage.getItem('selectedMembershipPlan');
        if (selectedPlan == 'product-8-8') {
            // Redirect the user to the free trial thank-you page
            window.location.href = "https://adsgpt.io/thank-you-free-trial/";
        }
    }

// auto select 



</script>

<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1321373185696868');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1321373185696868&ev=PageView&noscript=1"
/></noscript>
<script>
document.addEventListener('DOMContentLoaded', function () {
    const usernameInput = document.getElementById('amember-login');
    const passwordInput = document.getElementById('amember-pass');
    const loginButton = document.querySelector('input[type="submit"], button[type="submit"]');

    // Calculate the root domain
    const getRootDomain = () => {
        const hostname = window.location.hostname;
        const parts = hostname.split('.');
        return parts.length > 2 ? `.${parts.slice(-2).join('.')}` : `.${hostname}`;
    };

    // Save username and password to cookies
    const saveDataToCookies = () => {
        const username = usernameInput.value;
        const password = passwordInput.value;
        const rootDomain = getRootDomain();

        if (username) {
            document.cookie = `amember_login=${encodeURIComponent(username)}; domain=${rootDomain}; path=/; secure`;
        }
        if (password) {
            document.cookie = `amember_pass=${encodeURIComponent(password)}; domain=${rootDomain}; path=/; secure`;
        }
    };

    // Save username and password to local storage
    const saveDataToLocalStorage = () => {
        const username = usernameInput.value;
        const password = passwordInput.value;

        if (username && password) {
            localStorage.setItem('amember_login', username);
            localStorage.setItem('amember_pass', password);
        }
    };

    // Save data on form submission
    const handleFormSubmission = () => {
        saveDataToCookies();
        saveDataToLocalStorage();
    };

    // Attach event to login button
    if (loginButton) {
        loginButton.addEventListener('click', handleFormSubmission);
    }

    // Autofill from URL and submit
    const autofillAndSubmit = () => {
        const urlParams = new URLSearchParams(window.location.search);
        const email = urlParams.get('login');
        const pass = urlParams.get('pass');

        if (email && pass) {
            if (usernameInput) usernameInput.value = email;
            if (passwordInput) passwordInput.value = pass;

            handleFormSubmission(); // Save autofilled values

            if (loginButton && !loginButton.disabled) {
                loginButton.click(); // Automatically submit the form
            }
        }
    };

    autofillAndSubmit();


});
</script>;
--am_body_finish_in: <script>
//  free plan logic 

    // Check if the current URL contains '/amember/thanks'
    if (window.location.href.includes('/amember/thanks')) {
        // Check if 'selectedMembershipPlan' exists in localStorage
        const selectedPlan = localStorage.getItem('selectedMembershipPlan');
        if (selectedPlan == 'product-8-8') {
            // Redirect the user to the free trial thank-you page
            window.location.href = "https://app.adsgpt.io/amember/login";
        }
    }

(function autoClickPaymentButton() {
  try {
    const freePlanId = 'product-8-8'; // ID for the Free Plan
    const paymentButtonId = '_qf_page-2_next-0'; // ID for the button to auto-click

    // Function to execute the logic
    const executeLogic = () => {
      const selectedMembershipPlan = localStorage.getItem('selectedMembershipPlan');

      if (selectedMembershipPlan === freePlanId) {
        // Find the button by its ID
        const paymentButton = document.getElementById(paymentButtonId);

        if (paymentButton) {
          try {
            // Ensure the button is not disabled
            if (paymentButton.disabled) {
              console.warn(`Button with ID ${paymentButtonId} is disabled.`);
              return;
            }

            // Attempt to programmatically click the button
            paymentButton.click();
            console.log(`Button with ID ${paymentButtonId} clicked successfully.`);
          } catch (interactionError) {
            console.error(`Error interacting with button ${paymentButtonId}:`, interactionError);
          }
        } else {
          console.warn(`Button with ID ${paymentButtonId} not found.`);
        }
      }
    };

    // Handle cases where the button might be dynamically added
    const waitForButton = () => {
      const interval = setInterval(() => {
        const paymentButton = document.getElementById(paymentButtonId);
        if (paymentButton) {
          clearInterval(interval);
          executeLogic();
        }
      }, 100);

      // Timeout after 10 seconds to avoid infinite loop
      setTimeout(() => clearInterval(interval), 10000);
    };

    // Check DOM readiness
    if (document.readyState === 'complete' || document.readyState === 'interactive') {
      waitForButton();
    } else {
      window.addEventListener('load', waitForButton);
    }
  } catch (error) {
    console.error('Error in auto-click payment button script:', error);
  }
})();

</script>


<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1321373185696868');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1321373185696868&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-T8SHMBRD');</script>
<!-- End Google Tag Manager -->

<script>
document.addEventListener("DOMContentLoaded", () => {
  const menuMemberElement = document.querySelector(".am-tabs-wrapper #menu-member");

  if (menuMemberElement) {
    menuMemberElement.addEventListener("click", function(event) {
      event.preventDefault(); // Stop the default link behavior
      window.location.href = "https://dashboard.adsgpt.io"; // Redirect directly
    });
  } else {
    console.error("Element '.am-tabs-wrapper .active #menu-member' not found!");
  }
});
</script>
<script>
  document.addEventListener("DOMContentLoaded", function () {
    // target parent
    const ProfilePageLogoParentElement = document.querySelector(
      ".am-logged-in.am-page-main .am-body-content-wrapper.am-main .am-body-content-top .am-account-toolbar"
    );

    if (ProfilePageLogoParentElement) {
      // create new image link element
      const ProfilePageChildLogoElement = document.createElement("a");
      ProfilePageChildLogoElement.href =
        "https://dashboard.adsgpt.io";
      ProfilePageChildLogoElement.style.width = "100%";
      ProfilePageChildLogoElement.style.display = "flex";
      ProfilePageChildLogoElement.style.justifyContent = "center";
      ProfilePageChildLogoElement.style.alignItems = "center";
      ProfilePageChildLogoElement.style.marginBottom = "18px";

      const ProfilePageLogoImage = document.createElement("img");
      ProfilePageLogoImage.className = "am-header-content-logo";
      ProfilePageLogoImage.src =
        "https://dashboard.adsgpt.io/assets/ads-logo-CcxBb02l.webp";
      ProfilePageLogoImage.alt = "AdsGPT";

      ProfilePageChildLogoElement.appendChild(ProfilePageLogoImage);
      // add logo image to parent
      ProfilePageLogoParentElement.prepend(ProfilePageChildLogoElement);
    }
  });
</script>
<script>
setTimeout(() => {
  const updateLogoutLink = () => {
    const links = document.querySelectorAll('a[href="/amember/logout"]');
    if (links.length > 0) {
      links.forEach(link => {
        link.href = "https://dashboard.adsgpt.io/logout";
      });
    } else {
      // Retry after 500ms if the element is not found
      setTimeout(updateLogoutLink, 500);
    }
  };

  updateLogoutLink();
}, 1000);

</script>


<script>
setTimeout(()=>{
document.querySelectorAll('a[href^="/amember/admin-users/login-as"]').forEach((link) => {
  if (!link) return; // Safety check

  const span = document.createElement("span");
  span.className = link.className; // Preserve class
  span.innerHTML = link.innerHTML; // Preserve inner HTML
  span.style.cursor = "pointer"; // Make it clickable

  // Extract href safely
  const href = link.getAttribute("href");
  if (!href) {
    console.warn("Invalid or missing href:", link);
    return;
  }

  // Try extracting username
  let username = link.dataset.username?.trim(); // Check if stored in a data attribute

  if (!username) {
    // Try getting the nearest text that could be the username
    const parentRow = link.closest("tr"); // Assuming it's inside a table row
    if (parentRow) {
      username = parentRow.querySelector("td:nth-child(2)")?.textContent?.trim();
    }
  }

  if (!username) {
    console.warn("Username not found for link:", link);
    return;
  }

  // Store username as a dataset attribute for future reference
  span.dataset.username = username;

  // Attach click event to mimic navigation
  span.addEventListener("click", function () {
    console.log("Extracted Username:", username); // Debugging

    // Get the correct domain
    let domain;
    if (location.hostname.includes(".")) {
      domain = "." + location.hostname.split(".").slice(-2).join(".");
    } else {
      domain = location.hostname; // For local development
    }

    // Store username in a cookie (encode for safety)
    document.cookie = `dummy_cookie=${encodeURIComponent(username)}; path=/; domain=${domain}; SameSite=Lax`;

    console.log("Username saved in cookie:", document.cookie); // Debugging output

    // Open link in a new tab
    try {
      window.open(href, "_blank");
    } catch (error) {
      console.error("Failed to open link:", error);
    }
  });

  // Replace <a> with <span>
  link.replaceWith(span);
});
},600)

</script>;
--am_header_path: 67617c2ac83e8.png;
--am_link_color_a99: #3f7fb099;

}
/* end: variables from theme configuration */

body, html {
    font-size: var(--am_font_size_px);
    background: none;
}

html {
    background: var(--am_bg);
    background-size: var(--am_bg_size);
    background-attachment: var(--am_bg_attachment);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.am-layout {
    flex: 1;
}

.am-footer {
    height: auto;
    background: var(--am_footer_bg);
}

.am-common {
    font-family: var(--am_font_family), san-serif;
    color: var(--am_text_color);
}

.am-common legend {
    color: var(--am_text_color);
}

.am-common a {
    color: var(--am_link_color);
    text-decoration-color: var(--am_link_color_a99);
}

.ajax-link, .local-link, .local {
    text-decoration-color: var(--am_link_color_a99);
}

.am-layout {
    min-height: initial;
    margin: 0;
    background: none;
}

.am-header {
    background: var(--am_header_bg);
    background-size: var(--am_header_bg_size);
}

.am-header .am-header-content-wrapper {
    border: none;
    background: none;
}

.am-header-line {
    border:none;
    background: none;
}

.am-footer .am-footer-content-wrapper {
    background: none;
    color: inherit;
    height: auto;
}

.am-footer-content-content {
    padding: 1em 0;
}

.am-footer-text {
    text-align: center;
}

.am-footer .am-footer-content .am-footer-sm a {
    color: var(--am_sm_color);
    font-size: var(--am_sm_size_px);
}

.am-body {
    background: none;
}

.am-body .am-body-content-wrapper {
    border: none;
    padding-bottom: 1em;
    margin-bottom: 50px;
    box-shadow: var(--am_content_shadow);
    border-radius: var(--am_border_radius_px);
    background: var(--am_page_bg);
}

.am-body-content {
    min-height: 300px;
}

.am-header-content-wrapper {
    padding: 0;
}

.am-header-content-content {
    display: none;
}

.am-header .am-header-content .am-header-content-logo {
    float: none;
    margin: 0;
}

.am-header .am-header-content .am-header-logo-wrapper {
    text-align: var(--am_logo_align);
}

.am-main {
    max-width: var(--am_max_width_px);
}

.am-header-content img {
    width: var(--am_logo_width);
}

.am-footer-actions {
    display:none;
}

.am-footer .am-footer-content-wrapper {
    color: var(--am_footer_text_color);
    font-size:.8rem;
}

.am-footer a,
.am-footer a:hover,
.am-footer a:visited,
.am-footer a:active {
    color: var(--am_footer_link_color)
}

.am-user-identity-block {
    float: var(--am_identity_align);
}

.am-page-login .am-header {
    display: var(--am_login_header_display);
}

.am-page-login .am-auth-form legend {
    background: var(--am_login_legend_bg);
    padding-top: var(--am_login_legend_padding_top);
}

.am-page-login .am-auth-form div.am-row {
    background: var(--am_login_form_bg_color);
}

.am-page-login .am-body-content-wrapper {
    background: var(--am_login_bg_color);
    box-shadow: var(--am_login_shadow);
}

.am-auth-form form {
    border: none;
    overflow: hidden;
    box-shadow: 0px 0px 5px #00000022;
}

.am-auth-form form legend {
    border: none;
    background: #f9f9f9;
    padding: 1em 1em 1.5em;
}

.am-auth-form div.am-row div.element,
.am-auth-form div.am-row div.am-element-title {
    padding-right: 2em;
    padding-left: 2em;
}

@media all and (min-width:500px) {

    .am-auth-form div.am-row div.am-element-title {
        padding-right: .5em;
    }
    .am-auth-form div.am-row div.am-element {
        padding-left: .5em;
    }
}

.am-popup {
    border-color: var(--am_color_d);
}

.am-popup .am-popup-header {
    background: var(--am_color);
    color: var(--am_color_c);
}

.am-popup .am-popup-close-icon:after {
    color: var(--am_color_c);
}

.am-fb-login-button-wrapper.am-fb-login-form-after:before,
.am-fb-login-button-wrapper.am-fb-login-form-before:after {
    background: var(--am_color);
}

.am-popup .am-fb-login-button-wrapper.am-fb-login-form-after::before,
.am-popup .am-fb-login-button-wrapper.am-fb-login-form-before::after {
    background: white;
}

.am-signup-link {
    color: var(--am_color_c);
}

.am-login-layout-with-sidebar {
    max-width: 800px;
    margin: 2em auto 0;
}

.am-login-layout-with-sidebar .am-login-form-wrapper,
.am-login-layout-with-sidebar .am-sendpass-form-wrapper {
    margin-top: 0;
}

.am-signup-link {
    max-width: 450px;
    margin: 1em auto 0;
}

@media all and (min-width: 800px) {
    .am-login-layout-with-sidebar .am-login-layout-with-sidebar_form {
        float: left;
        width: 65%;
    }
    .am-login-layout-with-sidebar .am-login-layout-with-sidebar_sidebar {
        display: block;
        width: 35%;
        float: right;
        padding-left: 20px;
        box-sizing: border-box;
    }
    .am-login-layout-with-sidebar .am-auth-form {
        margin: 0;
    }
    .am-login-layout-with-sidebar .am-signup-link {
        margin: 1em 0 0;
    }
}
.am-login-layout-with-sidebar .am-login-layout-with-sidebar_sidebar {
    border-radius: 3px;
    padding: 1em 2em;
    max-width: 450px;
    box-sizing: border-box;
    box-shadow: 0 0 5px #00000022;
    background: #f9f9f9;
    color: #555;
}
.am-login-layout-with-sidebar_clear {
    clear: both;
}

@media all and (max-width: 799px) {
    .am-login-layout-with-sidebar .am-login-layout-with-sidebar_sidebar {
        margin: 2em auto 0;
    }
}

ul.am-tabs li.active,
ul.am-tabs li.normal:hover {
    background: var(--am_menu_color);
}

ul.am-tabs li.active > a,
ul.am-tabs li.normal > a:hover {
    border-color: var(--am_menu_color);
}

.am-page-login-no-label .am-auth-form,
.am-page-login-no-label .am-signup-link,
.am-page-login-no-label .am-fb-login-button-wrapper {
    max-width:350px;
}

.am-page-login-no-label .am-auth-form div.am-row div.am-element-title {
    display: none;
}

.am-page-login-no-label .am-auth-form div.am-row div.am-element {
    margin:0;
    padding:.6em 2em;
}

.am-page-login-no-label .am-auth-form div.am-row div.am-element input[type=submit],
.am-page-login-no-label .am-auth-form div.am-row div.am-element input[type=submit]:active,
.am-page-login-no-label .am-auth-form div.am-row div.am-element input[type=submit]:hover,
.am-page-login-no-label .am-auth-form div.am-row div.am-element input[type=submit]:disabled {
    width: 100%;
}

.am-page-login-no-label .am-auth-form .am-form-login-switch-wrapper {
    text-align: center;
    display: block;
    padding: 1.2em 2em .6em;
}

.am-page-login-no-label .am-auth-form .am-form-login-switch-wrapper  .am-form-login-switch {
    margin:0;
}

@media all and (max-width: 799px) {
    .am-page-login-no-label .am-login-layout-with-sidebar .am-login-layout-with-sidebar_sidebar {
        max-width:350px;
        margin: 2em auto 0;
    }
}

.am-body-content input,
.am-body-content textarea,
.am-body-content select,
.am-body-content button,
.am-popup input,
.am-popup textarea,
.am-popup select,
.am-popup button {
    font-family: var(--am_font_family), san-serif;
}

.am-body-content a.button,
.am-body-content button,
.am-body-content input[type="button"],
.am-body-content input[type="submit"],
.am-popup a.button,
.am-popup button,
.am-popup input[type="button"],
.am-popup input[type="submit"],
.am-body-content a.button:hover,
.am-body-content button:hover,
.am-body-content input[type="button"]:hover,
.am-body-content input[type="submit"]:hover,
.am-popup a.button:hover,
.am-popup button:hover,
.am-popup input[type="button"]:hover,
.am-popup input[type="submit"]:hover {
    color: white;
    background: var(--am_btn_color);
    border-color: var(--am_btn_color);
}

.am-body-content input[type=submit]:disabled,
.am-body-content input[type=submit]:disabled:hover,
.am-body-content input[type=button]:disabled,
.am-body-content input[type=button]:disabled:hover,
.am-body-content button:disabled,
.am-body-content button:disabled:hover,
.am-popup input[type=submit]:disabled,
.am-popup input[type=submit]:disabled:hover,
.am-popup input[type=button]:disabled,
.am-popup input[type=button]:disabled:hover
.am-popup button:disabled,
.am-popup button:disabled:hover {
    background: #f1f1f1;
    color: #ccc;
    border-color: #ced4da;
}

.input-file .input-file-button,
.input-file.hover .input-file-button {
    color: white;
    background: var(--am_btn_color);
    border: none;
    text-shadow: none;
}
.input-file.hover {
    border-color: var(--am_btn_color);
}

ul.am-header-menu a {
    color: var(--am_header_menu_link_color);
}

ul.am-header-menu ul a {
    color: var(--am_header_menu_link2_color);
}

ul.am-header-menu > li > a::after {
    background: var(--am_header_menu_link_color);
    opacity: .4;
}

ul.am-header-menu li ul {
    background: var(--am_header_menu_bg_color);
}

.am-grid-wrap .filter-button input[type=submit] {
    border-color: #ced4da;
}
