/* ===================== */
/* Question Submit Button */
/* ===================== */

.question-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: absolute;
    right: 16px;
}

.question-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* ===================== */
/* Question Submit Menu (Popup) */
/* ===================== */

.question-submit-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 320px;
    max-width: 420px;
    border: 1px solid #e4e6eb;
}

.submit-menu-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
}

.submit-menu-content {
    padding: 16px;
}

.submit-menu-content label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    color: #444;
}

.submit-menu-content strong {
    display: block;
    margin-bottom: 4px;
}

.submit-menu-content textarea,
.submit-menu-content input[type="text"],
.submit-menu-content select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px; /* iOS: prevents auto-zoom on focus */
    font-family: inherit;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
}

.submit-menu-content textarea {
    resize: vertical;
}

.submit-image-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-attach-image {
    background: #f0f2f5;
    color: #555;
    border: 1px dashed #bbb;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-attach-image:hover {
    background: #e4e6eb;
    border-color: #667eea;
    color: #667eea;
}

.btn-remove-image {
    background: none;
    border: none;
    color: #aaa;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 50%;
    transition: color 0.15s;
}

.btn-remove-image:hover {
    color: #e53935;
}

.submit-menu-info {
    font-size: 12px;
    color: #667eea;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 6px;
    text-align: center;
}

.submit-menu-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.submit-menu-actions button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-question {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-submit-question:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    transform: scale(1.02);
}

.btn-cancel {
    background: #f0f2f5;
    color: #555;
    border-radius: 20px;
}

.btn-cancel:hover {
    background: #e4e6eb;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .question-submit-btn {
        font-size: 0;
        padding: 0;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        /* Flow in the header row instead of overlapping the kviztali pill:
           auto margin pushes it right, order slots it left of the pill */
        position: static;
        margin-left: auto;
        order: 1;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .question-submit-btn::before {
        content: "+";
        font-size: 16px;
        font-weight: 700;
    }

    .question-submit-menu {
        min-width: 280px;
        max-width: calc(100vw - 16px);
    }
}
