/* Version 1.4 added Modal Styling 12-14-2025 10:19 */


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
	background-image: url('/static/images/background.jpg');  /* Replace with your image path or URL */
    background-size: cover;  /* Covers the entire viewport */
    background-position: center;  /* Centers the image */
    background-repeat: no-repeat;  /* No tiling */
    background-attachment: fixed;  /* Keeps image fixed on scroll */
}

/* Full-viewport flexbox */
.wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.container {
    /*background: rgba(255, 255, 255, 0.05);*/
	background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    text-align: center;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Testing a spacer at the top of pages. */
.spacer {
    padding: 40px 30px;
    text-align: center;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 18px;
}

input[type="text"] {
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]::placeholder {
    color: #ccc;
}

/* sign-up types */

input[type="email"] {
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

input[type="email"]::placeholder {
    color: #ccc;
}

input[type="tel"] {
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

input[type="tel"]::placeholder {
    color: #ccc;
}

input[type="password"] {
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

input[type="password"]::placeholder {
    color: #ccc;
}

/* Fix for letter display */
.container pre {
    white-space: pre-wrap;        /* Allows text to wrap */
    word-wrap: break-word;        /* Breaks long words if necessary */
    word-break: break-word;
    max-width: 100%;
    overflow-x: auto;             /* Adds horizontal scroll only if really needed */
    background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 10px;
    text-align: left;
    line-height: 1.65;
    font-size: 15.5px;
    color: #eee;
}

/* Make the letter container wider and more readable */
body:has(.container pre) .container {
    max-width: 800px;             /* Wider for letters */
    padding: 50px 40px;
}

/*
.submit-button {
    padding: 14px 28px;
    font-size: 16px;
    background: #00aaff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    margin-top: 10px;
}


.submit-button:hover {
    background: #0088dd;
}
*/

.side-icons {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 170, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00aaff;
    font-size: 30px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .side-icons {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin-top: 20px;
    }
}

/* Updates for button and link */
button[type="submit"] {
    padding: 14px 28px;
    font-size: 16px;
    background: #00bfff;  /* Light blue like in the image */
    color: white;
    border: none;
    border-radius: 30px;  /* Rounded corners for modern look */
    cursor: pointer;
    white-space: nowrap;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  /* Subtle shadow for depth */
    transition: background 0.3s ease, box-shadow 0.3s ease;  /* Smooth hover effect */
}

button[type="submit"]:hover {
    background: #00aaff;  /* Slightly darker on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);  /* Enhanced shadow on hover */
}

/* Style for sign-up link: Clean and modern */
a[href="/signup"] {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #00bfff;
    text-decoration: none;
    border: 1px solid #00bfff;
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease;
}

a[href="/signup"]:hover {
    background: #00bfff;
    color: white;
}

/* Style for login link: Clean and modern */
a[href="/login"] {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #00bfff;
    text-decoration: none;
    border: 1px solid #00bfff;
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease;
}

a[href="/login"]:hover {
    background: #00bfff;
    color: white;
}


/* Style for / link: Clean and modern */
a[href="/"] {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #00bfff;
    text-decoration: none;
    border: 1px solid #00bfff;
    border-radius: 30px;
    transition: background 0.3s ease, color 0.3s ease;
}

a[href="/"]:hover {
    background: #00bfff;
    color: white;
}

#review-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#review-modal .modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#review-modal h3 {
    margin-top: 0;
    color: #232f3e;
    border-bottom: 2px solid #ff9900;
    padding-bottom: 10px;
}

#review-modal button {
    background-color: #ff9900;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

#review-modal button:hover {
    background-color: #ec7211;
}

#review-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
}

#viewer-container {
    min-height: 600px;  /* Forces space even if embed fails */
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.viewer-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);  /* Optional: fill available height */
}

.button-bar {
    flex-shrink: 0;  /* Prevents shrinking */
    border-top: 1px solid #d8dde6;
    background: #f0f2f6;
    padding: 12px 15px;
    text-align: right;
}

/* Processing window on the right side */
.processing-window {
    background-color: #f0f2f6;
    border: 1px solid #d8dde6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 30px;
    max-height: 300px;
    overflow-y: auto;
}

.processing-window h3 {
    margin-top: 0;
    font-size: 16px;
    color: #232f3e;
    border-bottom: 1px solid #d8dde6;
    padding-bottom: 8px;
}

/* ================== FIX FOR LETTER PAGE SCROLLING ================== */
body:has(pre) html,
body:has(pre) body {
    height: auto !important;
    min-height: 100vh;
    align-items: flex-start !important;
    padding-top: 40px;
    overflow-y: auto;
}

body:has(pre) .container {
    margin-top: 20px;
    max-width: 850px;           /* Wider for letters */
    padding: 50px 40px;
    align-items: flex-start;
}

/* Make the letter text area scrollable if very long */
.container pre {
    max-height: 70vh;
    overflow-y: auto;
    padding: 25px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

#processing-messages {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    font-size: 13px;
}

#processing-messages li {
    padding: 6px 0;
    border-bottom: 1px dotted #ccc;
    color: #16191f;
}

#processing-messages li.status {
    color: #0073bb;
    font-weight: bold;
}

#processing-messages li.error {
    color: #d13212;
}

#processing-messages li.success {
    color: #2e7d32;
}

/* Make the request details and processing window side-by-side on larger screens */
@media (min-width: 900px) {
    #request-details {
        display: flex;
        gap: 30px;
    }
    
    .details-left {
        flex: 1;
        min-width: 300px;
    }
    
    .processing-window {
        flex: 1;
        min-width: 300px;
        margin-top: 0;
    }
}