/* ZethalMC — shared feedback popup (used by mc-utilities/book-converter and utilities/timestamp-generator) */

.feedback-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, var(--accent-bright), var(--accent));
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 1000;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feedback-button::before {
    content: "\1F4AC";
    font-size: 1.05em;
    line-height: 1;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(23, 163, 152, 0.45);
}

.popup {
    display: none;
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    z-index: 1001;
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    visibility: hidden;
}

.popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.popup h1 {
    margin-bottom: 20px;
    color: var(--text);
    text-align: center;
    font-size: 1.6em;
}

.popup label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    width: 100%;
}

.popup input,
.popup textarea {
    width: calc(100% - 22px);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    font-size: 1rem;
    background: var(--surface-alt);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.popup input:focus,
.popup textarea:focus {
    outline: none;
    border-color: var(--accent-bright);
}

.popup button {
    width: 100%;
}

.popup button.popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: color 0.2s ease;
}

.popup button.popup-close-btn:hover {
    color: var(--accent-bright);
    transform: none;
    box-shadow: none;
}

.feedback-disabled-notice {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-bright);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.5;
}

.feedback-disabled-notice a {
    font-weight: 600;
}

.notification {
    margin-top: 20px;
    background: var(--surface-alt);
    color: var(--text);
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--accent-bright);
    opacity: 0;
    display: none;
    transition: opacity 0.4s ease-out;
    font-weight: 600;
    text-align: center;
}

.notification.show {
    display: block;
    opacity: 1;
    transition: opacity 0.4s ease-in;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
}

.checkbox-container {
    display: flex;
    align-items: center;
    padding: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.checkbox-container:hover {
    border-color: var(--accent-bright);
}

.checkbox-container input:checked~.label-text {
    color: var(--accent-bright);
    font-weight: 700;
}

.checkbox-container.checked {
    border-color: var(--accent-bright) !important;
    background: var(--surface) !important;
}

.label-text {
    color: var(--text);
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Mobile: center the popup instead of anchoring bottom-right, so it can't
   run off the left edge of narrow viewports (position:fixed + width:100%
   + right:20px pushes the left edge off-screen below ~400px wide). */
@media (max-width: 600px) {
    .feedback-button {
        position: relative;
        bottom: auto;
        right: auto;
        display: flex;
        justify-content: center;
        width: calc(100% - 20px);
        font-size: 1.05rem;
        padding: 14px 22px;
        margin: 20px 10px 0 10px;
    }

    .popup {
        width: 90%;
        padding: 20px;
        bottom: auto;
        top: 50%;
        right: 50%;
        transform: translate(50%, -50%);
    }

    .popup.show {
        transform: translate(50%, -50%);
    }
}
