/* =====================================================
   FEEDBACK MODULE - COMPLETE CSS
   ===================================================== */

/* Hide elements when the hidden attribute is present */
#editionFeedbackModule [hidden] {
    display: none !important;
}

/* =====================================================
   1. COMMON POPUP AND FORM WINDOW
   ===================================================== */

#editionFeedbackModule .feedback-prompt,
#editionFeedbackModule .feedback-dialog {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;

    box-sizing: border-box;
    width: min(360px, calc(100vw - 32px));

    padding: 22px;

    background: #fff;
    color: #202124;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);

    font-family: Arial, sans-serif;
}

/* =====================================================
   2. FIRST POPUP - "YOUR OPINION MATTERS!"
   ===================================================== */

#editionFeedbackModule .feedback-prompt {
    animation: feedbackSlideIn 0.35s ease-out;
}

/*
   Make the popup a positioning container.
   The close button will be positioned relative to it.
*/
#editionFeedbackModule .feedback-prompt {
    position: fixed;
}

/* Popup heading */
#editionFeedbackModule .feedback-prompt h3 {
    margin: 0 0 8px;

    /* Reserve space for the cross button */
    padding: 0 32px 0 0;

    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
}

/*
   CLOSE BUTTON FIX
   Position the cross at the top-right corner.
   It is removed from the normal document flow.
*/
#editionFeedbackModule .feedback-prompt > .feedback-close {
    position: absolute;

    top: 12px;
    right: 12px;
    left: auto;
    bottom: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    margin: 0;
    padding: 0;

    border: none;
    background: transparent;
    color: #555;

    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}

/* Close button hover effect */
#editionFeedbackModule .feedback-prompt > .feedback-close:hover {
    color: #000;
    background: #f1f3f5;
    border-radius: 50%;
}

/* General paragraph styling */
#editionFeedbackModule p {
    font-size: 13px;
    line-height: 1.5;
}

/* =====================================================
   3. MAIN FEEDBACK FORM WINDOW
   ===================================================== */

#editionFeedbackModule .feedback-dialog {
    padding: 16px;

    max-height: calc(100vh - 24px);
    overflow-y: auto;

    animation: feedbackSlideIn 0.3s ease-out;
}

/* Form heading and close button layout */
#editionFeedbackModule .feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Main form heading */
#editionFeedbackModule h2 {
    margin: 0 0 8px;

    font-size: 20px;
    line-height: 1.3;
}

/* Close button in the main form */
#editionFeedbackModule .feedback-header > .feedback-close {
    flex: 0 0 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    margin: 0;
    padding: 0;

    border: none;
    background: transparent;
    color: #555;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

#editionFeedbackModule .feedback-header > .feedback-close:hover {
    color: #000;
}

/* =====================================================
   4. FORM LABELS AND INPUT FIELDS
   ===================================================== */

/* Compact form labels */
#editionFeedbackModule form > label {
    display: block;

    margin: 9px 0 4px;

    font-size: 13px;
    font-weight: 600;
}

/* Text inputs, topic dropdown and feedback textarea */
#editionFeedbackModule form > input,
#editionFeedbackModule form > select,
#editionFeedbackModule form > textarea {
    display: block;

    box-sizing: border-box;
    width: 100%;

    padding: 8px 10px;

    border: 1px solid #d0d5dd;
    border-radius: 7px;

    font-family: Arial, sans-serif;
    font-size: 13px;

    background: #fff;
    color: #202124;
}

/* Feedback text area */
#editionFeedbackModule form > textarea {
    min-height: 55px;
    resize: vertical;
}

/* =====================================================
   5. REGISTRATION CHECKBOX
   ===================================================== */

#editionFeedbackModule .feedback-consent {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
}

#editionFeedbackModule .feedback-consent > input {
    flex: 0 0 auto;
    margin-top: 3px;
}

#editionFeedbackModule .feedback-consent-content {
    flex: 1;
    min-width: 0;
}

#editionFeedbackModule .feedback-consent-content > label {
    display: block;
    line-height: 1.2;
    font-weight: 600;
}

#editionFeedbackModule .feedback-consent-content ul {
    margin: 6px 0 0;
    padding-left: 20px;
    line-height: 1.2;
}

#editionFeedbackModule .feedback-consent-content li {
    margin-bottom: 3px;
}

#editionFeedbackModule .feedback-consent-content li:last-child {
    margin-bottom: 0;
}

/* =====================================================
   6. PRIVACY NOTICE AND STATUS MESSAGE
   ===================================================== */

#editionFeedbackModule .feedback-privacy {
    margin: 7px 0;

    color: #667085;
    font-size: 10px;
}

#editionFeedbackModule #feedbackStatus {
    font-size: 12px;
}

#editionFeedbackModule #feedbackStatus.is-error {
    color: #b42318;
}

#editionFeedbackModule #feedbackStatus.is-success {
    color: #067647;
}

/* =====================================================
   7. BUTTONS
   ===================================================== */

#editionFeedbackModule .feedback-primary {
    display: block;
    width: 100%;

    margin-top: 10px;
    padding: 10px;

    border: none;
    border-radius: 8px;

    background: #175cd3;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

#editionFeedbackModule .feedback-primary:hover:not(:disabled) {
    background: #1249aa;
}

#editionFeedbackModule .feedback-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =====================================================
   8. POPUP ANIMATION
   ===================================================== */

@keyframes feedbackSlideIn {
    from {
        opacity: 0;
        transform: translate(18px, 20px);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* =====================================================
   9. MOBILE RESPONSIVE LAYOUT
   ===================================================== */

@media (max-width: 480px) {
    #editionFeedbackModule .feedback-prompt,
    #editionFeedbackModule .feedback-dialog {
        right: 12px;
        bottom: 12px;

        width: calc(100vw - 48px);
        max-width: 320px;
        padding: 14px;
        
        box-sizing: border-box;
        
    }

    /* Smaller heading */
    #editionFeedbackModule .feedback-prompt h3 {
        font-size: 16px;
        line-height: 22px;

        margin: 0 0 5px;
        padding-right: 28px;
    }

    /* Smaller description */
    #editionFeedbackModule .feedback-prompt p {
        font-size: 12px;
        line-height: 1.4;

        margin: 6px 0;
    }

    /* Smaller close button, still top-right */
    #editionFeedbackModule .feedback-prompt > .feedback-close {
        top: 8px;
        right: 8px;

        width: 24px;
        height: 24px;

        font-size: 21px;
    }

    /* Compact notification button */
    #editionFeedbackModule .feedback-prompt .feedback-primary {
        margin-top: 8px;
        padding: 9px;

        font-size: 13px;
    }
}

/* =====================================================
   10. ACCESSIBILITY - REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    #editionFeedbackModule .feedback-prompt,
    #editionFeedbackModule .feedback-dialog {
        animation: none;
    }
}