:root {
    --primary-color: #f4f4f4;
    --primary-light-color: #FFE769;
    --secondary-color: #FFE4BA;
    --secondary-light-color: #FFF6E8;
    --post-color: #62EEA8;
    --delete-color: #FF9F9F;
    --light-color: #FFFEFC;
    --grey-color: #464646;
    --dark-color: #000000;

    --primary-font: 'Open Sans', sans-serif;
    --seconday-font: 'Open Sans', sans-serif;
    
    --border-width: 3px;
    --element-border-radius: 5px;
    
    --button-height: 5px;
    --small-button-height: 2px;
    
    --element-padding: 0.8em;
    
    --maximum-width: 320px;
}

html, body {
    margin: 0;
    padding: 0;
    font-size: 18px;
}

body {
    color: var(--dark-color);
    background-color: var(--primary-color);
    font-family: var(--primary-font);
    height: 100vh;
}

main {
    padding: 2rem;
}

main:has(rapi-doc) {
    padding: 0;
    height: calc(100% + 83px)
}

rapi-doc {
    display: block;
    margin: 0px;
    padding: 0px;
    border: 0px;
    height: calc(100% + 83px)
}

main:has(iframe) {
    padding: 0;
    height: calc(100% - 85px);
}

iframe {
    display: block;
    margin: 0px;
    padding: 0px;
    border: 0px;
    width: 100%;
    height: 100%;
}

/* === Structure === */

.container {
    max-width: var(--maximum-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}


/* === Navbar === */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: black;
    box-shadow: 0px 8px 16px -4px rgba(128, 128, 128, 0.2);
    width: 100%;
    height: 85.2px;
}

.navbar:has(~ * iframe) {
    box-shadow: none; 
}

#calc-frame::before {
    content: '';
    position: absolute;
    z-index: 2;
    box-shadow: inset 0px 8px 16px -4px rgba(128, 128, 128, 0.2);
    top: 85.2px;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
}

rapi-doc {
    box-shadow: inset 0px 8px 16px -4px rgba(128, 128, 128, 0.2);
}

#uptime-frame::before {
    content: '';
    position: absolute;
    z-index: 2;
    box-shadow: inset 0px 8px 16px -4px rgba(128, 128, 128, 0.2);
    top: 85.2px;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
}

.logo-img {
    width: 80px;
    margin-left: 1rem;
}

.logo {
    font-size: 3rem;
    text-decoration: none;
    color: white;
}

.navbar a:not(:has(img)) {
    text-decoration: none;
    color: black;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 1.3rem;
}

.navbar-right {
    display: flex;
    align-items: center; 
    margin-right: 2rem;
}

.navbar a:not(:has(img)):hover {
    background-color: #ddd;
    color: black;
}


/* Style the dropdown button */
.dropdown {
    position: relative; /* This makes the positioning of the dropdown content relative to this container */
    display: inline-block;
}

.dropdown .dropbtn {
    cursor: pointer;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    margin-top: 1.5rem;
    right: 0; 
    left: auto;
    white-space: nowrap;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 1rem 1rem;
    text-decoration: none;
    display: block;
    text-align: left; /* Ensure text is aligned to the left */
}


/* Show the dropdown content on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

/* === Hamburger Menu === */
.hamburger {
    display: none;
    font-size: 30px;
    cursor: pointer;
}

.closebtn {
    display: none;
}

.hide {
    display: none;
}





/* === Buttons === */

button {
    font-weight: 600;
    width: 100%;
}

button:hover {
    cursor: pointer;
}


/* === Forms === */

input, button {
    padding: var(--element-padding);
    border-radius: var(--element-border-radius);
    width: 100%;
    font-size: 1.1em;
    text-align: center;
}

/* === Home === */

.home {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.home img {
    height:50px;
    margin:10px;
}

.funding {
    width: 80%;
    max-width: 900px;
    text-align: center;
}

.break {
  flex-basis: 100%;
  height: 0;
}




  



/* Auth page styles - Login, Signup, Forgot Password */

.auth-page_container {
    display: flex;
    flex-direction: column;
    align-items: center;



}

.login-form-container {
    display: flex;
    justify-content: center;
    /* align-items: center;  */
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin-top: 2rem;
    border-radius: 25px;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    background-color: #ffffff;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%;
}
  
.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
}
  
.input-group {
    margin-bottom: 20px;
}
  
.input-group label {
    display: block;
    margin-bottom: 5px;
}
  
.input-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: calc(100% - 20px);
}
  
.input-group, .login-btn, .google-login-btn {
    width: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-group {
    flex-direction: column;

}

.login-btn {
    background-color: #007bff;
    border: 1px solid rgba(0, 0, 0, 0.25);
    font-weight: 500;
    color: white;
    cursor: pointer;
    height: 2.5rem;
    font-size: 1.2rem;
}

.login-btn:hover {
    transition: all 0.2s ease;
    transform: scale(1.05);
}

.google-login-btn {
    color: var(--dark-color);
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    border: 1px solid rgba(0, 0, 0, 0.25);  
}

.google-login-btn:hover {
    transition: all 0.2s ease;
    transform: scale(1.05);
}

.google-btn-logo {
    width: 1.375em;
}

.alt-signin-divider {
    margin: 1em 0;
    text-align: center;
    font-size: 0.875em;
    color: var(--dark-color);
}

.signup-link-container {
    text-align: center;
    margin-top: 1em;
}

.error-msg {
    color: red;
    font-size: 1rem;
    margin-top: 0.5em;
    text-align: center;
}

.login-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    max-width: 10rem;
    margin-top: 1rem;
    height: 2.5rem;
    cursor: pointer;
    background-color: rgb(202, 195, 195);
    border: none;
}

.login-link-btn:hover {
    background-color: var(--grey-color);
    border: none;
    color: white;
}

/* Footer Styles */

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: var(--grey-color); /* Light grey background */
    color: white; /* Dark grey text */
    font-family: var(--primary-font);
    text-align: center; /* Centering the content */
    padding: 10px 0; /* Padding above and below */
    font-size: 14px; /* Standard font size */
}

.simple-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem; /* Padding on the sides */
}

.simple-footer a {
    color: white; /* Standard link color */
    text-decoration: none; /* No underlines on links */
    margin: 0 5px; /* Margins for spacing */
}

.simple-footer a:hover {
    text-decoration: underline; /* Underline on hover for better user interaction */
}

.buffer{
    height:100px;
}


#calc-frame {
    height: 1500px;
}

/* Responsive */
@media screen and (max-width: 840px) {

    .funding {
        width: 100%;
    }

    .navbar {
        height: 85.2px;
    }


    .navbar-right {
        position: fixed; 
        top: 0;
        left: -100%; 
        flex-direction: column;
        justify-content: center; 
        align-items: center; 
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color); 
        overflow-x: hidden; /* Prevent horizontal scroll */
        overflow-y: auto;
        transition: 0.5s; /* Smooth transition for sliding in/out */
        padding: 0;
        padding-bottom: 40rem;
        margin: 0;
        z-index: 999;
    }

    .navbar-right a {
        color: black;
        padding: 15px;
        text-decoration: none;
        font-size: 2rem;
        display: block; /* Ensure links take full width */
        transition: 0.3s; /* Smooth transition for hover effect */
    }

    .navbar a:hover {
        
        background-color: inherit;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: relative;
        width: 100%;
        right: auto;
        text-align: center;
        padding: 0;
        margin-top: 0;
        box-shadow: none;
        overflow-y: auto;
        
    }

    .dropdown-content a {
        padding: auto;
        text-align: center;
        font-size: 1.6rem;
        color: gray;
    }


    .hamburger {
        display: block;
        position: absolute;
        right: 1rem;
        font-size: 2.2rem;
    }

    .closebtn {
        display: block;
        position: absolute;
        top: 0;
        right: 1rem;
        font-size: 3rem;
        cursor: pointer;
        color: black
    }

    .simple-footer {
        flex-direction: column;
        padding: 0;
    }
}

.keys{ 
    border-radius: 25px;
    padding: 20px;
    width: 80%;
    margin: auto;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    background-color: #ffffff;
}

.keys-out{
    display: flex;
}

.keys-buttons{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 10%;

}

.keys output{
    overflow: auto;
}

.keys button {
  /* https://uiverse.io/portseif/afraid-baboon-7 */
  width: 50px;
  background-color: #ffffff;
  border: 1px solid rgb(209, 213, 219);
  border-radius: 0.5rem;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  padding: 0.75rem 1rem;
  text-align: center;
  -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
}

.keys button:hover {
  background-color: #f9fafb;
}

.keys button:focus {
  outline: 2px solid rgba(0, 0, 0, 0.1);
  outline-offset: 2px;
}

.keys button:focus-visible {
  -webkit-box-shadow: none;
  box-shadow: none;
}

a img {
    display: block;
}