/* Overlay container */
#feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* Fixed instructions banner */
#feedback-instructions {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0073aa;
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Push body content down */
body {
    padding-top: 48px !important;
}

/* Selection box while dragging */
.feedback-selection-box {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    /* Border, background, and shadow set dynamically via JS */
}

/* Permanent feedback comment boxes */
.feedback-comment {
    position: absolute;
    pointer-events: auto;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    /* Border and background set dynamically via JS */
}

.feedback-comment:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Active state when clicked */
.feedback-comment.active {
    filter: brightness(1.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Comment content inside the box - hidden by default */
.feedback-comment-content {
    background: white;
    border-radius: 4px;
    padding: 8px 10px;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Show content on hover or when active */
.feedback-comment:hover .feedback-comment-content,
.feedback-comment.active .feedback-comment-content {
    opacity: 1;
    pointer-events: auto;
}

.feedback-comment-content p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
}

.feedback-comment-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.feedback-delete,
.feedback-resolve {
    padding: 4px 10px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.feedback-delete {
    background: #E74C3C;
    color: white;
}

.feedback-delete:hover {
    background: #C0392B;
}

.feedback-resolve {
    background: #27AE60;
    color: white;
}

.feedback-resolve:hover {
    background: #229954;
}

/* Remove old bubble styles - not needed anymore */
.feedback-bubble {
    display: none;
}

/* Simple popup modal for entering feedback - positioned next to selection */
.feedback-modal {
    position: absolute;
    background: white;
    border: 2px solid #4A90E2;
    border-radius: 12px;
    padding: 0;
    width: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.feedback-modal-content {
    padding: 20px 16px;
}

.feedback-modal-content h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.feedback-modal-content textarea {
    width: 100%;
    padding: 12px 8px;
    margin-bottom: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.feedback-modal-content textarea:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.feedback-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.feedback-submit {
    background: #4A90E2;
    color: white;
}

.feedback-submit:hover {
    background: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.feedback-cancel {
    background: #F5F5F5;
    color: #666;
    border: 1px solid #E0E0E0;
}

.feedback-cancel:hover {
    background: #E8E8E8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Prevent text selection and image dragging while selecting */
body.feedback-selecting {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

body.feedback-selecting * {
    pointer-events: none !important;
}

body.feedback-selecting #feedback-overlay {
    pointer-events: auto !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feedback-bubble {
        width: 250px;
    }
    
    .feedback-modal-content {
        padding: 20px;
        width: 95%;
    }
}

/* Ensure Settings button text stays red in all states */
#feedback-settings-btn {
	color: #e60023 !important;
}

#feedback-settings-btn:hover,
#feedback-settings-btn:focus,
#feedback-settings-btn:active {
	color: #e60023 !important;
}