/* styles.css */

* {
    box-sizing: border-box;
}

/* General Styles */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.logo-container {
    text-align: center;
    width: 100%;
    padding: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-container img {
    max-width: 300px;
}

.step {
    display: none;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    margin: 20px;
}

.step.active {
    display: block;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="number"],
textarea,
select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

textarea {
    resize: none;
    min-height: 100px;
}

input[type="file"] {
    padding: 5px;
}

button {
    padding: 10px 20px;
    background-color: #000000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: inherit;
    margin: 0 auto;
}

button:hover {
    background-color: #ffffff;
    color: #000000;
    border: solid 1px #000000;
}

/* Loading and Error Styles */
.loading {
    display: none; /* Initially hidden */
    position: fixed; /* Overlay positioning */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Above other content */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3; /* Light grey */
    border-top: 6px solid #000000; /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spinner Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #ff0000;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* Step 2: Outline Styles */
#outline {
    width: 100%;
    min-height: 400px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

/* Step 3: Scraped Content and File Analysis Styles */
#scrapedContent,
#fileAnalysis {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 14px;
    white-space: pre-wrap;
}

/* Step 4: Article Styles */
#article {
    width: 100%;
    min-height: 400px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.modal-content button {
    padding: 10px 20px;
    background-color: #000000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #f9f9f9;
    color: #000000;
    border: solid 1px #000000;
}

.modal-content .error {
    color: #ff0000;
    font-size: 14px;
    margin-top: 10px;
}

button#backStep2,
button#backStep4 {
    background-color: #6c757d;
    margin-right: 10px;
}

button#backStep2:hover,
button#backStep4:hover {
    background-color: #5a6268;
}

/* Files choosing */
#files {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.bottomLinkContainer {
    width: 100%;
    padding: 10px;
    background-color: #f9f9f9;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.bottomLinkContainer a {
    text-decoration: none;
    color: #000000;
    font-weight: bold;
    transition: color 0.3s ease;
    cursor: pointer;
    font-size:14px;
}

/* Container for the Outline Textarea and Navigation Buttons */
.outline-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Make the textarea fill the available space */
.outline-container #outline {
    flex: 1;
    min-height: 400px;
    padding: 10px;
    /* You can keep the existing border and font styles if desired */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

/* Style the arrow buttons */
.outline-container button#prevOutline,
.outline-container button#nextOutline {
    font-size: 24px;      /* Big font for the arrows */
    width: 50px;          /* Fixed width */
    height: 50px;         /* Fixed height */
    background-color: #000000;
    color: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Optional: Hover effect for the arrow buttons */
.outline-container button#prevOutline:hover,
.outline-container button#nextOutline:hover {
    background-color: #ffffff;
    color: #000000;
    border: solid 1px #000000;
}

button#editOutline,
button#backStep2,
button#nextStep2 {
    width: auto;
    margin: 0 2px; /* Adjust margin to create space between buttons */
}

.outline-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px; /* Set equal spacing between buttons */
    margin-top: 20px; /* Adjust margin to give space from the outline textarea */
}

/* Responsive Design */
@media (max-width: 768px) {
    .step {
        margin: 10px;
        padding: 15px;
    }

    h1 {
        font-size: 20px;
    }

    button {
        width: 100%;
    }
}
