/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container for the Password Generator */
/* Container for the Password Generator */
.container {
    max-width: 950px; /* Set a maximum width */
    width: 100%; /* Ensure it takes up to max-width */
    margin: 20px auto; /* Center the container */
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    box-sizing: border-box; /* Include padding in the width calculation */
}

/* header {
    background-color: #007bff;
    color: white;
    padding: 10px 0;
    text-align: center;
}

header .container {
    background-color: transparent;
    color: inherit;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 5px 0 0;
    font-size: 1rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 10px;
    position: relative; 
}

nav ul li a {
    color: white;
    text-decoration: none;
}

nav ul li a:hover {
    text-decoration: underline;
}

.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0056b3;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    min-width: 150px; 
}

.dropdown .dropdown-menu li {
    margin: 0;
}

.dropdown .dropdown-menu li a {
    display: block;
    padding: 5px 10px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dropdown:hover .dropdown-menu {
    display: block;
} */




/* Optional: Style the language switcher to blend in */
.language-switcher select {
    background-color: #007bff; /* A blue background to match a typical header */
    color: white;
    border: 1px solid white;
    padding: 5px;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1px 0; /* Reduced padding (top and bottom) */
    margin-top: auto; /* Push footer to the bottom */
}

footer .container {
    background-color: transparent; /* Ensure the container is transparent */
    color: inherit; /* Inherit text color from the header */
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Toast Notification Styles */
.toast {
    visibility: hidden; /* Hidden by default */
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s;
}

.toast.show {
    visibility: visible; /* Show when triggered */
    opacity: 1;
}

/* Error Message Styles */
.error {
    color: red;
    font-weight: bold;
}

/* Form Styles */
form {
    margin-bottom: 20px;
    align-items: center;
    text-align: center; 
}

label {
    font-weight: bold;
}

input[type="number"], input[type="checkbox"] {
    margin-bottom: 10px;
}

input[type="submit"] {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px; /* Add spacing above the button */
}

input[type="submit"]:hover {
    background-color: #218838;
}

h2 {
    margin-top: 20px;
    color: #333;
}

/* Password List Styles */
ul {
    list-style-type: none;
    padding: 0;
    margin: 0; /* Remove default margin */
}

li {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    word-break: break-all; /* Break long words (like passwords) */
    overflow-wrap: break-word; /* Ensure long words wrap */
}

.copy-btn {
    background-color: #007bff;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0; /* Prevent the button from shrinking */
    margin-left: 10px; /* Add some spacing between the password and the button */
}

#copy-all-btn {
    background-color: #25aff0;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#copy-all-btn:hover {
    background-color: #5a6268;
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* ####CONTACT PAGE##### */
/* Only apply these styles inside the contact page */
.contact-page .contact-container {
    width: 50%;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-page h2 {
    text-align: center;
    color: #333;
}

.contact-page p {
    text-align: center;
    color: #555;
}

.contact-page form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-page label {
    font-weight: bold;
}

.contact-page input, 
.contact-page textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-page button {
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

.contact-page button:hover {
    background: #218838;
}

.contact-page .error {
    color: red;
    text-align: center;
    font-weight: bold;
}

.contact-page .success {
    color: green;
    text-align: center;
    font-weight: bold;
}


/* QRCode */
.info-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.info-section h2, .info-section h3 {
    color: #333;
}

.info-section p {
    line-height: 1.6;
}

.info-section ul {
    list-style-type: disc;
    margin-left: 20px;
}

.info-section li {
    display: block; /* Override global flex for info-section li */
    margin-bottom: 10px;
}

.info-section li strong, .info-section li b {
    display: inline; /* Force inline behavior */
    margin: 0; /* Remove any inherited margins */
    padding: 0; /* Remove any padding */
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {

    header {
        display: none !important;
    }
    .container {
        width: 95%; /* Increase width to use more space */
        padding: 10px; /* Reduce padding */
    }

    header h1 {
        font-size: 1.5rem; /* Reduce title size */
    }

    header p {
        font-size: 0.8rem; /* Reduce text size */
    }

    footer {
        font-size: 0.8rem; /* Adjust footer text */
    }

    /* Reduce button sizes for mobile */
    input[type="submit"], #copy-all-btn {
        font-size: 0.9rem;
        padding: 10px;
    }

    .copy-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    /* Hide header or footer if needed */
    /* header { display: none; } */
}

/* Ensure textareas fit within their container */
textarea {
    width: 100%; /* Full width of parent */
    max-width: 100%; /* Prevent overflow beyond container */
    box-sizing: border-box; /* Include padding/border in width */
    resize: vertical; /* Allow vertical resizing only */
}

/* Desktop adjustments (above mobile breakpoint) */
@media (min-width: 769px) {
    textarea {
        min-width: 400px; /* Minimum width for desktop */
        width: auto; /* Allow natural width up to max-width */
        max-width: 600px; /* Cap width to avoid excessive stretching */
    }
}

/* Container adjustments for mobile */
@media (max-width: 768px) {
    .container {
        padding: 10px; /* Reduce padding on small screens */
    }
    textarea {
        width: 100%; /* Reinforce full width */
        font-size: 14px; /* Slightly smaller text for readability */
    }
    .result-container {
        flex-direction: column; /* Stack textarea and button vertically */
        align-items: stretch; /* Full width for children */
    }
    .copy-btn {
        margin-top: 10px; /* Space above button when stacked */
        width: auto; /* Allow button to fit content */
    }
}