/* --- Base Styles for Feedback Widget --- */
.page-feedback {
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background-color: #f6f8fa;
    max-width: 600px;
    box-sizing: border-box;
}

.theme-dark .page-feedback {
    background-color: #1e1e1e;
    border-color: #444;
}

.feedback-question {
    margin: 0 0 15px 0;
    font-weight: bold;
    font-size: 1.1em;
    color: #555;
}

.theme-dark .feedback-question {
    color: #ccc;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.feedback-vote-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    width: 70px;
}

.theme-dark .feedback-vote-btn {
    background-color: #333;
    border-color: #555;
    color: #eee;
}

.feedback-vote-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.theme-dark .feedback-vote-btn:hover {
    background-color: #444;
    border-color: #777;
}

.feedback-contact-container {
    max-width: 500px;
    margin: 10px auto;
    text-align: left;
}

.feedback-contact-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.theme-dark .feedback-contact-label {
    color: #ccc;
}

.feedback-contact-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    transition: border-color 0.2s;
}

.feedback-contact-input:focus {
    outline: none;
    border-color: #2c844d;
}

.theme-dark .feedback-contact-input {
    background-color: #222;
    border-color: #555;
    color: #ddd;
}

.theme-dark .feedback-contact-input:focus {
    border-color: #5ddea3;
}

.feedback-contact-hint {
    display: block;
    font-size: 0.75em;
    color: #888;
    margin-top: 4px;
}

.theme-dark .feedback-contact-hint {
    color: #999;
}

/* Textarea */
.feedback-content {
    width: 100%;
    box-sizing: border-box;
    max-width: 500px;
    min-height: 80px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    line-height: 1.4;
}

.theme-dark .feedback-content {
    background-color: #222;
    border-color: #555;
    color: #ddd;
}

.feedback-submit-area {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.feedback-submit-btn,
.feedback-cancel-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.feedback-submit-btn {
    background-color: #2c844d;
    color: white;
    border: 1px solid #2c844d;
}

.feedback-cancel-btn {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #555;
}

.theme-dark .feedback-cancel-btn {
    color: #ccc;
    border-color: #555;
}

.feedback-message {
    font-weight: bold;
}

.feedback-message.error {
    color: #cb2431;
}

.theme-dark .feedback-message.error {
    color: #ff8e8e;
}

.feedback-final-state p {
    font-weight: bold;
    color: #2c844d;
}

.theme-dark .feedback-final-state p {
    color: #5ddea3;
}

/* Upload Section Styles */
.feedback-upload-container {
    max-width: 500px;
    margin: 10px auto 0 auto;
    text-align: left;
}

.feedback-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-upload-btn {
    background: transparent;
    border: 1px dashed #ccc;
    color: #555;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.feedback-upload-btn:hover {
    border-color: #2c844d;
    color: #2c844d;
    background-color: #f0fdf4;
}

.theme-dark .feedback-upload-btn {
    border-color: #555;
    color: #aaa;
}

.theme-dark .feedback-upload-btn:hover {
    border-color: #5ddea3;
    color: #5ddea3;
    background-color: #333;
}

.feedback-upload-hint {
    font-size: 0.8em;
    color: #888;
}

.feedback-file-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feedback-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e1e4e8;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    animation: fadeIn 0.2s ease;
}

.theme-dark .feedback-file-item {
    background: #2d2d2d;
    border-color: #444;
}

.feedback-file-name {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 85%;
    color: #333;
}

.theme-dark .feedback-file-name {
    color: #ddd;
}

.feedback-file-remove {
    cursor: pointer;
    color: #999;
    padding: 2px 5px;
    transition: color 0.2s;
}

.feedback-file-remove:hover {
    color: #cb2431;
}

.feedback-file-loading {
    font-style: italic;
    color: #888;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Responsive Refinements --- */
@media screen and (max-width: 480px) {
    .page-feedback {
        padding: 15px 10px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .feedback-vote-btn {
        width: auto;
        flex-grow: 1;
        max-width: 45%;
        padding: 8px 10px;
    }

    .feedback-submit-area {
        flex-direction: column;
        align-items: stretch;
    }

    .feedback-submit-btn,
    .feedback-cancel-btn {
        width: 100%;
    }

    .feedback-contact-container {
        width: 100%;
    }
}
