/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Body Styles */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button, .error-link {
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover, .error-link:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    padding: 15px 30px;
    color: white;
    font-size: 18px;
}

nav button {
    background-color: transparent;
    color: white;
    border: 1px solid transparent;
}

/* Main Container Styles */
main {
    padding: 40px 20px;
    /* max-width: 1200px; */
    margin: 0 auto;
}

/* Header Styles */
h1, h2 {
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

h3 {
    font-weight: 500;
    color: #333;
}

/* Textarea Styles */
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    resize: vertical;
    min-height: 150px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* Preview Box Styles (Fixed Height with Scrollbars) */
.preview {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    height: 250px; /* Set fixed height */
    overflow-y: auto; /* Enable vertical scrollbar */
}

/* Error Page Styles */
.error-container {
    text-align: center;
    padding: 50px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    max-width: 600px;
    margin: 100px auto;
}

.error-container h1 {
    font-size: 72px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 24px;
    color: #555;
    margin-bottom: 20px;
}

.error-container p {
    font-size: 16px;
    color: #777;
    margin-bottom: 30px;
}

.error-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 16px;
    color: #3498db;
    transition: color 0.3s ease;
}

.error-link:hover {
    color: #2980b9;
}

/* Popup Styles for Feedback */
.popup {
    display: none;
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup .popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.popup h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.popup textarea {
    width: 100%;
    height: 120px;
    margin-bottom: 20px;
}

.popup button {
    margin-top: 10px;
    background-color: #27ae60;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
}

.popup button:hover {
    background-color: #2ecc71;
}

/* Main Content Layout */
.generated-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    margin-bottom: 30px;
}

.content-item {
    flex: 1 1 33%; /* Allow each item to flex and take up equal width */
    min-width: 0; /* Allow the content items to shrink */
    max-width: 100%; /* Ensure they can grow to fill available space */
}

.preview {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    /*height: 500px; /* Fixed height */
    overflow-y: auto; /* Enable vertical scrollbar */
}

/* Ensure the textarea occupies full width and has padding */
textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
}

/* Make all buttons full width on smaller screens */
button, .popup button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

/* Responsive behavior */
@media (max-width: 960px) {
    .generated-content {
        flex-direction: column; /* Stack content vertically on smaller screens */
        gap: 20px;
    }

    .content-item {
        max-width: 100%; /* Allow items to take full width */
    }

    button, .popup button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    /* Adjust padding and margins for mobile screens */
    .error-container {
        padding: 30px;
    }

    .generated-content {
        gap: 15px;
    }

    .content-item {
        max-width: 100%;
    }
}

/* Container for the buttons */
.button-container {
    display: flex;
    justify-content: flex-start; /* Align buttons to the left */
    gap: 20px; /* Add some space between buttons */
    margin-top: 20px; /* Optional: space above the buttons */
}

/* Button Styles */
button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

textarea {
    width: 100%;
    /* min-height: 560px; /* Minimum height */
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    resize: none; /* Disable the default resizing handle */
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: #3498db;
    outline: none;
}

a {
    color: blue;  /* Set the color of links to blue */
    text-decoration: underline;  /* Optional: underline links */
}

a:hover {
    color: darkblue;  /* Optional: change the color when hovering */
    text-decoration: underline;
}

/* Sticky footer container */
.footer-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Buttons inside the footer */
.footer-buttons button {
    padding: 8px 15px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

/* Style for Back button */
.footer-buttons button:first-child {
    background: #f0f0f0;
	color: black
}

.footer-buttons button:first-child:hover {
    background: #e0e0e0;
}

/* Style for Save & Exit button */
.footer-buttons button:last-child {
    background: #007bff;
    color: white;
}

.footer-buttons button:last-child:hover {
    background: #0056b3;
}

/* Loading Screen Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    background-color: #f5f5f5;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-message {
    font-size: 18px;
    color: #333;
}

.error-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.error-container {
    text-align: center;
    padding: 60px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin: 100px auto;
    max-width: 500px;
    border-top: 5px solid #e74c3c;
}

.error-link {
    display: inline-block;
    padding: 12px 20px;
    background-color: #e74c3c;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none; /* Prevent underlining */
    transition: background-color 0.3s ease;
}

.error-link:hover {
    background-color: #c0392b;
    color: white; /* Ensure text stays white on hover */
    text-decoration: none; /* Prevent underline on hover */
}

/* General Navbar Styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
	justify-content: space-evenly;
}

nav button {
    color: white;
    background: none;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 16px;
	white-space: nowrap; /* Prevent the text from wrapping to a new line */
    text-overflow: ellipsis; /* Add ellipsis if the text is too long */
}

/* Hide the menu by default on small screens */
.navbar-menu {
    display: flex;
    gap: 10px;
}

/* The hamburger menu (will be shown on mobile) */
.hamburger {
    display: none;
    font-size: 30px;
    background: none;
    color: white;
    border: none;
	max-width: 90px;
}

/* Make the menu responsive */
@media (max-width: 768px) {
	nav {
		justify-content: flex-start;
	}

    .navbar-menu {
        display: none; /* Hide the menu on mobile by default */
        flex-direction: column;
        width: 100%;
        background-color: #333;
		/*position: absolute; /* Make the navbar menu absolute */
        /*top: 50px; /* Position it below the hamburger icon */
        /*left: 0; /* Align it to the left edge of the screen */
        /*z-index: 999; /* Ensure the menu appears above other elements */
    }

    .navbar-menu.show {
        display: flex; /* Show the menu when hamburger is clicked */
    }

    .hamburger {
        display: block; /* Show hamburger icon on mobile */
    }

    .navbar-menu button {
        width: 100%;
        padding: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

.extra-message {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: #f1f1f1; /* Optional: change background color */
	text-align: center;
	padding: 10px;
	box-shadow: 0 -2px 5px rgba(0,0,0,0.2); /* Optional: add shadow */
}

.extra-message a {
	text-decoration: none; /* Removes underline */
	color: #3498db; /* Lighter blue color */
}

.extra-message a:hover {
	color: #6fb2df; /* Optional: change color on hover */
}

.view-log-button {
    padding: 6px 10px;
    white-space: nowrap; /* Prevents text from wrapping */
	max-width: 160px;
}

.copy-button {
    padding: 6px 10px;
    white-space: nowrap; /* Prevents text from wrapping */
}
