body {
    font-family: sans-serif;
    margin: 0;
    padding: 0 15px 15px 15px;
    background-color: #f9f9f9;
    width: 400px; /* Set a fixed width for the popup */
}
.container {
    width: 100%;
}
h1 {
    font-size: 1.4em;
    margin-bottom: 15px;
}

/* Styles for the annotation preview */
.annotation-preview {
    margin-bottom: 15px;
}
blockquote {
    border-left: 3px solid #ccc;
    padding: 8px 10px;
    margin-left: 0;
    font-style: italic;
    color: #555;
    background-color: #f0f0f0;
    word-wrap: break-word; /* Ensure long annotations wrap */
}

/* Form styles */
.form-group {
    margin-bottom: 10px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
textarea {
    box-sizing: border-box; /* Ensures padding doesn't add to width */
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
button {
    padding: 10px 15px;
    border: none;
    background-color: #dc3545; /* Red color for reporting */
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}
button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* Styles for the message box */
.message { 
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}
.success { color: #155724; background-color: #d4edda; }
.error { color: #721c24; background-color: #f8d7da; }

/* Universal Mobile & Tablet Optimizations */
@media screen and (max-width: 1500px) {
    body {
        width: 100% !important;
        min-width: 300px !important;
        margin: 0 auto !important; 
        
        display: flex;
        flex-direction: column;
        align-items: center;      /* Horizontal Center */
        justify-content: flex-start; /* Top Align (Keyboard safe) */
        
        padding: 20px;
        padding-top: 10vh;        /* 10% from top */
        min-height: 100vh;        
        box-sizing: border-box;
    }

    div, form, .container, #active-view, .ql-container {
        width: 100% !important;
        max-width: 500px !important; 
        margin: 0 auto; 
    }

    button, .btn, input, select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px;
        padding: 15px !important; 
        font-size: 16px !important; 
        height: auto !important;
    }
}